Alphanumeric to DBCS data conversion (IGZCA2D)
The Language Environment® IGZCA2D service routine converts alphanumeric data that contains double-byte characters to pure DBCS data.
IGZCA2D syntax
To use the IGZCA2D service routine, pass the following four
parameters to the routine by using the CALL
statement:
- parameter-1
- The sending field for the conversion, handled as an alphanumeric data item.
- parameter-2
- The receiving field for the conversion, handled as a DBCS data
item.
You cannot use reference modification with parameter-2.
- parameter-3
- The number of bytes in parameter-1 to be converted.
It can be the
LENGTH OF
special register of parameter-1, or a 4-byteUSAGE IS BINARY
data item containing the number of bytes of parameter-1 to be converted. Shift codes count as 1 byte each. - parameter-4
- The number of bytes in parameter-2 that will receive the converted data.
It can be the
LENGTH OF
special register of parameter-2, or a 4-byteUSAGE IS BINARY
data item containing the number of bytes of parameter-2 to receive the converted data.
Usage notes
- You can pass parameter-1, parameter-3, and parameter-4 to the routine
BY REFERENCE
orBY CONTENT
, but you must pass parameter-2BY REFERENCE
. - The compiler does not perform syntax checking on these
parameters. Ensure that the parameters are correctly set and passed
in the
CALL
statement to the conversion routine. Otherwise, results are unpredictable. - When creating parameter-2 from parameter-1, IGZCA2D makes these changes:
- Removes the shift codes, leaving the DBCS data unchanged
- Converts the single-byte (nonspace) EBCDIC character X'nn' to a character represented by X'42nn'
- Converts the single-byte space (X'40') to DBCS space (X'4040'), instead of X'4240'
- IGZCA2D does not change the contents of parameter-1, parameter-3, or parameter-4.
- The valid range for the contents of parameter-3 and for the contents of parameter-4 is 1 to 134,217,727.