Defining fields with FILEMGMT
Prerequisite: Read the field naming conventions, field attributes, and field design pages.
FILEMGMT provides you with an interface to perform all your field maintenance operations. This section describes how to perform the following operations:
- List fields in new and existing files.
- Select the fields you want to define, redefine, delete, and rename.
- Define and redefine the attributes of fields.
- Stage fields in preparation for executing DEFINE, REDEFINE, DELETE, and RENAME commands.
- Copy fields and records.
Field Name List screen
To display the Field Name List screen, choose one of the following methods:
- Press the F4 (FIElds) key on a File Definition screen or the File Size Definition screen. FILEMGMT displays the File Name List screen in DEFINE mode.
- Select a Field maintenance function from the primary screen without specifying a particular field name. FILEMGMT displays the File Name List screen in the mode corresponding to the selected function.
Use the Field Name List screen to:
- Specify the names of the fields in a file you are creating.
- View fields in an existing file, define additional fields, and select fields you want to redefine, delete, and rename.
If you are defining new fields for a new or existing file, FILEMGMT displays the Field Name List screen in DEFINE mode:
FILEMGMT Field Name List Line 1 of 12 Enter and select with an 'X' the fields you want to DEFINE to the file Filename: VEHICLES | Fieldname Cmd -------------------------------------------------------------------------- X MY DATE TIME STAMP FIELD NAME CONTAINING SPACES _ ______________________________________________________________________ _ ______________________________________________________________________ _ ______________________________________________________________________ _ ______________________________________________________________________ _ ______________________________________________________________________ _ ______________________________________________________________________ _ ______________________________________________________________________ _ ______________________________________________________________________ _ ______________________________________________________________________ _ ______________________________________________________________________ _ ______________________________________________________________________ ===> 1=HELp 2=DOCument 3=QUIt 4=FILe 5= 6=COMmands 7= 8=FORward 9=RECords 10= 11=ATTributes 12=END |
In this screen, the field name list is empty, showing that no fields are defined for the file. You can type the names of fields you want to define for the file, one field per line.
If the Update Date and Time Stamp file option is set to Y
on the File Definition - Organization screen, then when you navigate to the Field Name List screen, the value from the Date Time Stamp Field Name (DTSFN) parameter is placed as the first field on the Field Name List screen.
According to the Date Time Stamp function description:
- The DTSFN field name is required for all files that use the date/time stamp feature.
- The default value for DTSFN is:
MY DATE TIME STAMP FIELD NAME CONTAINING SPACES
If you are redefining, deleting, or renaming fields, and you do not specify a particular field name on the primary screen, FILEMGMT displays the Field Name List screen in the mode corresponding to the requested function.
The following screen was invoked by selecting the REDEFINE function:
FILEMGMT Field Name List Line 1 of 4 Select the fields you want to REDEFINE with an 'X' Filename: ABC | Fieldname Cmd ----------------------------------------------------------------------- _ EMPLOYEE FIRST NAME _ EMPLOYEE ID _ EMPLOYEE INITIAL _ EMPLOYEE LAST NAME ===> 1=HELp 2=DOCument 3=QUIt 4=FILe 5= 6=COMmands 7= 8= 9=RECords 10= 11=ATTributes 12=END |
Staged fields display the command for which they are staged in the Cmd column. Nonstaged fields have a blank in the Cmd column, as in the previous screen. Staging is discussed in Staging entries.
You can scroll forward and backward to view additional field names by pressing the F8 (FORward) and F7 (BACkward) keys. You can scroll forward 4000 lines, which corresponds to the maximum number of field names in Table A of a file.
If you specified a particular field name when you selected a Define or Redefine from the primary screen, FILEMGMT does not display this screen. Instead, FILEMGMT proceeds directly to the Field Attributes screen. For Rename and Delete, you must go to this screen first before proceeding to the Field Attributes screen.
When updates on this screen are saved, the fields are displayed in sorted order when the screen is reentered.
Field Name List screen input
FILEMGMT displays or prompts you for the following information:
Prompt | Response | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Filename | FILEMGMT displays the name of the file that you entered on the primary screen. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Fieldname | If you are creating a new file for which no fields have been defined, the Fieldname lines are blank.
If you are viewing an existing file and did not specify a particular field name on the primary screen, FILEMGMT lists all the fields in the file. Follow these steps to stage fields for a particular function. To define fields:
To redefine fields:
To delete fields:
To rename fields:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Cmd | Displays the status of the field shown on the line.
If the field is currently staged, FILEMGMT displays the command that was generated for the field. The command is one of the following:
Field operations might be staged if you begin to define, redefine, delete, or rename fields and then end your FILEMGMT session without executing the commands that were generated. When you begin a new session, these fields are shown as being staged. If the field is not currently staged, this column is blank. If a field name is added during a DEFINE operation and you press Enter, this column contains three asterisks (***).
A record's Cmd status determines whether you can issue a particular command for the record. Command status, below, is a table that summarizes your options (where an Field Name List screen commandsTo issue a command, press a PF key or type a command name at the prompt (===>) and press Enter.
Retaining field names when initializing the fileThe File Initialize screen enables you to keep field definitions (using KEEPDEFS) when the file is initialized.
The File Initialize screen is displayed:
The File Initialize screen duplicates the information on the File Size Definition screen.
The screen has only one input field: Keep Field Definitions?. File Initialize screen commandsTo issue a command, press a PF key or type a command name at the prompt (===>) and press Enter.
|