C and C++ argument values

In C and C++, you can use any data reference of the correct data type for a data-area, data-value, or CVDA, provided the reference is to contiguous storage. In addition, for a data-value, you can use any C expression that can be converted to the correct data type.

The following table shows how to define the correct data type:

Data type C definition
Halfword binary short int
Fullword binary (including CVDA) long int
Doubleword binary long long int
Character string (n characters long) unsigned char[n]
UTF-8 character string (n bytes long) char[n]
Packed decimal Not used - see note
Note: Packed decimal arguments are not supported in C and C++. Whenever there is an option that takes such an argument, there are other options that convey or return the same information in a format supported by C and C++.

Pointer-reference and pointer-value arguments can be any C or C++ pointer-reference, and pointer-values can also be any C or C++ expression that can be converted to an address.

CICS calling sequences pass arguments by reference (the MVS convention), rather than by value (the C convention). Ordinarily, the translator makes the necessary adjustments, but there are some situations in which you need to prefix your argument with an ampersand (&). See the C discussion in Developing C and C++ applications for details on arguments and other aspects of writing CICS programs in C and C++.