Additional functions
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.
- Function
- Description
- Converting data
- The conversion macros allow you to convert data between data types. See Table 1 for a summary of these macros.
- Stepping functions
- The step macros (#STPC, #STPH, and so on) allow you to increment or decrement the contents of a specified location.
- Line continuation
- The line continuation macro (#) allows you to concatenate complex conditional expressions.
- Testing TPFDF return codes
- For application programs that are written for TPFDF, there are special parameters that provide a
short form method for testing the return conditions in the SW00RTN bits. These parameters allow you
to generate consistent code to test return conditions.
See TPFDF Programming Concepts and Reference for more information about testing return conditions and SW00RTN.
- Using TPF and ALCS macros
- There are parameters that allow you to use certain TPF and ALCS macros in a conditional expression.
- Changing link-label prefixes
- Some SPMs generate a link-label, which is an internal label to indicate branches in a sequential flow. These macros also have a PREFIX parameter that allows you to change the standard label prefix to improve readability.
Conversion Macros
The following table summarizes the conversion macros and provides an example of a string before and after the conversion.
| 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" |