Reference information for converter programs

Top  Previous  Next

The names of the parameters and constants for converter programs, translated into appropriate forms for the different programming languages supported, are defined in files supplied as part of XCICS.

Language

Parameters file

Constants file

Path

C

dfhwbcdh.h     

dfhwbuch.h

$XFRAMEHOME/xcics/cpy

COBOL

DFHWBCDO.cpy

DFHWBUCO.cpy

$XFRAMEHOME/xcics/cobcpy

These files give language-specific information about the data types of the fields in the COMMAREA.

Parameters description for the DECODE function

Parameter

Mode

Description

decode_client_address

Input

The 32-bit IP address of the client.

decode_client_address_string

Input

The IP address of the client in dotted decimal format.

decode_data_ptr

Input/Output

On input, a pointer to the request from the client (as modified by the analyzer) or, if this call is a loop back from the Encode converter function, a pointer to the response data of encode_data_ptr.

On output, pointer to the COMMAREA to be passed to the XCICS application program. Do not modify this parameter when decode_volatile has a value of 0

decode_entry_count

Input

A count to say how many times the Decode converter has been entered for the current Web request.

decode_eyecatcher

Input

A string of length 8. Its value for Decode is ">decode ."

decode_function

Input

A halfword code set to the constant value URP_DECODE, indicating that Decode is being called.

decode_http_version_length

Input

The length in bytes of the string identifying the HTTP version supported by the client. If the request is not an HTTP request, or decode_entry_count is greater than 1, the value is zero.

decode_http_version_ptr

Input

A pointer to the string identifying the HTTP version supported by the client. If the analyzer modified this part of the request, the changes are visible here. If decode_http_version_length is zero, the value is undefined.

decode_input_data_len

Input/Output

On input, this is the length in bytes of the request data pointed to by decode_data_ptr.

The value to be used for the DATALENGTH option of a LINK command for the XCICS application program. The default value if this output is not set is 32K.

decode_method_length

Input

The length in bytes of the method specified in the HTTP request. If the request is not an HTTP request, or decode_entry_count is greater than 1, the value is zero.

decode_method_ptr

Input

A pointer to the method specified in the HTTP request. If the analyzer modified this part of the request, the changes are visible here. If decode_method_length is zero, the value is undefined.

decode_output_data_len

Output

The value to be used for the LENGTH option of the LINK command for the XCICS application program. The default value if this output is not set is 32K.

decode_reason

Output

A reason code. See "Responses and reason codes".

decode_request_header_length

Input

The length of the first HTTP header in the HTTP request. If the request is not an HTTP request, or decode_entry_count is greater than 1, the value is zero.

decode_request_header_ptr

Input

A pointer to the first HTTP header in the HTTP request. If the analyzer modified this part of the request, the changes are visible here. If decode_request_header_length is zero, the value is undefined.

decode_resource_length

Input

The length in bytes of the path component of the URL in the HTTP request. If the request is not an HTTP request, or decode_entry_count is greater than 1, the value is zero.

decode_resource_ptr

Input

A pointer to the path component of the URL in the HTTP request. If the analyzer modified this part of the request, the changes are visible here. If decode_resource_length is zero, the value is undefined.

decode_response

Output

A response code. See "Responses and reason codes".

decode_server_program

Input/Output

A string of length 8. On input, the value supplied by the analyzer in wbra_server_program, or the value supplied by the caller of the XCICS business logic interface. On output, the name of the XCICS application program that is to service the request. The application program name must be set here or in the analyzer, or no application program will be called.

decode_user_data_length

Input

The length in bytes of the entity body for this HTTP request. If the analyzer modified this value, it is visible here. If there is no entity body in the request, the length is zero. If the request is not an HTTP request, the value is the length of the request. If decode_entry_count is greater than 1, the value is zero.

decode_user_data_ptr

Input

A pointer to any entity body for this HTTP request. If the analyzer modified this part of the request, the changes are visible here. If there is no entity body in the request, the pointer is zero. If the request is not an HTTP request, this pointer has the same value as decode_data_ptr. If decode_entry_count is greater than 1, the value is undefined.

decode_user_token

Input/Output

A 64-bit token. On input, the user token supplied by the analyzer as wbra_user_token. On output, a token that is passed to Encode as encode_user_token.

decode_version

Input

A single-character parameter list version identifier: always set to character zero ('0'), indicating an IBM CICS TS 1.3 version parameter list.

decode_volatile

Input

A single-character code indicating whether the data area pointed to be decode_data_ptr can be replaced. Possible values are:

0 - The area is part of another COMMAREA and cannot be replaced.

1 - The storage pointed to by decode_data_ptr can be freed and replaced by a different size work area.

Parameters description for the ENCODE function

Parameter

Mode

Description

encode_data_ptr

Input/Output

On input, a pointer to the COMMAREA returned by the XCICS 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.

encode_entry_count

Input

A count to say how many times the Encode converter has been entered for the current Web request.

encode_eyecatcher

Input

A string of length 8. Its value for Encode is ">encode ."

encode_function

Input

A halfword code set to the constant value URP_ENCODE, indicating that Encode is being called.

encode_input_data_len

Input

The length of the COMMAREA as specified by Decode in decode_output_data_len.

encode_reason

Output

A reason code. See "Responses and reason codes".

encode_response

Output

A response code. See "Responses and reason codes".

encode_user_token

Input

The 64-bit token output by Decode as decode_user_token.

encode_version

Input

A single-character parameter list version identifier: always set to character zero ('0'), indicating an IBM CICS TS 1.3 version parameter list.

encode_volatile

Input

A single-character code indicating whether the data area pointed to be encode_data_ptr can be replaced. Possible values are:

0 - The area is part of another COMMAREA and cannot be replaced.

1 - The storage pointed to by encode_data_ptr can be freed and replaced by a different size work area.

Response and reason codes

An analyzer program must return one of the following values in wbra_response:

URP_OK               0

URP_EXCEPTION        4

URP_INVALID          8

URP_DISASTER         12

URP_OK_LOOP          16

 

In case of a response code not equal to URP_OK, a reason code may be supplied in wbra_reason:

URP_RESOURCE_TOO_SHORT         1

URP_FIRST_SLASH_MISSING 2

URP_CONV_NAME_INVALID         4

URP_TRAN_NAME_INVALID         5

URP_SERV_NAME_INVALID         6

URP_USER_TOKEN_INVALID         7

URP_SERVER_NAME_MISSING 8