Output parameters for converter program encode function

Attention: This topic contains Product-sensitive Programming Interface and Associated Guidance Information.

The encode function can provide the following outputs: a response code, the address of the storage buffer, the length of the HTTP response and an eight byte user token.

  • A response code (optionally qualified by a reason):
    • If the encode function returns a response code of URP_OK, CICS® sends the supplied HTTP response to the web client, unless you have already used the EXEC CICS WEB API commands to do this.
    • If the encode function returns a response code of URP_OK_LOOP, processing continues with the decode function. See Calling more than one application program from a converter program for more information.
    • If the encode function returns any other value, the HTTP request is rejected with an error response. For details of the response made by CICS in this situation, see CICS web support default status codes and error responses.
  • If you have constructed the HTTP response manually in a buffer of storage, the address of the buffer of storage, and the length of the HTTP response. The first word of the buffer must contain the length of the data (that is, the length of the HTTP response plus 4). If you use EXEC CICS WEB API commands to send the response instead, CICS ignores and discards any block of storage indicated by this pointer.
  • An eight byte user token, used to share information between the analyzer and converter programs. See Sharing data between analyzer and converter programs.