In the following table, the names of the parameters are given in abbreviated form: each name in the table must be prefixed with encode_ to give the name of the parameter.
Input encode_ | Inout encode_ | Output encode_ |
---|---|---|
eyecatcher |
data_ptr | reason |
If the analyzer, or the caller of the CICS® business logic interface, specified a converter program name for the request, Encode is called after the CICS application program has ended. It constructs the response from the contents of the COMMAREA.
On input, a pointer to the COMMAREA returned by the CICS application program. If no application program was called, it is a pointer to the COMMAREA created by Decode.
On output, a pointer to the buffer containing the response to be sent to the client. You must ensure that the pointer points to a valid location, or results can be unpredictable. The buffer must be doubleword aligned. The first four bytes must be a 32-bit unsigned number specifying the length of the buffer. (In COBOL, specify this as PIC 9(8) COMP.) The rest of the buffer is the response. Do not use this field as output when the converter was called from a CICS business logic interface that was called in offset mode.
A count to say how many times the Encode converter has been entered for the current Web request.
A string of length 8. Its value for Encode is ">encode ".
A halfword code set to the constant value URP_ENCODE, indicating that Encode is being called.
The length of the COMMAREA as specified by Decode in decode_output_data_len.
A reason code—see Responses and reason codes.
A response—see Responses and reason codes.
The 64-bit token output by Decode as decode_user_token.
A single-character parameter list version identifier, which changes whenever the layout of the parameter list changes. Its value can be either binary zero (X'00'), indicating a pre-CICS TS 1.3 version parameter list, or a character zero (X'F0'), indicating a CICS TS 1.3 version parameter list.
Symbolic value | Numeric value | Explanation |
---|---|---|
URP_OK | 0 | The response in the buffer pointed to by encode_data_ptr is sent to the client. |
URP_DISASTER | 12 | CICS Web support
|
URP_OK_LOOP | 16 | The CICS Web interface loops back to the start of the Decode function. The value stored in encode_user_token is copied to decode_user_token for the Decode converter function to use. |
any other value | CICS Web support
|
You can supply a 32-bit reason code in encode_reason to provide further information in error cases. Neither CICS Web support nor the CICS business logic interface takes any action on the reason code returned by Encode. The reason code is output in any trace entry that results from the invocation of Encode.