After you have committed your new file definition, the File Definition Menu (Create) is displayed for you to select the fields which make up the record layout.
Before you can do this, your fields must have been defined using the procedures described in Building the LANSA Repository - Fields.
1. Select the Define fields in file definition option and press Enter.
pppFILREV File Definition Menu (Create) Enter number of function or place cursor on same line and press Enter. 1 1. Define fields in file definition
F1=Help F3=Exit F12=Cancel F14=Messages |
The Display Fields in File Definition screen is presented.
DC@P200501 Display Field Definition File : FileName Library File Description (Language) Primary
F1=Help F3=Exit F6=Add/Create F12=Cancel F4=Messages |
As this is a new file, there are no fields displayed.
2. Select F6 (Add/Create) and the Add Field Definition screen is displayed.
DC@P200501 Add Field Definition File : FileName Library File Description (Language) Primary File FileName from Library currently has no fields defined in it. F1=Help F3=Exit F12=Cancel F4=Messages |
3. You can choose to either:
or
If you choose to enter the field names, LANSA will attempt to find the matching field details. If a name that you have entered happens to be a partial name of another field, all the other fields containing the partial name will be displayed with a message telling you what has been displayed.
To request a list of fields to choose from, in Name, enter:
DEM has been used as the partial name in this example:
DC@P800501 Select Field from Data Dictionary Either Choose field required from list below, Sel Field Description Typ Len Dec
|
Select the fields for the file by entering a sequence number in the Sel column. If you want different fields listed, use the Page Down key or re-enter the selection criteria.
The fields you select are displayed immediately in the top half of the screen.
DC@P800501 Select Field from Data Dictionary Type option, press enter 4=Delete from current list
F1=Help F12=Cancel F14=Messages |
Continue selecting fields until you have selected all the fields that are required for the file.
Press Enter when you have completed your selection.
4. The Display Field Definition screen is now displayed with a list of your selected fields:
DC@P200501 Display Field Definition File : File Name Library File Name (Language) Primary
|
5. Nominate the key fields by adding a sequence number in the Key Order column.
You can delete fields from this list or change the sequence. If you have duplicated a sequence number, the fields will be sorted alphabetically within the sequence number.
6. Press Enter when you have completed the list. The File Definition Menu (Review) is displayed.
Go to Step 3. Review the Definition.