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.
|
Program(java.lang.String name)
Construct a Program resource with a specific name.
|
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 |
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
getCICSServerApiVersion
public Program()
public Program(java.lang.String name)
name
- The name of the program resourcepublic 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.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.