Temporary storage queue services
JCICS supports the CICS temporary storage commands; DELETEQ TS, READQ TS, and WRITEQ TS.
Interaction between JCICS methods and EXEC CICS commands
For information about tools that allow Java programs to access existing CICS application data, see Interacting with structured data from Java.
Table 1
lists the methods and JCICS classes
that map to CICS temporary storage commands.
| Methods | JCICS class | EXEC CICS Commands |
|---|---|---|
| delete() | TSQ | DELETEQ TS |
| readItem(), readNextItem() | TSQ | READQ TS |
|
writeItem(), rewriteItem(), writeItemConditional(), rewriteItemConditional() |
TSQ | WRITEQ TS |
- DELETEQ TS
- You can delete a temporary storage queue (TSQ) using the delete() method in the TSQ class.
- READQ TS
- The CICS INTO option is not supported in Java programs. You can read a specific item from a TSQ using the readItem() and readNextItem() methods in the TSQ class. These methods take an ItemHolder object as one of their arguments, which will contain the data read in a byte array. The storage for this byte array is created by CICS and is garbage-collected at the end of the program.
- WRITEQ TS
- You must provide data to be written to a temporary storage queue in a Java byte array. The writeItem() and rewriteItem() methods suspend if a NOSPACE condition is detected, and wait until space is available to write the data to the queue. The writeItemConditional() and rewriteItemConditional() methods do not suspend in the case of a NOSPACE condition, but return the condition immediately to the application as a NoSpaceException.