Defining fields with FILEMGMT: Difference between revisions
(One intermediate revision by the same user not shown) | |||
Line 221: | Line 221: | ||
If a field name is added during a <var>DEFINE</var> operation and you press Enter, this column contains three asterisks (<b>***</b>). </p> | If a field name is added during a <var>DEFINE</var> operation and you press Enter, this column contains three asterisks (<b>***</b>). </p> | ||
<p> | <p> | ||
A record's <b>Cmd</b> status determines whether you can issue a particular command for the record. | A record's <b>Cmd</b> status determines whether you can issue a particular command for the record. The Command status table below summarizes your options (where an <code>X</code> indicates the command is valid for the record).</p> | ||
<table> | |||
<tr class="head"> | |||
<th colspan="8">Command Status</th> | |||
</tr> | |||
<tr class="head"> | |||
<th rowspan="2">Command</th> | |||
<th rowspan="2">New</th> | |||
<th colspan="5">Staged as</th> | |||
<th rowspan="2">Existing</th> | |||
</tr> | |||
<tr class="head"> | |||
<th>***</th> | |||
<th>DEFINE</th> | |||
<th>REDEFINE</th> | |||
<th>DELETE</th> | |||
<th>RENAME</th> | |||
</tr> | |||
<tr> | |||
<td>DEFINE</td> | |||
<td>X</td> | |||
<td>X</td> | |||
<td>X</td> | |||
<td> </td> | |||
<td> </td> | |||
<td> </td> | |||
<td> </td> | |||
</tr> | |||
<tr> | |||
<td>REDEFINE</td> | |||
<td> </td> | |||
<td> </td> | |||
<td> </td> | |||
<td>X</td> | |||
<td> </td> | |||
<td>X</td> | |||
<td>X</td> | |||
</tr> | |||
<tr> | |||
<td>DELETE</td> | |||
<td> </td> | |||
<td> </td> | |||
<td> </td> | |||
<td> </td> | |||
<td>X</td> | |||
<td> </td> | |||
<td>X</td> | |||
</tr> | |||
<tr> | |||
<td>RENAME</td> | |||
<td> </td> | |||
<td> </td> | |||
<td> </td> | |||
<td>X</td> | |||
<td> </td> | |||
<td>X</td> | |||
<td>X</td> | |||
</tr> | |||
</table> | |||
</td></tr> | |||
</table> | |||
====Field Name List screen commands==== | ====Field Name List screen commands==== |
Latest revision as of 21:12, 13 May 2014
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. The Command status table below summarizes your options (where an
|
Field Name List screen commands
To issue a command, press a PF key or type a command name at the prompt (===>) and press Enter.
Key | Command | Meaning |
---|---|---|
F1 | HELp | Displays Help text for the Field Name List screen. |
F2 | DOCument | Invokes the Dictionary/204 Documentation facility. Place the cursor over the field name that you want to document and press F2. Changes to the Field Name List screen are saved in the dictionary. |
F3 | QUIt | Exits from the Field Name List screen and returns to the previous screen without making any changes. |
F4 | FILe | Proceeds to the File Definition - Organization screen, if the file is new. Proceeds to the File Parameter Reset screen, if the file already exists. Changes to the Field Name List screen are saved in the dictionary. |
F6 | COMmands | Proceeds to the Execute Commands screen. This screen displays the staged commands that were generated for the file and allows you to select the commands you want to execute. Changes to the Field Name List screen are saved in the dictionary. |
F7 | BACkward | Scrolls backward one screen. If you type BAC at the prompt (===>), followed by a number, FILEMGMT scrolls backward the specified number of lines. |
F8 | FORward | Scrolls forward one screen. If you type FOR at the prompt (===>), followed by a number, FILEMGMT scrolls forward the specified number of lines. |
F9 | RECords | Proceeds to the Record Name List screen. This screen lists the records in the file. Changes to the Field Name List screen are saved in the dictionary. |
F11 | ATTributes | Proceeds to the Field Attribute screen. This screen defines attributes for the fields you just selected from the list. Changes to the Field Name List screen are saved in the dictionary.
When you return from the Field Attributes screen, the
|
F12 | END | Exits from the Field Name List screen and returns to the FILEMGMT primary screen. Changes to the Field Name List screen are saved in the dictionary. |
Retaining field names when initializing the file
The File Initialize screen enables you to keep field definitions (using KEEPDEFS) when the file is initialized.
- Enter the file name on the primary screen.
- Select the INITIALIZE command.
- Press Enter.
The File Initialize screen is displayed:
FILEMGMT File Initialize Screen FILENAME: ABC Keep Field Definitions? N Inactive FICREATE: 6.1 FILEORG: Entry Order PAGESZ: 6184 ASIZE: 3 BSIZE: 15 DSIZE: 4 ESIZE: 0 PROCS ------------ ------------ ------------ ------------ ---------- ASTRPPG: 614 BRECPPG: 256 DRESERVE: 15 % EHIGHPG: CUR: 0 ATRPG: 1 BRESERVE: 17 PDSIZE: 1 EXP: 0 FVFPG: 1 RECS: 1000 PDSTRPPG: 128 AVPG: 1 MVFPG: 1 DPGSRES: 2 CSIZE: 1 FREESIZE: Total Space Pages: 5049 DDname Dataset Name ( 1 of 1 ) Device Trks/Blks ABC M204.ABC 3390 632 ===> FIM015 Use PF3 to cancel the DELETE Command or PF6/PF12 to process 1=HELp 2= 3=QUIt 4= 5= 6=COMmands 7= 8= 9= 10= 11= 12=END |
The File Initialize screen duplicates the information on the File Size Definition screen.
The screen has only one input field: Keep Field Definitions?. N
is the default. If you change it to Y
, the INITIALIZE command is generated with the KEEPDEFS option which retains the field names when the file is initialized. After deciding whether to keep the field definitions, you can select one of the File Initialize commands in the following subsection.
File Initialize screen commands
To issue a command, press a PF key or type a command name at the prompt (===>) and press Enter.
Key | Command | Meaning |
---|---|---|
F1 | HELp | Displays Help text for the File Initialize screen. |
F3 | QUIt | Exits from the File Initialize screen and returns to the primary screen without making any changes. |
F6 | COMmands | Stages the file for INITIALIZE. Proceeds to the Execute Commands screen. This screen displays the staged commands that were generated for the file and allows you to select the commands you want to execute. |
F12 | END | Stages the file for INITIALIZE. Exits from the File Initialize screen and returns to the primary screen. |