z/OS TSO/E REXX Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


C2X (Character to Hexadecimal)

z/OS TSO/E REXX Reference
SA32-0972-00

Read syntax diagramSkip visual syntax diagram
>>-C2X(string)-------------------------------------------------><

returns a string, in character format, that represents string converted to hexadecimal. The returned string contains twice as many bytes as the input string. For example, on an EBCDIC system, C2X(1) returns F1 because the EBCDIC representation of the character 1 is 'F1'X.

The string returned uses uppercase alphabetics for the values AF and does not include blanks. The string can be of any length. If string is null, returns a null string.

Here are some examples:
C2X('72s')      ->    'F7F2A2' /* 'C6F7C6F2C1F2'X in EBCDIC */
C2X('0123'X)    ->    '0123'   /* 'F0F1F2F3'X     in EBCDIC */

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014