Appendix A. Sample code: Non-IMS Connector for Java client code 485
private int reasonCode = 0;
public static final byte CM0 = (byte) 0x40;
public static final byte CM1 = (byte) 0x20;
public static final byte SL_NONE = (byte) 0;
public static final byte SL_CONFIRM = (byte) 0x01;
public static final byte SL_SYNCPT = (byte) 0x02;
public static final byte SL_PURGE = (byte) 0x04;
public static final byte SL_REROUTE = (byte) 0x08;
public static final byte IRM_F5_NONE = (byte) 0x00;
public static final byte IRM_F5_SINGLE = (byte) 0x01;
public static final byte IRM_F5_AUTO = (byte) 0x02;
public static final byte IRM_F5_NOAUTO = (byte) 0x04;
///////////////////////////////////////////////////////////////////
// Constructor //
///////////////////////////////////////////////////////////////////
/**
* Constructor for a Sample object.
*
* @param hostName Host name or IP address in dot format
* @param portNumber Port number which IMS Connect listens
* @param datastoreID Name of the IMS System we want to send transactions
* @param ltermName LTERM override
* @param tranCode Transaction code
* @param tranText Transaction text
* @param clientID Unique client identification
* @param racfUserID RACF User id
* @param racfGroupName RACF Group name
* @param password RACF password
* @param syncLevel Sync Level coded value
* @param commitMode Commit Mode coded value
* @param sendOnly This interaction will be send only
* @param resumeTpipe This interaction is a RESUME TPIPE
*/
public Sample(
String hostName,
int portNumber,
String datastoreID,
String ltermName,
String tranCode,
String tranText,
String clientID,
String racfUserID,
String racfGroupName,
String password,
byte syncLevel,
byte commitMode,
boolean sendOnly,
boolean resumeTpipe,
byte timer,
boolean purge,
boolean reroute,
String rerouteName) {
// set the corresponding transaction data, making all strings 8
// characters long
this.hostName = hostName;
this.portNumber = portNumber;
this.datastoreID = stringPad(datastoreID, ' ', 8);