Form Definition File
The 4GL form definition file contains formatting information for an application program form. The form compiler (scrgen) converts the form definition to the specific requirements of your server platform. scrgen writes information from the form definition file to the TranMap file in a coded format. The user interface uses this information to edit, format, and display form data.
If you run scrgen with the -s option, it also creates a form definition (SD) library for each application form program. This is a 4GL working storage library that contains the definitions of the data variables on the form. The application program uses this library. scrgen ensures that this library matches the data in the form definition file.
scrgen edits the form definition file for errors before making changes to the TranMap or the form definition library.
The name for a form definition file has the format
$LAWDIR/productline/systemcodesrc/programcode.scr
For example, GL20 is a program in the GL system and the lawapp9 product line. The GL20 form definition file is
$LAWDIR/lawapp9/glsrc/GL20.scr
Each online program has one form definition source file. An online program can have up to nine forms. Each form in an online program has a separate form definition in the form definition source file. For example, a program with nine forms has one form definition source file that includes nine form definitions.
A form definition has four sections, which must appear in the order listed in the table below. In addition, some of these sections are defined with command pairs (for example, $SCREEN and $END-SCR). Paired commands have intermediate data specifications that are also in a fixed format.
For the formats for these data specifications, see the description of each command pair.
Section | Req'd? | Command pair? | Definition |
---|---|---|---|
Form processing commands | Yes | No | Commands for processing form information based on the action chosen by the user. For more information, see Form Processing Commands. |
Form Definition | Yes | Yes |
The form definition, or layout, that determines how the data is presented on the form. For more information, see Form Definition. In the form definition section, you can add graphical elements or form tabs to enhance the usability of the form. For more information, see Defining Graphical Elements and Form Tabs. |
Transaction Data | Yes | Yes | Commands that define attributes for each data field on the form. For more information, see Transaction Data Section. |
Data edits | No | Yes | A list of default and valid values for input fields on the form, including translation values for fields that have translations. For more information, see Data Edits. |