Transient data queue services

JCICS class TDQ supports the CICS® transient data commands, DELETEQ TD, READQ TD, and WRITEQ TD. All options are supported except the INTO option.

For a set of examples on TDQ, see the com.ibm.cicsdev.tdq sample project on GitHub.

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.

JCICS API mapping to EXEC CICS API lists the methods and JCICS classes that map to CICS transient data commands.
DELETEQ TD
You can delete a transient data queue (TDQ) using the delete() method in the TDQ class.
READQ TD
The CICS INTO option is not supported in Java programs. You can read from a TDQ using the readData() or the readDataConditional() method in the TDQ class. These methods take as a parameter an instance of a DataHolder object that 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.
The readDataConditional() method drives the CICS NOSUSPEND logic. If a QBUSY condition is detected, it is returned to the application immediately as a QueueBusyException.
The readData() method suspends if it attempts to access a record in use by another task and there are no more committed records.
WRITEQ TD
You must provide data to be written to a TDQ in a Java byte array.