What it means
RESP 23 means there is nothing more to read from the transient data queue. For a program that drains a queue, it is the normal end of the loop.
If the program does not test RESP for it, CICS ends the task abnormally.
Typical causes
- The program read every record on the queue.
- Another task already read the records the program expected to find.
- The program reads a queue that nothing has written to yet.
How to fix it
- Test RESP after every READQ TD and end the loop cleanly on QZERO.
- Do not treat QZERO as an error in drain or trigger-driven programs.
- If records were expected, check that the writing program uses the same queue name.
Example
Illustrative only; names and values are invented.
EXEC CICS READQ TD QUEUE('LOGQ') INTO(WS-REC) LENGTH(WS-LEN)
RESP(WS-RESP) END-EXEC
IF WS-RESP = DFHRESP(QZERO)
SET WS-QUEUE-EMPTY TO TRUE
END-IF