bdfs1m0q | Structured Programming Macros |
Use this macro to generate inline code to convert a binary number to character decimal with leading zeros.
Format
|
Entry Requirements
None.
Return Conditions
Programming Considerations
Before the conversion: |
R14 contains X'0000F394'. R15 points to EBW000. The length is 8. |
After the conversion: |
R14 is unchanged. EBW000 contains C'00062356'. R15 points to EBW000+8. |
L R14,COND1 SET UP BINARY VALUE LA R15,EBW000 WHERE TO PLACE #COND INPUT=R14,TO=R15,LENGTH=8 BINARY TO EBCDIC : COND1 DC X'0000F394' BINARY VALUE (DEC 62356)
Before the conversion: |
R14 contains X'0000F394'. R15 points to EBW020. The length is 5. |
After the conversion: |
R14 is unchanged. EBW020 contains C'62356'. R15 points to EBW020+5. |
L R14,COND2 SET UP BINARY VALUE LA R15,EBW020 WHERE TO PLACE #COND INPUT=R14,TO=R15,LENGTH=5 BINARY TO EBCDIC : COND2 DC X'0000F394' BINARY VALUE (DEC 62356)
Before the conversion: |
R14 contains F'355'. R15 points to EBW040. The length is 2. |
After the conversion: |
R14 is unchanged. EBW040 contains C'55'. R15 points to EBW040+2. |
L R14,COND3 SET UP BINARY VALUE LA R15,EBW040 WHERE TO PLACE #COND INPUT=R14,LENGTH=2,TO=R15 BINARY TO EBCDIC : COND3 DC F'355' BINARY VALUE
Related Macros
#CONS-Convert Binary to Character Decimal with Zero Suppression.