CICS® Transaction Gateway Programming Reference v1.1.0.0

com.ibm.ctg.client
Class CicsCpRequest

java.lang.Object
  extended by com.ibm.ctg.client.GatewayRequest
      extended by com.ibm.ctg.client.CicsCpRequest
All Implemented Interfaces:
GatewayReturnCodes

public class CicsCpRequest
extends GatewayRequest

This class contains the details of the codepage used by the Client daemon. To execute the request, the CicsCpRequest object should be flowed to the Gateway using the JavaGateway.flow method.

See Also:
GatewayRequest

Field Summary
static int CODEPAGE_ERR
          The CICS Transaction Gateway detected an error.
static int CODEPAGE_NORMAL
          The request completed normally.
static int CODEPAGE_NOT_AVAILABLE
          A code page cannot be obtained.
static int NLS_NOT_SUPPORTED
          The Java Virtual Machine on which the CICS Transaction Gateway application is running is pre v1.1.
static int NO_ENCODING_CLASS
          The Java Virtual Machine on which the CICS Transaction Gateway application is running does not have a suitable encoding class.
static 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 recognize.
static 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.
static 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.
 
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
CicsCpRequest()
          Default constructor.
 
Method Summary
 java.lang.String getClientCp()
          Returns the Client daemon's codepage (after the CicsCpRequest object has been flowed to the Gateway).
 int getClientRc()
          Gets the Client Request return code set in this object, if there is one.
 java.lang.String getClientRcString()
          Returns the String representation of the return code relating to a Client daemon codepage request, or "Return Code Out of Range".
 int getRc()
          Returns the Gateway return code, set in this object.
 
Methods inherited from class com.ibm.ctg.client.GatewayRequest
getGatewayRc, getGatewayRcString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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. N.B. 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 recognize.

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 codepage used used by the Client daemon.

The Client daemon must be set up so that a valid codepage is defined. Please refer to platform specific documentation for the Client Daemon you are using.

It is sometimes the case that the Client daemon uses a completely different method of determining the codepage than the Java Virtual Machine on which the CICS Transaction Gateway application is running. In this case, the CICS Transaction Gateway will use the same method as the Client daemon, and not the method used by the JVM.

The Client daemon codepage 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, from JDK 1.1 onwards, may try to alias the codepage before doing conversions. This should be the case when using some of the String class constructors at JDK 1.1 e.g. "String(byte[] bytes, String enc)" - where "enc" refers to the character encoding (i.e. the codepage).

If the CICS Transaction Gateway application is running on the OS/390 operating system, (i.e. System Property value "os.name" indicates OS/390), then getClientRcString() will return "OPSYS_OS390" and getClientCp() will return "unknown".

If the CICS Transaction Gateway fails to recognise the operating system that it is running on, (i.e. System Property value "os.name") then * getClientRcString() will return OPSYS_NOT_RECOGNISED.

NOTE: If you are running the CICS Transaction Gateway application on an Open Systems machine, (e.g. the operating system is AIX or Solaris), then in order for a CicsCpRequest to be correctly implemented, you should ensure that: (a) the Java Virtual Machine on which the CICS Transaction Gateway application is running is at v1.1 or above and (b) the locale held in the environment variable $LANG is correct, since this will be used by the JVM to determine the codepage.

If the CICS Transaction Gateway application is running on the z/OS operating system, (i.e. System Property value "os.name" indicates z/OS), then getClientRcString() will return "OPSYS_ZOS" and getClientCp() will return "unknown".

Method Detail

getClientCp

public java.lang.String getClientCp()
Returns the Client daemon's codepage (after the CicsCpRequest object has been flowed to the Gateway).

Returns:
String Client daemon codepage (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 Client Request return code set in this object, if there is one.

Returns:
int The Client daemon request return code

getClientRcString

public java.lang.String getClientRcString()
Returns the String representation of the return code relating to a Client daemon codepage request, or "Return Code Out of Range".

Returns:
String The Client daemon codepage return code (or "Return Code Out of Range")

©Copyright IBM Corp. 1994, 2014
Legal