Using the NOWAIT option

If you specify the NOWAIT option on a GET, PERFORM OBJECT, PERFORM SET, REFRESH, or SET command, the request does not complete processing immediately. Instead, the request is scheduled for processing, the command returns a RESPONSE value of SCHEDULED, and control returns to your program.

While the asynchronous request is executing, your program can perform other processing, even issuing another CICSPlex SM API command. However, as long as a command is active, the result set it has been given to process is unavailable. A RESPONSE value of INUSE is returned if you try to access a result set that is still being processed by an asynchronous request.

An ASYNCREQ resource table record is produced when the asynchronous request completes. The number of completed asynchronous requests, including ASYNCREQ records that represent requests issued with the NOWAIT option, is reported by the SENTINEL option of the ADDRESS command. You can retrieve ASYNCREQ records by issuing a RECEIVE command.

The ASYNCREQ resource table includes much of the information that is normally returned by the command itself. Because control returns to your program before the command completes processing, that information is not available to the command. The information returned in the ASYNCREQ resource table includes:
  • The command that was issued.
  • The associated result set token.
  • The RESPONSE and REASON values returned by the command.
  • The diagnostic data normally returned in a FEEDBACK resource table record, if the RESPONSE value is not OK.
  • A user-defined token that identifies the asynchronous request, if one was specified.
Note: To access the ASYNCREQ data from a REXX program, you can use either the CICSPlex SM TPARSE command with the ASIS option or the REXX SUBSTR function.


eyup1bn.html | Timestamp icon Last updated: Sunday, 4 June 2017