bdfs1m0g | Structured Programming Macros |
As mentioned previously, the TPFDF SPMs provide additional functions in addition to the standard structured programming constructions. Some of these additional functions are provided through macros; others are provided through special parameters that you can use in a conditional expression for the basic SPMs (#IF, #DO, and so on).
See Structured Programming Macros Conditional Expressions for details about conditional expressions, including information about these special parameters. See TPFDF Structured Programming Macros: Reference for details about all the TPFDF SPMs.
The following briefly describes some of the additional functions available with the TPFDF SPMs.
See TPFDF Programming Concepts and Reference for more information about testing return conditions and SW00RTN.
Table 1 summarizes the conversion macros and provides an example of a string before and after the conversion.
Table 1. Conversion Macro Summary
Macro | Description | Before Conversion | After Conversion |
---|---|---|---|
#CONB | Character decimal to binary | C'12713971' | X'C1FFF3' |
#COND | Binary to character decimal | X'0000F394' | C'00062356' |
#CONH | Character hexadecimal to binary | C'12713971' | X'12713971' |
#CONP | Binary to character hexadecimal with EBCDIC interpretation | X'C1FFF3' | C' AFF 3' |
#CONS | Binary to character decimal with zero suppression | X'0000F394' | C'62356' |
#CONT | Binary to character binary | F'43' | C'00101011' |
#CONX | Binary to character hexadecimal | X'C1FFF3' | C'C1FFF3' |