Class CicsCpRequest
- java.lang.Object
-
- com.ibm.ctg.client.GatewayRequest
-
- com.ibm.ctg.client.CicsCpRequest
-
- All Implemented Interfaces:
- GatewayReturnCodes
public class CicsCpRequest extends GatewayRequest
This class contains the details of the code page used by the CICS TG. To execute the request, the CicsCpRequest object should be flowed to the CICS TG using theJavaGateway.flow(GatewayRequest)method.- See Also:
GatewayRequest
-
-
Field Summary
Fields Modifier and Type Field and Description static intCODEPAGE_ERRThe CICS Transaction Gateway detected an error.static intCODEPAGE_NORMALThe request completed normally.static intCODEPAGE_NOT_AVAILABLEA code page cannot be obtained.static intNLS_NOT_SUPPORTEDThe Java Virtual Machine on which the CICS Transaction Gateway application is running is pre v1.1.static intNO_ENCODING_CLASSThe Java Virtual Machine on which the CICS Transaction Gateway application is running does not have a suitable encoding class.static intOPSYS_NOT_RECOGNISEDThe machine on which the CICS Transaction Gateway application is running has an Operating System (System Property "os.name") which the CICS Transaction Gateway does not recognise.static intOPSYS_OS390The Java Virtual Machine on which the CICS Transaction Gateway application is running has an Operating System (System Property "os.name") of OS/390.static intOPSYS_ZOSThe Java Virtual Machine on which the CICS Transaction Gateway application is running has an Operating System (System Property "os.name") of z/OS.-
Fields inherited from interface com.ibm.ctg.client.GatewayReturnCodes
astrGateway_Rc, ERROR_BASE, ERROR_CONNECTION_FAILED, ERROR_EXIT_RETRY_INVALID, ERROR_GATEWAY_BACK_LEVEL, ERROR_GATEWAY_CLOSED, ERROR_GATEWAY_EXCEPTION, ERROR_INVALID_REQUEST_TYPE, ERROR_NOT_AUTHORIZED, ERROR_NOT_SUPPORTED, ERROR_REPLY_MISMATCH, ERROR_UNKNOWN_REQUEST_TYPE, ERROR_WORK_WAS_REFUSED, ERROR_XA_SUPPORT_NOT_ENABLED, strINVALID_GATEWAY_RC
-
-
Constructor Summary
Constructors Constructor and Description CicsCpRequest()Default constructor.
-
Method Summary
Methods Modifier and Type Method and Description java.lang.StringgetClientCp()Returns the code page of the CICS TG (after the CicsCpRequest object has beenflowed to the CICS TG).intgetClientRc()Gets the CICS TG return code set in this object, if there is one.java.lang.StringgetClientRcString()Returns the String representation of the return code relating to a CICS TG code page request, or "Return Code Out of Range".intgetRc()Returns the Gateway return code, set in this object.-
Methods inherited from class com.ibm.ctg.client.GatewayRequest
getGatewayRc, getGatewayRcString, setRc
-
-
-
-
Field Detail
-
CODEPAGE_NORMAL
public static final int CODEPAGE_NORMAL
The request completed normally.- See Also:
- Constant Field Values
-
CODEPAGE_NOT_AVAILABLE
public static final int CODEPAGE_NOT_AVAILABLE
A code page cannot be obtained.- See Also:
- Constant Field Values
-
NLS_NOT_SUPPORTED
public static final int NLS_NOT_SUPPORTED
The Java Virtual Machine on which the CICS Transaction Gateway application is running is pre v1.1.- See Also:
- Constant Field Values
-
NO_ENCODING_CLASS
public static final int NO_ENCODING_CLASS
The Java Virtual Machine on which the CICS Transaction Gateway application is running does not have a suitable encoding class. Note: Currently, this return code is not used.- See Also:
- Constant Field Values
-
OPSYS_OS390
public static final int OPSYS_OS390
The Java Virtual Machine on which the CICS Transaction Gateway application is running has an Operating System (System Property "os.name") of OS/390.- See Also:
- Constant Field Values
-
OPSYS_NOT_RECOGNISED
public static final int OPSYS_NOT_RECOGNISED
The machine on which the CICS Transaction Gateway application is running has an Operating System (System Property "os.name") which the CICS Transaction Gateway does not recognise.- See Also:
- Constant Field Values
-
CODEPAGE_ERR
public static final int CODEPAGE_ERR
The CICS Transaction Gateway detected an error.- See Also:
- Constant Field Values
-
OPSYS_ZOS
public static final int OPSYS_ZOS
The Java Virtual Machine on which the CICS Transaction Gateway application is running has an Operating System (System Property "os.name") of z/OS.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CicsCpRequest
public CicsCpRequest()
Default constructor.This will create an object suitable for querying the code page used used by the CICS TG.
The CICS TG must be set up so that a valid code page is defined.
The CICS TG code page will not necessarily be returned in a Java format, therefore it is necessary to validate this before using Java classes which require a Java format. Some JDK classes may try to alias the code page before performing conversions. This should be the case when using some of the String class constructors such as
String(byte[] bytes, String enc)where "enc" refers to the character encoding (the code page).If the CICS Transaction Gateway application is running on the z/OS operating system, (the system property value
"os.name"indicates z/OS), thengetClientRcString()will return"OPSYS_ZOS"andgetClientCp()will return"unknown".If the CICS Transaction Gateway fails to recognise the operating system that it is running on from the System property value
"os.name"thengetClientRcString()will return"OPSYS_NOT_RECOGNISED".If you are running the CICS Transaction Gateway application on an Open Systems machine such AIX or Solaris, then in order for a
CicsCpRequestto be correctly implemented, you should ensure that the locale held in theLANGenvironment variable is correct, since this will be used by the JVM to determine the code page.
-
-
Method Detail
-
getClientCp
public java.lang.String getClientCp()
Returns the code page of the CICS TG (after the CicsCpRequest object has beenflowed to the CICS TG).- Returns:
- String the CICS TG code page (or "unknown")
-
getRc
public int getRc()
Returns the Gateway return code, set in this object. If a Gateway error code is set this is returned.- Returns:
- int The Gateway return code
-
getClientRc
public int getClientRc()
Gets the CICS TG return code set in this object, if there is one.- Returns:
- int The CICS TG request return code
-
getClientRcString
public java.lang.String getClientRcString()
Returns the String representation of the return code relating to a CICS TG code page request, or "Return Code Out of Range".- Returns:
- String The CICS TG code page return code (or "Return Code Out of Range")
-
-