Defining file procedures with FILEMGMT

From m204wiki
Jump to navigation Jump to search

If your file includes procedures, use the File Definition - Procedure screen to specify the Model 204 file parameters that describe the procedures stored in the file.

  • If the file is a data file, just use the defaults on this screen.
  • If this is a file for storing procedures, pay close attention to the values used in calculating PDSTRPPG and PDSIZE. If you underestimate these values, the procedure dictionary may fill and prevent the adding of more procedures into the file.

File Definition - Procedure screen

Press the F8 (FORward) key from the File Definition - Security screen. FILEMGMT displays the third File Definition Screen, the Procedure screen:

FILEMGMT File Definition - Procedure Page 3 of 3 Filename: ABC Inactive MAXIMUM PROCEDURE ENTRIES/TABLE D DICTIONARY PAGE PDSTRPPG: 128 PAGES IN TABLE D PROCEDURE DICTIONARY PDSIZE: 1 NUMBER OF PROCEDURE ENTRIES Current: 0 Expected: 0 AVERAGE PAGES PER PROC Current: 1 Expected: 1 Avg Procname Length: 20 DEFAULT PROCEDURE CLASS PRCLDEF: 0 ===> 1=HELp 2= 3=QUIt 4=FIElds 5= 6=COMmands 7=BACkward 8= 9=SIZe 10= 11= 12=END

When this screen is displayed for a file for the first time, FILEMGMT shows the standard Model 204 default values for the parameters.

You can specify values for these fields:

  • NUMBER OF PROCEDURE ENTRIES (Expected)
  • AVERAGE PAGES PER PROC (Expected)
  • Avg Procname Length
  • PRCLDEF

FILEMGMT uses the field values to calculate the values of PDSTRPPG (maximum procedure entries) and PDSIZE (pages in Table D procedure directory).

For a discussion of how to select the most appropriate parameter options for your particular file, refer to Sizing the procedure dictionary.

The cursor is initially positioned at the Expected prompt for NUMBER OF PROCEDURE ENTRIES.

Procedure 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, and indicates whether the file is Active or Inactive.
MAXIMUM PROCEDURE ENTRIES/TABLE D DICTIONARY PAGE
PDSTRPPG Displays the maximum number of procedure entries on a directory page. The value is calculated from:
  • Number of procedure entries
  • Average number of pages per procedure
  • Average procedure name length

The value in this input field is entry-protected Valid values are 1-256. The default is 128 entries.

PAGES IN TABLE D PROCEDURE DICTIONARY
PDSIZE Displays the number of contiguous pages in the procedure directory. PDSIZE must be less than the value of the DSIZE parameter on the File Size Definition screen. The value is calculated from:
  • Number of procedure entries
  • Average number of pages per procedure
  • Average procedure name length

Valid values are 1-255. The default is 3 pages.

NUMBER OF PROCEDURE ENTRIES
Current FILEMGMT displays the number of procedures currently defined in the procedure directory. The value in this input field is entry-protected.
Expected Specify the number of procedures you expect to store in the file. Valid values are 0 through the number of pages allowed in Table D, and null. The default is null.
AVERAGE PAGES PER PROC
Current FILEMGMT displays the average number of pages of the procedures currently stored in the file. The value in this input field is entry-protected. The default is 1.
Expected Specify the average number of pages of the procedures you expect to store in the file. Valid values are 1 through 999999, and null. The default is 1.
Avg Procname Length Specify the average length of the procedure names stored in the file. Valid values are 1 through 255. The default is 20 characters.
DEFAULT PROCEDURE CLASS
PRCLDEF Specify the default user class for procedures, if the file is public or semipublic. Valid values are 0 through 255. The default is 0.

Procedure 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 Definition - Procedure screen.
F3 QUIt Exits from the Procedure screen and returns to the primary screen without making any changes.
F4 FIElds Stages the file for CREATE or RECREATE. Proceeds to the Field Name List screen in DEFINE mode. This screen lists the fields in the file you are creating.
F6 COMmands Stages the file for CREATE or RECREATE. 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.
F7 BACkward Proceeds to the File Definition - Security screen. This screen allows you to specify file security parameters for the file you are creating.
F9 SIZe Stages the file for CREATE or RECREATE. Proceeds to the File Size Definition screen. This screen displays information about the size of the file you are creating.
F12 END Stages the file for CREATE or RECREATE. Exits from the Procedure screen and returns to the FILEMGMT primary screen.