public class CommAreaHolder extends java.lang.Object implements java.io.Serializable, IHolder
The class that represents a COMMAREA.
The actual COMMAREA is an instance variable of type byte[]
with the name value
.
On input, value
contains the COMMAREA that is being passed
to the Program by CICS; the Program returns a COMMAREA by copying a new value
into this field.
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', you can copy your application's output in to the COMMAREA with the following command:
System.arraycopy(myByteArray, 0, ca.getValue(), 0, myByteArray.length);
Alternatively, you can use setValue(newCommarea) to use a new byte[] to provide the output data. In this case, the value provided must be the same size as the COMMAREA that was supplied by CICS.
Modifier and Type | Field and Description |
---|---|
byte[] |
value
Deprecated.
- Direct access to this field will not be allowed in a future release
This will be made private, use the getter methods instead.
|
Constructor and Description |
---|
CommAreaHolder()
Constructs a
CommAreaHolder without a value. |
CommAreaHolder(byte[] __arg)
Constructs a
CommAreaHolder for an existing
byte[] . |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getStringValue()
Returns a String derived from the data in the IHolder, assuming
that the data is encoded in the LOCALCCSID.
|
byte[] |
getValue()
Returns the raw byte array from the IHolder
|
void |
setValue(byte[] newCommarea)
Set a value into the CommAreaHolder
|
@Deprecated public byte[] value
public CommAreaHolder()
CommAreaHolder
without a value.public CommAreaHolder(byte[] __arg)
CommAreaHolder
for an existing
byte[]
.__arg
- The existing array of bytes that is to be used as the
COMMAREA.public byte[] getValue()
IHolder
getValue
in interface IHolder
IHolder.getValue()
public void setValue(byte[] newCommarea) throws java.lang.IllegalArgumentException
newCommarea
- the COMMAREA to return to CICS. This new COMMAREA must be the same size as the COMMAREA that CICS originally provided.java.lang.IllegalArgumentException
- The new COMMAREA is the wrong size.public java.lang.String getStringValue()
IHolder
getStringValue
in interface IHolder
IHolder.getStringValue()