Adding record definitions with FILEMGMT: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (Rob moved page Adding Records with FILEMGMT to Adding Record Definitions with FILEMGMT: The term 'adding records' is used inconsistently... here it only refers to defining the set of fields in a record. On the 'adding... manually' page it discu...)
(Automatically generated page update)
Line 388: Line 388:


[[Category:File manager]]
[[Category:File manager]]
[[Category:File Management]]
[[Category:File management]]
[[Category:FILEMGMT Application Subsystem]]
[[Category:FILEMGMT Application Subsystem]]

Revision as of 14:12, 18 April 2013

Record maintenance

FILEMGMT provides you with an interface for performing all your record maintenance operations. This section describes how to perform the following operations:

  • List records in new and existing files.
  • Select the records you want to define, redefine, delete, and rename.
  • Define and redefine records.
  • Stage records in preparation for executing DEFINE, REDEFINE, DELETE, and RENAME commands.

Record Name List screen

To display the Record Name List screen, you can optionally:

  • Press the PF4 (RECords) key from the Field Attributes screen. FILEMGMT displays the Record Name List screen in DEFINE mode.
  • Select a RECORD Maintenance function from the primary screen. FILEMGMT displays the Record Name List screen in the mode corresponding to the selected function.

You use the Record Name List screen to:

  • Specify the names and frequency of the records in a file you are creating. A record name represents a record type.
  • View records in an existing file, define additional records, and select records you want to redefine, delete, or rename.

If you are defining new records for a new or existing file, FILEMGMT displays the Record Name List screen in DEFINE mode:

FILEMGMT Record Name List Line 1 of 11 Enter and Select with an 'X' those records you want to DEFINE Filename: PERSONNL | | No. of | Expected | Occurrence | | Recordname | Records | Increase (%) | in File | Cmd --------------------------------------------------------------------------- X PERSONNL | ________ | _______ | 100.0% | *** _ ____________________ | ________ | _______ | | _ ____________________ | ________ | _______ | | _ ____________________ | ________ | _______ | | _ ____________________ | ________ | _______ | | _ ____________________ | ________ | _______ | | _ ____________________ | ________ | _______ | | _ ____________________ | ________ | _______ | | _ ____________________ | ________ | _______ | | _ ____________________ | ________ | _______ | | _ ____________________ | ________ | _______ | | _ ____________________ | ________ | _______ | | ===> 1=HELp 2=DOCument 3=QUIt 4=FIElds 5=WIDen 6=COMmands 7= 8=FORward 9=SIZe 10= 11=RECdefn 12=END

 

The above record name list has an entry for a record name with the same name as the file. FILEMGMT creates this entry automatically.

You can perform these operations:

  • Rename the entry by typing over the displayed name.
  • Type additional record names, one record per line.
  • Specify for each record name the number of records and expected increase to the number of records. ("No. of Records" is required input.)
  • Proceed to the Record Definition screen to define the contents of the new entries.

If you are redefining, deleting, or renaming records, FILEMGMT displays the Record Name List screen in the mode corresponding to your requested function.

The following screen was invoked by selecting the REDEFINE function:

FILEMGMT Record Name List Line 1 of 2 Select the records you want to REDEFINE with an 'X' Filename: PERSONNL | | No. of | Expected | Occurrence | | Recordname | Records | Increase (%) | in File | Cmd ---------------------------------------------------------------------------- _ EMPLOYEE | _1000___ | _______ | 29.4% | *** _ DEPENDENTS________ | _2000___ | __20___ | 70.6% | ===> 1=HELp 2=DOCument 3=QUIt 4=FIElds 5=WIDen 6=COMmands 7= 8= 9=SIZe 10= 11=RECdefn 12=END

If you specified a particular record name on the primary screen, FILEMGMT displays an X in the prefix area of this record.

Staged records display the command for which they are staged in the Cmd column. Nonstaged records have a blank in the Cmd column, as in the above screen. Staging is discussed in Staging entries.

You can scroll forward and backward to view additional record names by pressing the PF8 (FORward) and PF7 (BACkward) keys. You can scroll forward 100 lines, which corresponds to FILEMGMT's record number limit.

Record 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.
Recordname

If you are creating a new file, FILEMGMT displays a single record name that is the same as the file name.

If you are viewing an existing file and did not specify a particular record name on the primary screen, FILEMGMT lists all the records in the file.

Follow these steps to stage records for a particular function.

To DEFINE records:

Enter the record names in the "Recordname" column.

To enter new record names, type in the names (1-70 characters). Use the standard Model 204 record naming conventions described in the Rocket Model 204 File Manager's Guide.

To enter new records for an existing file, type the names at the bottom of the list. To enter a record name that is longer than the space provided (20 characters), position the cursor on the record name. Press the PF5 (WIDen) key to advance to the Widen screen.

You can remove new names before you end the session. Type a D in the prefix area to the left of the new name. The deletion removes a line from the display, but does not affect the physical data.

  1. Type X to the left of the record names to select them.
  2. Press PF11 (RECdefn).

The Record Definition screen displays the records you selected in the order in which they are listed on the Record Name List screen. The records are staged for DEFINE.

To REDEFINE records:

Type X to the left of the record names to select them.

  1. Press PF11 (RECdefn). The Record Definition screen displays the records you selected in the order in which they are listed on the Record Name List screen. The records are staged for REDEFINE.

To DELETE records:

Type X to the left of the record names to select them.

  1. Press one of the following to stage the records for DELETE:

