The XLATE macro is used to convert the data in an area in virtual storage from ASCII code to EBCDIC code or from EBCDIC code to ASCII code.
Refer to z/OS DFSMS Using Data Sets, for the ASCII to EBCDIC and EBCDIC to ASCII conversion codes. When converting EBCDIC code to ASCII code, all EBCDIC code not having an ASCII equivalent is converted to X'1A'. When converting ASCII code to EBCDIC code, all ASCII code not having an EBCDIC equivalent is converted to X'3F'. Bit 0 is always set to 0 during EBCDIC to ASCII conversion and is expected to be 0 during ASCII to EBCDIC conversion.
The XLATE macro may be issued in 24- or 31-bit addressing mode. When issued in 31-bit addressing mode, all addresses must be valid 31-bit addresses.
The format of the XLATE macro is:
[label] |
XLATE |
area address |
---|
Return Code | Meaning |
---|---|
0 (X'00') | Success |
4 (X'04') | Zero or negative number of bytes to translate |
8 (X'08') | Invalid data address |