ASCII2HEX converts binary data to its hexadecimal format. This routine is the inverse of the HEX2ASCII routine.
CALL "ASCII2HEX" USING ASCII-VALUE, HEX-VALUE
ASCII-VALUE PIC X(2) | The input data area containing the ASCII representation of a unit of data. |
HEX-VALUE PIC X(4) | The output data area to contain the hexadecimal value. |
When you define the parameters, use the exact field sizes specified in the calling conventions above, otherwise the runtime may terminate abnormally.