Producing an entity body for an HTTP message

Top  Previous  Next

Web-aware application programs can produce an entity body formed from a XCICS document, or from a buffer of data.

XCICS documents can be used as the entity body of an HTTP message. They are created using the EXEC CICS DOCUMENT commands. They can be populated by data specified directly by the application program, and by document templates, which are portions of documents defined as XCICS resources or created by another XCICS program. Documents and document templates can be stored for reuse.

Alternatively, you can specify a buffer of data created by the application program. You might find this option more convenient for short or simple entity bodies, and it is the only option that enables you to use chunked transfer-coding for the message. However, data created in this way cannot be stored for reuse so easily.

1.To create a XCICS document, follow the instructions in the XCICS Document commands guide. The document is created using the EXEC CICS DOCUMENT application programming interface (EXEC CICS DOCUMENT CREATE, INSERT, and SET commands). The DOCTOKEN option on the WEB SEND command is used to specify the document token for the finished document. XCICS retrieves the document and performs appropriate code page conversion, depending on the options you specify on the WEB SEND command. The body of a chunked message cannot be formed from XCICS documents.
2.Alternatively, assemble a message body within your application program. The FROM option on the WEB SEND command is used to specify the buffer of data.