Calling more than one application program from a converter program

Sometimes, the data you need to construct the response to an HTTP request comes from more than one user-written application program.

About this task

Attention: This topic contains Product-sensitive Programming Interface and Associated Guidance Information.
When this is the case, you can repeat the following sequence as necessary:
  • The converter's decode function.
  • An application program.
  • The converter's encode function.
Do this by setting the response to URP_OK_LOOP in the encode function. When the HTTP response is complete, set the response to URP_OK.
When the decode function is called on the second and subsequent occasions, the following input parameters are not available:
  • The HTTP version.
  • The method.
  • The path component of the URL.
  • The request headers.
  • The entity body.
However, you can use the WEB EXTRACT command to retrieve the same information.

Use the data pointer in the parameter list and the user token to share data between the decode and encode functions. When the encode function is called for the last time, if you are constructing the HTTP response manually in a buffer of storage, make sure that the data pointer (encode_data_ptr) addresses a valid HTTP response. If you are using EXEC CICS WEB API commands to produce and send the response, do so at this stage; in this situation, CICS® ignores and discards any block of storage indicated by this pointer.