public class Program extends RemotableResource
This Class provides the Java interface to CICS Program Control equivalent to the LINK command.
In addition to the properties it inherits from RemotableResource, it defines the following properties:
boolean
which defines whether or not a remote program will
commit its work as soon as it returns.
String
which defines the name of the mirror transaction that
should be used to run the mirror program on the remote system.
com.ibm.cics.server.API
for general restrictions on using the JCICS API.
,
Serialized FormConstructor and Description |
---|
Program()
Construct a Program bean.
|
Modifier and Type | Method and Description |
---|---|
boolean |
getSyncOnReturn()
Query whether this program always performs a SYNCPOINT when it returns.
|
java.lang.String |
getTransId()
Return the name of the CICS (mirror) transaction to be used to run the
remote program.
|
void |
link()
Perform a simple link to the program without passing in a COMMAREA.
|
void |
link(byte[] CA)
Link to the program, passing in a COMMAREA.
|
void |
link(byte[] CA,
int DATALENGTH)
Version of the link() method that takes the DATALENGTH parameter.
|
void |
link(Channel chan)
Perform a link to the program passing a CHANNEL.
|
void |
link(com.ibm.record.IByteBuffer ibb)
Deprecated.
This method has been retained for compatibility only; it was supplied for integration with the IBM
Record Framework library, which came with VisualAge for Java, and may be removed in a future release.
|
void |
link(com.ibm.record.IByteBuffer im,
com.ibm.record.IByteBuffer om)
Deprecated.
This method has been retained for compatibility only; it was supplied for integration with the IBM
Record Framework library, which came with VisualAge for Java, and may be removed in a future release.
|
void |
setSyncOnReturn(boolean syncOnReturn)
Control whether the program always performs a SYNCPOINT when it returns.
|
void |
setTransId(java.lang.String TRANSID)
Set the transaction name to be used when running the program remotely,
instead of CPMI.
|
getSysId, setSysId
getDescription, getName, setDescription, setName
public Program()
public boolean getSyncOnReturn()
public java.lang.String getTransId()
public void link() throws InvalidRequestException, LengthErrorException, NotAuthorisedException, InvalidProgramIdException, RolledBackException, InvalidSystemIdException, TerminalException
InvalidRequestException
- This exception can only occur when
the program being linked to is remote.
It occurs for one of the following reasons:
setSyncOnReturn(true)
has been called on the program
but the program calling the link
method is already in
conversation with a mirror task (that is, a logical unit-of-work is in
progress) in the remote region.
In this case, the linked-to program is in an incorrect state to support
the SYNCONRETURN
option.
link
method is already in
conversation with a mirror task and the transaction name specified (via
a call to setTransId()
) is different from the transaction
name of the active mirror.
LengthErrorException
- LENGERR occurred.NotAuthorisedException
- NOTAUTH occurred.InvalidProgramIdException
- PGMIDERR occurred.RolledBackException
- ROLLEDBACK occurred.InvalidSystemIdException
- SYSIDERR occurred.TerminalException
- TERMERR occurred.public void link(byte[] CA) throws InvalidRequestException, LengthErrorException, NotAuthorisedException, InvalidProgramIdException, RolledBackException, InvalidSystemIdException, TerminalException
CA
- A byte[]
that is the
COMMAREA to be passed to the program.InvalidRequestException
- INVREQ occurred.LengthErrorException
- LENGERR occurred.NotAuthorisedException
- NOTAUTH occurred.InvalidProgramIdException
- PGMIDERR occurred.RolledBackException
- ROLLEDBACK occurred.InvalidSystemIdException
- SYSIDERR occurred.TerminalException
- TERMERR occurred.public void link(byte[] CA, int DATALENGTH) throws InvalidRequestException, LengthErrorException, NotAuthorisedException, InvalidProgramIdException, RolledBackException, InvalidSystemIdException, TerminalException
CA
- A byte[]
that is the COMMAREA to be passed
to the program.DATALENGTH
- The amount of data to send from the COMMAREA. This
parameter can be used to avoid transmitting unnecessary data over the
network if the amount of data to be sent to the remote program is less
than the amount of data expected back.InvalidRequestException
- INVREQ occurred.LengthErrorException
- LENGERR occurred.NotAuthorisedException
- NOTAUTH occurred.InvalidProgramIdException
- PGMIDERR occurred.RolledBackException
- ROLLEDBACK occurred.InvalidSystemIdException
- SYSIDERR occurred.TerminalException
- TERMERR occurred.@Deprecated public void link(com.ibm.record.IByteBuffer ibb) throws InvalidRequestException, LengthErrorException, NotAuthorisedException, InvalidProgramIdException, RolledBackException, InvalidSystemIdException, TerminalException
Version of the link()
method that takes a single IByteBuffer
.
This method supports uses of link
where the same structure is used for both the request data and the
response data.
ibb
- A reference to an object which implements the IByteBuffer
. The same mapping is used for
both the initial data passed to the program and the data returned by the program.InvalidRequestException
- INVREQ occurred.LengthErrorException
- LENGERR occurred.NotAuthorisedException
- NOTAUTH occurred.InvalidProgramIdException
- PGMIDERR occurred.RolledBackException
- ROLLEDBACK occurred.InvalidSystemIdException
- SYSIDERR occurred.TerminalException
- TERMERR occurred.@Deprecated public void link(com.ibm.record.IByteBuffer im, com.ibm.record.IByteBuffer om) throws InvalidRequestException, LengthErrorException, NotAuthorisedException, InvalidProgramIdException, RolledBackException, InvalidSystemIdException, TerminalException
Version of the link()
method that takes a separate IByteBuffer
for the input data and output
data.
If the input data is shorter than the output data then this method will set the DATALENGTH option in the underlying CICS API.
im
- A reference to an object which implements the IByteBuffer
. This object maps the input
data. If no mapping of the input data is required then a special identity map must be supplied.om
- A reference to an object which implements the IByteBuffer
. This object maps the output
data. If no mapping of the output data is required then a special identity map must be supplied.InvalidRequestException
- INVREQ occurred.LengthErrorException
- LENGERR occurred.NotAuthorisedException
- NOTAUTH occurred.InvalidProgramIdException
- PGMIDERR occurred.RolledBackException
- ROLLEDBACK occurred.InvalidSystemIdException
- SYSIDERR occurred.TerminalException
- TERMERR occurred.public void link(Channel chan) throws InvalidRequestException, LengthErrorException, NotAuthorisedException, InvalidProgramIdException, RolledBackException, InvalidSystemIdException, TerminalException, ChannelErrorException
chan
- A reference to the ChannelInvalidRequestException
- INVREQLengthErrorException
- LENGERR occurred.NotAuthorisedException
- NOTAUTH occurred.InvalidProgramIdException
- PGMIDERR occurred.RolledBackException
- ROLLEDBACK occurred.InvalidSystemIdException
- SYSIDERR occurred.TerminalException
- TERMERR occurred.ChannelErrorException
- CHANNELERR occurred.public void setSyncOnReturn(boolean syncOnReturn)
syncOnReturn
- If true, the program will perform a SYNCPOINT when
it returns; if false, it will not and will participate in the SYNCPOINT
of the current task.public void setTransId(java.lang.String TRANSID)
TRANSID
- The name of the transaction to use. The transaction must
be defined to run the same program as the CPMI transaction.