com.ibm.cics.server
Class CommAreaHolder

java.lang.Object
  extended by com.ibm.cics.server.CommAreaHolder
All Implemented Interfaces:
java.io.Serializable

public class CommAreaHolder
extends java.lang.Object
implements java.io.Serializable

The class that represents a COMMAREA. The actual COMMAREA is an instance variable of type byte[] with the name value.

The reason for this extra holder class is that a COMMAREA is used both for input and output so the extra level of indirection is needed as Java only passes arguments by value. On input, value contains the COMMAREA that is being passed in to the program; the program returns a COMMAREA by setting value to a new byte[] that it has constructed. For example, if you have output in a byte array called 'myByteArray' and the CommAreaHolder instance passed in to the application is referenced as 'ca' then you can copy your application's output in to the COMMAREA used by CICS with the following command: System.arraycopy(myByteArray, 0, ca.value, 0, myByteArray.length);

See Also:
Serialized Form
Since CICS TS version:
1.3
Since package version:
1.0

Field Summary
 byte[] value
          The array of bytes comprising the COMMAREA.
 
Constructor Summary
CommAreaHolder()
          Constructs a CommAreaHolder without a value.
CommAreaHolder(byte[] __arg)
          Constructs a CommAreaHolder for an existing byte[].
 
Method Summary
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

value

public byte[] value
The array of bytes comprising the COMMAREA.

Since CICS TS version:
1.3
Since package version:
1.0
Constructor Detail

CommAreaHolder

public CommAreaHolder()
Constructs a CommAreaHolder without a value.

Since CICS TS version:
1.3
Since package version:
1.0

CommAreaHolder

public CommAreaHolder(byte[] __arg)
Constructs a CommAreaHolder for an existing byte[].

Parameters:
__arg - The existing array of bytes that is to be used as the COMMAREA.
Since CICS TS version:
1.3
Since package version:
1.0