After calling CICS commands with the RESP
or NOHANDLE
options, the return code should be tested.
Noncompliant code example
EXEC CICS DELETEQ TS *> Noncompliant; WS-STATUS should have been tested before the MOVE
QNAME(WS-TS5FTARF-NAME)
RESP(WS-STATUS)
END-EXEC.
MOVE WS-EIBTASKN (4:4) TO WS-TS5FTAR1-NAME-TSKID.
Compliant solution
EXEC CICS DELETEQ TS
QNAME(WS-TS5FTARF-NAME)
RESP(WS-STATUS)
END-EXEC.
IF WS-STATUS ...
MOVE WS-EIBTASKN (4:4) TO WS-TS5FTAR1-NAME-TSKID.