The RETRIEVE command EXEC CICS RETRIEVE {INTO(data-area) | SET(pointer-ref) } [ LENGTH(data-area) ] [ RTRANSID(data-area) ] [ RTERM...
EXEC CICS
RETRIEVE {INTO(data-area) | SET(pointer-ref) }
[ LENGTH(data-area) ]
[ RTRANSID(data-area) ]
[ RTERMID(data-area) ]
[ QUEUE(data-area) ]
[ WAIT ]
END-EXEC
Options
INTO Specifies the data area that will contain the data sent via the FROM option of the START command.
LENGTH Specifies the length of the INTO area on input. Must be Half word PIC S9(4) COMP. On return from the call has the length of the data actually retrieved.
RTRANSID Specifies a four character area that will contain the data sent via the RTRANSID option of the START command.
RTERMID Specifies a four character area that will contain the data sent via the RTERMID option of the START command.
QUEUE Specifies a eight character area that will contain the data sent via the QUEUE option of the START command.
WAIT Suspend this task until another ICE expires and the data associated with that START command is available.
Conditions
ENDDATA No data is available for the STARTED task.
ENVDEFERR The retrieve command specified a INTO, SET, RTRANSID, RTERMID or QUEUE option and no such option was specified in the START command.
INVREQ The command is not valid.
IOERR An I/O error occurred.
LENGERR The length specified was not enough to fetch the complete data retrieved.
NOTFND The data has been deleted by another task.
Notes
- You can code a iterative server process which issues RETRIEVE repeatedly until ENDDATA is raised. This prevents more similar tasks from being started. You can use the WAIT option to good effect if you are expecting more data in the short term.
- The RTRANSID, RTERMID and QUEUE are provided to pass specific types of data to the started task. See asynchronous client server scenarios described earlier in this material.
- You should always check for the ENDDATA condition.
- The RTRANSID, RTERMID and QUEUE are provided to pass specific types of data to the started task. See asynchronous client server scenarios described earlier in this material.
No comments
Post a Comment