Running the TSQ example
You can run the temporary storage example to understand how Java programs can interact with temporary storage queues. A temporary storage queue is a queue of data items that can be read and reread in any sequence. The queue is created by a task and persists until the same task or another task deletes it.
Before you begin
About this task
This example demonstrates how to use the JCICS TSQ class and how to build a class as a dynamic link library (DLL) that can be shared with other Java programs. This example uses the following Java classes and programs:
Transaction | Program | Java class |
---|---|---|
JTS1 | DFJ$JTS1 | TSQ.ClassOne |
JTS1 | DFJ$JTSC | TSQ.Common |
Procedure
Enter the JTS1 CICS transaction to run the example. You receive the following messages on Task.out:
Entering TSQ.ClassOne.main()
Entering TSQ_Common.writeFixedData()
Leaving TSQ_Common.writeFixedData()
Entering TSQ_Common.serializeObject()
Leaving TSQ_Common.serializeObject()
Entering TSQ_Common.updateFixedData()
Leaving TSQ_Common.updateFixedData()
Entering TSQ_Common.writeConditionalFixedData()
Leaving TSQ_Common.writeConditionalFixedData()
Entering TSQ_Common.updateConditionalFixedData()
Leaving TSQ_Common.updateConditionalFixedData()
Entering TSQ_Common.readFixedData()
Leaving TSQ_Common.readFixedData()
Entering TSQ_Common.deserializeObject()
Leaving TSQ_Common.deserializeObject()
Entering TSQ_Common.readFixedConditionalData()
Number of items returned is 3
Leaving TSQ_Common.readFixedConditionalData()
Entering TSQ_Common.deleteQueue()
Leaving TSQ_Common.deleteQueue()
Leaving TSQ.ClassOne.main()
Results
The following processing is taking place in CICS:
- The transaction runs the main Java class that is defined in the PROGRAM resource DFJ$JTS1. The Java program links to another common Java program that is defined in the PROGRAM resource DFJ$JTSC.
- The common Java program writes to an auxiliary temporary storage queue, updates the queue, deletes the queue, and returns.