Mapping data between client and CICS program formats

Stabilized feature: CICS® support for Open Network Computing Remote Procedure Call (ONC RPC) is stabilized. Consider exposing and orchestrating applications as API services by using z/OS Connect Enterprise Edition or CICS web services, or by writing web applications in Java or Node.js. See also Stabilization notices and discontinued functions.

You need to map the incoming data intended for the CICS program only if it is not in the format required by the CICS program.

This is typically for the following:
  • Client data structures that contain pointers to other data. These are rebuilt by the inbound XDR routine in the same form as they existed in the client. The data for the CICS program must be copied into a single area of storage to be passed to the CICS program as its communication area.
  • CICS programs that are written in a language other than C. The incoming client request always has a C data structure. If your CICS program is written in COBOL, for example, you need to perform a C-to-COBOL mapping in Decode.

The mapping is always done by Decode for the input data for the CICS program. In most cases, the output data needs to be mapped in the opposite direction by Encode.

On input, the client data is pointed to by the Decode input field decode_client_data_ptr. Decode maps this data into the form which the CICS program requires.

To achieve the mapping, Decode must allocate an area of CICS storage, using EXEC CICS GETMAIN SHARED. Decode must set the output field decode_returned_data_ptr to the address returned by the GETMAIN command, and put the input data passed from the client into the storage, making changes where applicable.