Defining records with FILEMGMT

From m204wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Record Definition screen

Press the F11 (RECdefn) key from the Record Name List screen. FILEMGMT displays the following Record Definition screen.

Proceeding to this screen stages the records you specified on the Record Name List screen for the function you selected on the primary screen.

FILEMGMT Record Definition Line 1 of 7 Filename: EMPLOYEE Number of Records: 100 Staged as: DEFINE Percent Occurrence: 100.0% Table B Record Length: 53 | Recordname: | % Field | Unique | Rectype | Rectype Id | | EMPLOYEE | Occur | Id | Id | Data Value | Cmd ---------------------------------------------------------------------------- _ EMPLOYEE FIRST NAME | 100 | _ | _ | _______________| DEF _ EMPLOYEE ID | 100 | _ | _ | _______________| DEF _ EMPLOYEE INITIAL | 100 | _ | _ | _______________| DEF _ EMPLOYEE LAST NAME | 100 | _ | _ | _______________| DEF Remaining Fields _ DEPT | | | | DEF _ DIVN | | | | DEF ===> SHR010 Enter a valid command or PF key 1=HELp 2= 3=QUIt 4=FLDgroup 5=WIDen 6=COMmands 7= 8= 9=SIZe 10= 11= 12=END

You use the Record Definition screen to specify or view information about the contents of records.

FILEMGMT displays a screen for each record that you selected on the Record Name List screen, in the same order as on the Record Name List screen. You can advance to the next record by pressing the F11 (NEXtrec) key, or return to the previous record by pressing the F10 (PREvrec) key.

If you are... FILEMGMT lists...
Defining a new record All the fields in the file.
Redefining an existing record Fields that are currently in the record, and, under a Remaining Fields heading in the same column, also lists the fields in the file that are not part of the record.
Deleting or renaming an existing record All the fields in the record.

Record Definition screen input

FILEMGMT displays and/or prompts you for the following information.

Prompt Response
Filename FILEMGMT displays the name of the file that you entered on the primary screen.
Staged as The command for which the record is staged (REDEFINE, in the above screen).

Based on the command, you have the following options for changing information on the screen:

  • DEFINE/REDEFINE

    You can select or remove fields from the record. You can change any of the field attributes.

  • DELETE

    You can view but not change any information on this screen.

  • RENAME

    You can view but not change any information on this screen.

Number of Records FILEMGMT displays the number of records with the specified name. This is the number you entered in response to the No. of Records prompt on the Record Name List screen.
Percent Occurrence FILEMGMT displays the percentage of the file in which records with the specified name occur. This is the number FILEMGMT calculates and displays on the Record Name List screen as the Occurrence in File value.
Table B Record Length FILEMGMT displays the average length of the specified record name. When you press Enter, FILEMGMT recomputes the value of Table B Record Length from the length of the fields currently specified for the record. FILEMGMT displays a recomputed value each time you press Enter.
Recordname FILEMGMT displays the name of the record you entered on the Record Name List screen or the primary screen. The name is truncated if it is more than 20 characters.

If the record is staged for a DEFINE/REDEFINE command, you can:

  • Select fields from the Remaining Fields list for inclusion in the record by typing X in the prefix area to the left of the field name.
  • Deselect fields presently included in the record by typing D in the prefix area to the left of the field name.
  • Change field attributes by typing over them.

FILEMGMT rearranges the list of fields when you press Enter. Selected fields are displayed at the top of the list. Deselected fields are displayed at the bottom, under the Remaining Fields heading. You then have another opportunity to select or deselect fields before you advance to another screen.

% Field Occur Type the percentage (0-99999) of the total number of records in which this field is expected to occur, adjusting for the average number of the field's occurrences in a record. The adjustment might cause the percentage to exceed 100%.

Use this algorithm to determine the percentage:

  1. Multiply the number of records in which the field occurs by the average number of occurrences of the field in those records.
  2. Divide the product by the total number of records.
  3. Multiply the result by 100.
  4. Round off the product to the nearest integer. Use this integer as the % Field Occur value. The value may exceed 100.

For an existing record, FILEMGMT displays the current value.

FILEMGMT uses % Field Occur to calculate the Avg Record Length for the record, and the file size for the file.

Unique ID Type X if the field has a unique value in every record. You can delete an X by typing D in its place. The default is null. Used by PC/204.
Rectype ID Type X if the field is a unique record identifier field. You can delete an X by typing D in its place. The default is null. Used by PC/204.
Rectype ID Data Value Type the value of the unique record identifier field (1-70 characters). Press F5 (WIDen) to enter more than 20 characters. If you specify a value for this entry, Rectype Id must be marked with an X. The default is null.
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 is new.
    DEF Field is being defined.
    RED Field is being redefined.
    DEL Field is being deleted.
    REN Field is being renamed.
    R/R Field is being redefined and renamed.
  • If the field is not staged, this column is blank.

Record Definition 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 Record Definition screen.
F3 QUIt Exits from the Record Definition screen and returns to the Record Name List screen without making any changes to the currently displayed record.
F4 FLDgroup Proceeds to the Field Group Definition screen. This screen defines field groups for the records in the file. Changes to the current record are saved in the dictionary.
F5 WIDen Proceeds to the Widen screen. This screen allows you to expand the length of the record name, field name, or Rectype Id Data Value. Place the cursor over the name or value on the Record Definition screen, and press F5.
F6 COMmands Proceeds to the Execute Commands screen. This screen displays the staged commands that were generated for the file, and it allows you to select the commands you want to execute. Changes to the current record are saved in the dictionary.
F9 SIZe Proceeds to the File Sizing screen. Changes to the current record are saved in the dictionary.
F10 PREvrec Returns to the Record Definition screen for the previous record. Changes to the current record are saved in the dictionary.
F11 NEXtrec Proceeds to the next Record Definition screen to display the fields in the next record. Changes to the current record are saved in the dictionary.
F12 END For DEFINE and REDEFINE only. Exits from the Record Definition screen and returns to the Record Name List screen. Changes to the current record are saved in the dictionary.