DBCS to alphanumeric data conversion (IGZCD2A)
The Language Environment® IGZCD2A routine converts pure DBCS data to alphanumeric data that can contain double-byte characters.
IGZCD2A syntax
To use the IGZCD2A service routine, pass the following four
parameters to the routine using the CALL
statement:
- parameter-1
- The sending field for the conversion, handled as a DBCS data item.
- parameter-2
- The receiving field for the conversion, handled as an alphanumeric data item.
- 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. - 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. Shift codes count as 1 byte each.
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 to the conversion routine. Otherwise, results are unpredictable.
- When creating parameter-2 from parameter-1, IGZCD2A makes these changes:
- Inserts shift codes around DBCS characters that do not correspond to single-byte EBCDIC characters
- Converts DBCS characters to single-byte characters when the DBCS characters correspond to single-byte EBCDIC characters
- Converts the DBCS space (X'4040') to a single-byte space (X'40')
- IGZCD2A does not change the contents of parameter-1, parameter-3, or parameter-4.
- If the converted data contains double-byte characters, shift codes are counted in the length of parameter-2.
- The valid range for the contents of parameter-3 and for the contents of parameter-4 is 1 to 134,217,727.