PF2 (DOCument) PF4 (FIElds) PF6 (COMmands) PF9 (SIZe) PF11 (RECdefn) PF12 (END)

  1. Press PF3 (QUIt) to cancel the deletion.

To RENAME records:

Type X to the left of the record names to select them.

  1. Type over the existing names. Press the PF5 (WIDen) key to enter a name that has more than 20 characters.

 

Recordname (continued)
  1. Press one of the following to stage the records for RENAME:

PF2 (DOCument) PF4 (FIElds) PF6 (COMmands) PF9 (SIZe) PF11 (RECdefn) PF12 (END)

Press PF3 (QUIt) to cancel the operation.

Cmd

Displays the status of the record shown on the line:

  • If the record is currently staged (in the process of being changed), FILEMGMT displays the command that was generated for the record. The command is one of the following:

*** Record name is new.

DEF Record is being defined.

RED Record is being read.

DEL Record is being deleted.

REN Record is being renamed.

R/R Record is being redefined and renamed.

Record operations might be staged if you begin to define, redefine, delete, or rename records and then end your FILEMGMT session without executing the commands that were generated. When you begin a new session, these records are shown as being staged.

  • If the record is not currently staged, this column is blank.
  • If a record name is added during a DEFINE operation and you press Enter, this column contains ***.

A record's Cmd status determines whether you can issue a particular command for the record. The following table summarizes your options; an X indicates the command is valid for the record.

Command Status
Command New Staged as Existing
*** DEFINE REDEFINE DELETE RENAME
DEFINE X X X        
REDEFINE       X   X X
DELETE         X   X
RENAME       X   X X

 

Prompt Response
No. of Records

Type the number of records of the specified record name to be stored in the file. For a new file, the number represents the initial number of records. Valid values are:

  • 1-16777216 for non-RDFS files
  • 1-98304 for RDFS files
Expected Increase (%) Type the expected percentage of increase (0-100) in the number of records of the specified record name. The number represents the expected increase during the life of the file. If you do not enter a number in this column, FILEMGMT uses only "No. of Records" to calculate the size of the file.
Occurrence in File FILEMGMT computes this value from "No. of Records" and "Expected Increase," and displays the value.

Record 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
PF1 HELp Displays HELP text for the Record Name List screen.
PF2 DOCument Invokes the Dictionary/204 Documentation facility. Place the cursor over the record name that you want to document and press PF2. Changes to the Record Name List screen are saved in the dictionary.
PF3 QUIt Exits from the Record Name List screen and returns to the previous screen without making any changes.
PF4 FIElds Proceeds to the Field Name List screen. This screen lists the fields in the file. Changes to the Record Name List screen are saved in the dictionary.
PF5 WIDen Proceeds to the Widen screen. This screen allows you to expand the length of the record name on the Record Name List screen and press PF5.
PF6 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 Record Name List screen are saved in the dictionary.
PF7 BACkward Scrolls backward one screen. If you type BAC at the prompt (===>), followed by a number, FILEMGMT scrolls backward the specified number of lines.
PF8 FORward Scrolls forward one screen. If you type FOR at the prompt (===>), followed by the number, FILEMGMT scrolls forward the specified number of lines.
PF9 SIZe Proceeds to the File Size Definition screen. This screen displays information about the size of the file. Changes to the Record Name List screen are saved in the dictionary.
PF11 RECdefn

Proceeds to the Record Definition screen. This screen defines the records you just selected from the list. Changes to the Record Name List screen are saved in the dictionary.

When you return from the Record Definition screen, the Xs you originally entered on the Record Name List screen are removed from the prefix area of records that were processed by pressing PF11 (NEXtrec), or PF12 (END) on the Record Definition screen. An X remains in the prefix area of records that were not processed.

PF12 END Exits from the Record Name List Screen and returns to the primary screen. Changes to the Record Name List screen are saved in the dictionary.

Copying records

Select the Copy Records function (number 5) from the primary screen. FILEMGMT displays the appropriate Copy screen.

You use the Copy screen to copy one or more records. The Copy can be to the same file (if just one record is copied) or to a different file. The records can be either existing or staged.

A Copy operation is performed as soon as you leave the Copy screen. The copied records are staged for the DEFINE command.

The cursor is initially positioned at the Record Name prompt.

Copy 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, and indicates whether the file is Active or Inactive.
Record Name

FILEMGMT displays the name of the record you entered on the primary screen. If you did not enter a name on the primary screen, FILEMGMT displays:

** All Records **

Copy to FILE Type the name of the existing file to which FILEMGMT is to copy the record(s). This file can be the same as the file from which the copy is made, if you are not copying all records.
New Fieldname or record on the primary screen:

If you entered a name for the New Recordname:

Type the name of the new record to which FILEMGMT is to copy the source record. The record name cannot already exist.

  1. Press PF12 (END). FILEMGMT copies the record.

If you did not enter a name for the source record on the primary screen, FILEMGMT displays the following message:

** All Records **

Do the following:

Do not type a new record name.

  1. Press PF12 (END). FILEMGMT copies all records from one file to another. The copied records have the same names as the original records, but are prefixed (qualified) by the "Copy to FILE" name.

Note

A record is not copied to the target file if the file already contains a record with an unqualified name (name without the file name prefix) that is the same as the record name in the source file. FILEMGMT displays a WARNING MESSAGE when it copies all records and finds entries with duplicate unqualified names. The WARNING MESSAGE indicates the number of records that can be copied.