com.ibm.cics.server
Class Container

java.lang.Object
  extended bycom.ibm.cics.server.Container

public class Container
extends java.lang.Object

This is the Java implementation of CICS Containers

Version:
1.0
Author:
Tom Grieve

Field Summary
static int DATATYPE_BIT
           
static int DATATYPE_CHAR
           
static int NOTSET
           
 
Method Summary
 void delete()
          Delete the Container in CICS, and remove it from the owning Channel.
 byte[] get()
          Get the data from the Container.
 byte[] get(java.lang.String intoCodePage)
          Get the data from the Container.
 int getCCSID()
          Get the CCSID value of the data returned by getNoConvert().
 int getLength()
          Get the length of the data in the Container.
 int getLength(java.lang.String intoCodePage)
          Get the length of the data in the Container.
 int getLengthNoConvert()
          Get the length of the data in the Container without conversion.
 java.lang.String getName()
          Get the name of the Container as known to CICS.
 byte[] getNoConvert()
          Get the data from the Container without conversion.
 void put(byte[] byteArrayData)
          Put some byte[] array data into the Container.
 void put(byte[] byteArrayData, java.lang.String fromCodePage)
          Put some byte[] array data into the Container.
 void put(java.lang.String stringData)
          Put some String data into the Container.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NOTSET

public static final int NOTSET
See Also:
Constant Field Values

DATATYPE_BIT

public static final int DATATYPE_BIT
See Also:
Constant Field Values

DATATYPE_CHAR

public static final int DATATYPE_CHAR
See Also:
Constant Field Values
Method Detail

getName

public java.lang.String getName()
Get the name of the Container as known to CICS.

Returns:
The name of the Container.

get

public byte[] get()
           throws ContainerErrorException,
                  ChannelErrorException,
                  CCSIDErrorException,
                  CodePageErrorException
Get the data from the Container.

Returns:
byte[] array comprising the Container data.
Throws:
ContainerErrorException
ChannelErrorException
CCSIDErrorException
CodePageErrorExcepion
CodePageErrorException

get

public byte[] get(java.lang.String intoCodePage)
           throws ContainerErrorException,
                  ChannelErrorException,
                  CCSIDErrorException,
                  CodePageErrorException
Get the data from the Container.

Returns:
byte[] array comprising the Container data.
Throws:
ContainerErrorException
ChannelErrorException
CCSIDErrorException
CodePageErrorExcepion
CodePageErrorException

getNoConvert

public byte[] getNoConvert()
                    throws ContainerErrorException,
                           ChannelErrorException,
                           CCSIDErrorException,
                           CodePageErrorException
Get the data from the Container without conversion.

Returns:
byte[] array comprising the Container data.
Throws:
ContainerErrorException
ChannelErrorException
CCSIDErrorException
CodePageErrorExcepion
CodePageErrorException

getLength

public int getLength()
              throws ContainerErrorException,
                     ChannelErrorException,
                     CCSIDErrorException,
                     CodePageErrorException
Get the length of the data in the Container.

Returns:
The length of the data in the Container.
Throws:
ContainerErrorException
ChannelErrorException
CCSIDErrorException
CodePageErrorException

getLength

public int getLength(java.lang.String intoCodePage)
              throws ContainerErrorException,
                     ChannelErrorException,
                     CCSIDErrorException,
                     CodePageErrorException
Get the length of the data in the Container.

Returns:
The length of the data in the Container.
Throws:
ContainerErrorException
ChannelErrorException
CCSIDErrorException
CodePageErrorException

getLengthNoConvert

public int getLengthNoConvert()
                       throws ContainerErrorException,
                              ChannelErrorException,
                              CCSIDErrorException,
                              CodePageErrorException
Get the length of the data in the Container without conversion.

Returns:
The length of the data in the Container.
Throws:
ContainerErrorException
ChannelErrorException
CCSIDErrorException
CodePageErrorException

getCCSID

public int getCCSID()
Get the CCSID value of the data returned by getNoConvert(). If getNoConvert has not been issued then value NOTSET is returned.

Returns:
The CCSID value of the data returned

put

public void put(byte[] byteArrayData)
         throws ContainerErrorException,
                ChannelErrorException,
                InvalidRequestException,
                CCSIDErrorException,
                CodePageErrorException
Put some byte[] array data into the Container. The first put() method issued creates the CICS container and determines that containers attributes. If this method creates the CICS container it will be created as a DATATYPE(BIT) container. Subsequent put() methods will replace the data in the container and if codepage information is supplied with the put(byte[] byteArratData, String fromCodePage) method an InvalidRequestException with RESP2 = 33 will be thrown.

Throws:
ContainerErrorException
ChannelErrorException
InvalidRequestException
CCSIDErrorException
CodePageErrorException

put

public void put(byte[] byteArrayData,
                java.lang.String fromCodePage)
         throws ContainerErrorException,
                ChannelErrorException,
                InvalidRequestException,
                CCSIDErrorException,
                CodePageErrorException
Put some byte[] array data into the Container. The first put() method issued creates the CICS container and determines that containers attributes. If this method creates the CICS container it will be created as a DATATYPE(CHAR) and the fromCodePage will be associated with the container. Subsequent put() methods will replace the data in the container and data conversion may take place. If put(byte[] byteArratData, String fromCodePage) is used to replace the data in the container it will be converted if encoded in a different codepage to that associated with the container. If put(byte[] byteArrayData) or put(String stringData) is used to replace the data in the container that data will be assumed to be in the CICS LOCALCCSID codepage and if that is different to the codepage associated with the container, conversion will take place.

Throws:
ContainerErrorException
ChannelErrorException
InvalidRequestException
CCSIDErrorException
CodePageErrorException

put

public void put(java.lang.String stringData)
         throws ContainerErrorException,
                ChannelErrorException,
                InvalidRequestException,
                CCSIDErrorException,
                CodePageErrorException
Put some String data into the Container. The first put() method issued creates the CICS container and determines that containers attributes. If this method creates the CICS container it will be created as a DATATYPE(BIT) container. Subsequent put() methods will replace the data in the container and if codepage information is supplied with the put(byte[] byteArratData, String fromCodePage) method an InvalidRequestException with RESP2 = 33 will be thrown.

Throws:
ContainerErrorException
ChannelErrorException
InvalidRequestException
CCSIDErrorException
CodePageErorException
CodePageErrorException

delete

public void delete()
            throws ContainerErrorException,
                   ChannelErrorException,
                   InvalidRequestException
Delete the Container in CICS, and remove it from the owning Channel.

Throws:
ContainerErrorException
ChannelErrorException
InvalidRequestException