WEB RETRIEVE

Retrieve the DOCTOKEN for a CICS® document that was sent using a WEB SEND command.

WEB RETRIEVE

Read syntax diagramSkip visual syntax diagramWEBRETRIEVEDOCTOKEN( data-area)

Conditions: INVREQ, NOTFND

This command is threadsafe.

 

The WEB RETRIEVE command allows an application to retrieve the binary token for a document that was sent. For the WEB RETRIEVE command to be able to retrieve the document token, the previous WEB SEND command must specify the ACTION(EVENTUAL) option, so that the SEND command is pending when the application completes. This is because if the ACTION(EVENTUAL) option is used, the Web domain keeps a copy of the information for a document after it is sent. Note that the document that is retrieved is the document that was sent, and it does not include any changes that might have occurred up to the time when the RETRIEVE command is issued.

A valid sequence of events for issuing the WEB RETRIEVE command is as follows:
EXEC CICS WEB SEND 
          ACTION(EVENTUAL)
EXEC CICS WEB SEND 
          ACTION(EVENTUAL)
EXEC CICS WEB RETRIEVE 
          DOCTOKEN(MYDOC)
The DOCTOKEN for the second WEB SEND command is retrieved successfully.

If the WEB SEND command specified the option DOCSTATUS(DOCDELETE), the WEB RETRIEVE command cannot retrieve the document, and a NOTFND response with a RESP2 value of 1 is returned.

If the WEB SEND command specified the option ACTION(IMMEDIATE), the WEB RETRIEVE command cannot retrieve the document, and a NOTFND response with a RESP2 value of 1 is returned. WEB SEND client processing does not support ACTION(EVENTUAL), so the WEB RETRIEVE command is not valid for use with WEB SEND (Client) commands.

Options

DOCTOKEN(data-area)
specifies a buffer that contains the 16-byte binary token of the document to be retrieved.

Conditions

16 INVREQ
RESP2 values:
1
The command is issued in a non-CICS Web support application.
2
A WEB SEND command has not been issued..
13 NOTFND
RESP2 values:
1
Document is not available as the last WEB SEND specified DOCSTATUS(DOCDELETE) or the last WEB SEND was not a SEND for a document with ACTION(EVENTUAL).