Understanding Placeholders
The 10 placeholders are described below. They are presented in the order they typically appear in a dialog.
- )option
- Controls the characteristics of the panel that is displayed by the dialog. Panel characteristics include width, depth, justification, and pop-up window definitions. It also sets the syntax level of the dialog, that is, whether or not the arguments of a function must be enclosed in parentheses.
- )comment
- )comment Documents the dialog or sections of the dialog. The COMMENT section is not compiled by the Dialog Manager. Its purpose is documentation only.
- )attrs
- Defines the characters that are used in the BODY section to create fields with attributes such as color, intensity, and highlighting.
- )copy
- Defines the variables that are used in the dialog. The scope is also specified. Variables that are not defined in the DECLARE section but used in a SET statement or the BODY section are automatically assigned a scope of shared. The DECLARE section is also used to assign an alias to a variable. An alias is an alternate name for a variable that you can use only in the BODY section.
- )declare
- Defines the variables that are used in the dialog. The scope is also specified. Variables that are not defined in the DECLARE section but used in a SET statement or the BODY section are automatically assigned a scope of shared. The DECLARE section is also used to assign an alias to a variable. An alias is an alternate name for a variable that you can use only in the BODY section.
- )init
- Executes first in the dialog. This section is executed only once, even if the dialog is re-executed by a RESHOW statement within the dialog. Use the INIT section to initialize variables or to execute code that should be executed once.
- )prologue
- )prologue Executes before the BODY section is executed. The PROLOGUE section is used to execute code before displaying the panel defined in the BODY section. The PROLOGUE section executes every time the dialog is executed or re-executed by a RESHOW statement within the dialog.
- )body
- Formats the panel for display. You can design a full-screen panel or a pop-up window. The area that this section defines is referred to as the presentation space. You can design fields for input and output and use color for emphasis. The BODY section cannot contain other placeholders except for the )COPY placeholder; any other placeholder within the BODY section prevents compilation.
- )epilogue
- Executes after the BODY section is processed. The EPILOGUE section is used to interpret input from users and perform actions based on the input.
- )term
- Contains the termination code, which executes prior to the termination of the dialog. The TERM section executes after the EPILOGUE section completes. In a called dialog, the TERM section executes when control returns to the calling dialog. This section executes only once.