Copy a document into the application's own buffer.
DOCUMENT RETRIEVE >>-DOCUMENT--RETRIEVE--DOCTOKEN(data-area)--INTO(data-area)-----> >--LENGTH(data-value)--+-----------------------+----------------> '-MAXLENGTH(data-value)-' >--+--------------------+--+----------+------------------------>< '-CLNTCODEPAGE(name)-' '-DATAONLY-'
Conditions: LENGERR, NOTFND
This command is threadsafe.
DOCUMENT RETRIEVE allows the application to obtain a copy of the document in its own buffer, which it can then manipulate directly. The document is managed by CICS®, and the application does not have direct access to the buffer containing the contents of the document. The document exists only for the duration of the current transaction, so the application must retrieve the document and store it if the document is to exist over transaction boundaries. The retrieved document can be used as a basis for a new document by using the FROM option of the DOCUMENT CREATE command.
When the document is retrieved, CICS inserts tags into the document contents to identify the bookmarks and to delimit the blocks that do not require codepage conversion. To request a copy without tags, specify DATAONLY. The extracted document can also be converted into a single client codepage by using the CLNTCODEPAGE option.