bdfs1m0sStructured Programming Macros

#CONP-Convert Binary to Character Hexadecimal with EBCDIC Interpretation

Use this macro to generate inline code to convert binary data to character hexadecimal. A character hexadecimal number is a hexadecimal number represented in a string that contains only EBCDIC 0-9 and A-F.

The data is converted to character hexadecimal unless it is a binary value corresponding to the EBCDIC characters A-Z and 0-9. The corresponding hexadecimal values are as follows:

Hexadecimal Value
EBCDIC Value
 X'C1'-X'C9' 
A-I
 X'D1'-X'D9' 
J-R
 X'E2'-X'E9' 
S-Z
 X'F0'-X'F9' 
0-9

A fill character is inserted in the output string to differentiate between these characters and the hexadecimal characters (see the FILLCHR parameter).

Note:
See Table 1 for a summary of all the conversion macros.

Format




Notes:

  1. If you do not specify the LENGTH parameter, the length defaults to 1 character.

INPUT=reg1
specifies a register, reg1, that points to the start of the string to convert.

TO=reg2
specifies a register, reg2, that points to the location that will contain the converted value.

LENGTH=reg3
specifies a register, reg3, that contains the number of characters to convert.

FILLCHR=fill
specifies the character that pads the converted output, where fill is the character specified as an immediate value.

For example, FILLCHR=C'.' specifies a '.' for the fill character. The string X'C1C2FFC4' is converted to C'.A.BFF.D'.

Entry Requirements

None.

Return Conditions

Programming Considerations

Examples

Related Macros

#CONX-Convert Binary to Character Hexadecimal.