Restriction: This topic applies only when the AppMaster Builder AddPack has been installed, and applies only to Windows platforms.
The following are examples of Customizer Rules:
Example - Invoking Rules The following example shows two sample user rules - $CONSTRUCT-FD and $DAYDEF - and how a program invokes and uses them.
To illustrate how AMB processes rules, we show the program at the following two stages of generation.
Example - % IF Structure The % IF structure builds a program that tests records for any specific character and replaces some occurrences of it with
any other specific character, depending on the character mode, for example, whether the character appears as a leading or
trailing character, or anywhere. The variables that control the record length and what you search and replace, appear at the
top of the program. Thus, you can reuse this rule for different purposes simply by changing the values of a few variables.
Example - Looping This program calls two user rules that create a data structure with loops. A loop that incorporates built-in functions returns
a value to text.
Example - MFG Structures This examples shows a Customizer rule written with several MFG structures.
Example - Program Location Statements This example illustrates program location statements and in-line rules. In addition to showing rules, program input, and Customizer
output, this example goes a step further and shows the program after AMB precompiler processing.
Example - Rule Compilation Report The appearance of OPEN_CODE in the report refers to the outermost level of code within a file of rules, such as code outside
of any % DEFINEs or % SUBMEMBERs.