Scheduling services
JCICS provides support for the CICS scheduling services, which let you retrieve data stored for a task, cancel interval control requests, and start a task at a specified time.
| Methods | JCICS class | EXEC CICS Commands |
|---|---|---|
| cancel() | StartRequest | CANCEL |
| retrieve() | Task | RETRIEVE |
| issue() | StartRequest | START |
To define what is to be retrieved by the
Task.retrieve()
method, use a
java.util.BitSet
object. The
com.ibm.cics.server.RetrieveBits
class defines the bits which can be set in the
BitSet
object; they are:
- RetrieveBits.DATA
- RetrieveBits.RTRANSID
- RetrieveBits.RTERMID
- RetrieveBits.QUEUE
The
Task.retrieve()
method retrieves up to four different pieces of information in a
single invocation, depending on the settings of the
RetrieveBits.
The DATA, RTRANSID, RTERMID and QUEUE data are placed in a
RetrievedData
object, which is held in a
RetrievedDataHolder
object. The following example retrieves the data and transid:
BitSet bs = new BitSet();
bs.set(RetrieveBits.DATA, true);
bs.set(RetrieveBits.RTRANSID, true);
RetrievedDataHolder rdh = new RetrievedDataHolder();
t.retrieve(bs, rdh);
byte[] inData = rdh.value.data;
String transid = rdh.value.transId;