com.ibm.cics.server
Class Program
- java.lang.Object
-
- com.ibm.cics.server.API
-
- com.ibm.cics.server.Resource
-
- com.ibm.cics.server.RemotableResource
-
- com.ibm.cics.server.Program
-
- All Implemented Interfaces:
- java.io.Serializable
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:
- syncOnReturn
- A
boolean
which defines whether or not a remote program will commit its work as soon as it returns. - transId
- A
String
which defines the name of the mirror transaction that should be used to run the mirror program on the remote system.
- See Also:
, Serialized Formcom.ibm.cics.server.API
for general restrictions on using the JCICS API.- Since CICS TS version:
- 1.3
- Since package version:
- 1.0.0
-
-
Constructor Summary
Constructors Constructor and Description Program()
Construct a Program bean.Program(java.lang.String name)
Construct a Program resource with a specific name.
-
Method Summary
All Methods Instance Methods Concrete Methods 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.-
Methods inherited from class com.ibm.cics.server.RemotableResource
getSysId, setSysId
-
Methods inherited from class com.ibm.cics.server.Resource
getDescription, getName, setDescription, setName
-
Methods inherited from class com.ibm.cics.server.API
getCICSServerApiVersion
-
-
-
-
Constructor Detail
-
Program
public Program()
Construct a Program bean.- Since CICS TS version:
- 1.3
- Since package version:
- 1.0.0
-
Program
public Program(java.lang.String name)
Construct a Program resource with a specific name.- Parameters:
name
- The name of the program resource- Since CICS TS version:
- 6.1
- Since package version:
- 2.0.0
-
-
Method Detail
-
getSyncOnReturn
public boolean getSyncOnReturn()
Query whether this program always performs a SYNCPOINT when it returns. This only applies to remote programs.- Returns:
- boolean an indication if SYNCONRETURN will always apply
- Since CICS TS version:
- 1.3
- Since package version:
- 1.0.0
-
getTransId
public java.lang.String getTransId()
Return the name of the CICS (mirror) transaction to be used to run the remote program.- Returns:
- String the name of the (mirror) transaction to be used
- Since CICS TS version:
- 1.3
- Since package version:
- 1.0.0
-
link
public void link() throws InvalidRequestException, LengthErrorException, NotAuthorisedException, InvalidProgramIdException, RolledBackException, InvalidSystemIdException, TerminalException
Perform a simple link to the program without passing in a COMMAREA.- Throws:
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 thelink
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 theSYNCONRETURN
option.- The program calling the
link
method is already in conversation with a mirror task and the transaction name specified (via a call tosetTransId()
) 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.- Since CICS TS version:
- 1.3
- Since package version:
- 1.0.0
-
link
public void link(byte[] CA) throws InvalidRequestException, LengthErrorException, NotAuthorisedException, InvalidProgramIdException, RolledBackException, InvalidSystemIdException, TerminalException
Link to the program, passing in a COMMAREA.- Parameters:
CA
- Abyte[]
that is the COMMAREA to be passed to the program.- Throws:
InvalidRequestException
- INVREQ occurred.LengthErrorException
- LENGERR occurred.NotAuthorisedException
- NOTAUTH occurred.InvalidProgramIdException
- PGMIDERR occurred.RolledBackException
- ROLLEDBACK occurred.InvalidSystemIdException
- SYSIDERR occurred.TerminalException
- TERMERR occurred.- Since CICS TS version:
- 1.3
- Since package version:
- 1.0.0
-
link
public void link(byte[] CA, int DATALENGTH) throws InvalidRequestException, LengthErrorException, NotAuthorisedException, InvalidProgramIdException, RolledBackException, InvalidSystemIdException, TerminalException
Version of the link() method that takes the DATALENGTH parameter. This method is the only way that DATALENGTH can be specified.- Parameters:
CA
- Abyte[]
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.- Throws:
InvalidRequestException
- INVREQ occurred.LengthErrorException
- LENGERR occurred.NotAuthorisedException
- NOTAUTH occurred.InvalidProgramIdException
- PGMIDERR occurred.RolledBackException
- ROLLEDBACK occurred.InvalidSystemIdException
- SYSIDERR occurred.TerminalException
- TERMERR occurred.- Since CICS TS version:
- 1.3
- Since package version:
- 1.0.0
-
link
public void link(Channel chan) throws InvalidRequestException, LengthErrorException, NotAuthorisedException, InvalidProgramIdException, RolledBackException, InvalidSystemIdException, TerminalException, ChannelErrorException
Perform a link to the program passing a CHANNEL.- Parameters:
chan
- A reference to the Channel- Throws:
InvalidRequestException
- INVREQLengthErrorException
- LENGERR occurred.NotAuthorisedException
- NOTAUTH occurred.InvalidProgramIdException
- PGMIDERR occurred.RolledBackException
- ROLLEDBACK occurred.InvalidSystemIdException
- SYSIDERR occurred.TerminalException
- TERMERR occurred.ChannelErrorException
- CHANNELERR occurred.- Since CICS TS version:
- 3.1
- Since package version:
- 1.0.0
-
setSyncOnReturn
public void setSyncOnReturn(boolean syncOnReturn)
Control whether the program always performs a SYNCPOINT when it returns. This only applies to remote programs.- Parameters:
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.- Since CICS TS version:
- 1.3
- Since package version:
- 1.0.0
-
setTransId
public void setTransId(java.lang.String TRANSID)
Set the transaction name to be used when running the program remotely, instead of CPMI.- Parameters:
TRANSID
- The name of the transaction to use. The transaction must be defined to run the same program as the CPMI transaction.- Since CICS TS version:
- 1.3
- Since package version:
- 1.0.0
-
-