AMT-COBOL Screen Layout
DPS-2200
In DPS-2200 the form layout is created with the help of the design program FORGEN. This program creates both the layout of the Form on the Terminal and the screen buffer structure needed exchange information between the Form and the Program that handles the Form (the screen Working Storage).
However in AMT-COBOL the form layout is created with the program AMT Developer Studio. This program creates a Graphical Form Layout, but does not create the necessary screen Working Storage automatically. This has to be created manually following the DPS-2200 documentation
For DPS-2200 the Screen Working Storage is divided in three major parts:
- the Form Header Area, containing general information to use for the Form.
- the Field Control Area, containing information on each displayed field in the layout for input/output or for output only.
- the Field Data Area, containing the values of the displayed Fields both for input and output.
Naming Forms in AMT-COBOL
In AMT-COBOL the name of always needs to be in accordance with the format FORM-<Formname>-<Formnumber>. The Form name can be any unique name with a maximum of 8 characters. And each form has a unique form number of three digits from 000 to 999. E.g. FORM-START-000 for the initial form to display at startup.
Form Layout
In AMT-COBOL the form layout is created in the AMT Developer Studio, an example is shown below.
The field items and their properties can be found in the item list as shown in the next figure. The
needed Field Control Area and Field Data Area can be created from this list.
Fields that need entries in the Screen Working Storage
Only Fields that are used for output (Labels), input (Button groups) or input/output (Editboxes and Memoboxes) need to be added to the FCA and FDA. Other Fields and Contols like Panels and Labels with static content defined in the layout, can be left out of the FCA and FDA.
Field names
In theory the choosing of field names is completely free. But to make use of the Screen Copy Wizard and to let the AMT Generator auto configure the form-to-ws and ws-to-form sections there are a few restrictions.
- The Screen Copy Wizard makes a
distinction between input/output fields like editboxes and static fields like fixed labels and panels (static
fields are not needed in the Screen Working Storage). The Screen Copy Wizard will only
incorporate fields starting with the lettern 'S' or 's' as input/output fields. All other fieldnames will be
ignored by Wizard.
Best practice is then also to let the screen number directly follow the letter S. So the editbox 'FIRSTNAME' in screen with number 1 (<Formname>-001) should be named 'S1-FIRSTNAME'. - To let the AMT Generator automatically configure the form-to-ws and ws-to-form sections, the names used in the Screen Working Storage should be exactly the same as the fieldnames. The Screen Copy Wizard will do this automatically. But when configuring the Screen Copy by hand this should be taken into consideration.
Creating the Screen Working Storage
The easiest way to create the Screen Working Storage is to use the provided Screen Copy Wizard.
How to add the needed information for the layout and fields in the Screen Working Storage manually is explained in the pages Form Header Area, Field Control Area and Field Data Area.