FILEMGMT overview

From m204wiki
Revision as of 21:32, 28 March 2013 by Rob (talk | contribs)
Jump to navigation Jump to search

Overview

You must have Dictionary/204 and its subsystems running in order to use FILEMGMT.

The Dictionary/204 File Management Subsystem facility, FILEMGMT, is a full-screen interface to Model 204 file management. The facility enables you to create Model 204 files quickly, reliably, and securely. You define a file and its contents on the series of screens that FILEMGMT provides. FILEMGMT uses your definitions to:

  • Construct the Model 204 commands that create the physical file
  • Store the appropriate entries in your installation's dictionary

By combining the two operations, FILEMGMT eliminates the need to enter this information twice. FILEMGMT validates the information for accuracy and consistency, and it creates and stores all necessary dictionary entries and references.

FILEMGMT does more than create new files. You can use the facility to:

  • View existing file data
  • Reset file parameters
  • Add fields, records, and field groups to existing files
  • Calculate and change the size of a file
  • Copy files, fields, and records

To use this facility, you need file management privileges and the appropriate Model 204 privileges. Creating a new Model 204 file requires login account privileges that include superuser privileges. Changing an existing file requires a Model 204 password indicating that you have the necessary update privileges for the file.

This chapter assumes you have an understanding of Model 204 file management. The Rocket Model 204 File Manager's Guide provides an explanation of the Model 204 parameters discussed in this chapter.

FILEMGMT maintenance functions

FILEMGMT consists of the following maintenance functions:

  • File maintenance
  • Field maintenance
  • Record maintenance
  • Field group maintenance

These maintenance functions let you define FILE, FIELD, RECORD, and FIELD GROUP entries, as well as modify and delete these entries. The facility also creates the actual files, fields, records, and field groups that correspond to the dictionary entries that you have defined or modified.

Each maintenance function has its own full-screen interface that you can select from the FILEMGMT primary screen. Using the facility screens you can specify the characteristics and relationships of your files, fields, records, and field groups. The FILEMGMT facility also sizes files automatically based on information you provide about file characteristics. The section File sizing overview explains in more detail how file sizing works.

FILEMGMT and command execution

After you have defined the characteristics and relationships of an entry, FILEMGMT stages your entry for the specified commands. The commands can be executed in one of four active or inactive modes, depending upon the execution options that are supported at your installation. Your dictionary administrator selects a default mode, but you can override that selection with another supported option. The section Dictionary/204 and staging explains the execution options in detail.

When the commands are executed, FILEMGMT creates the file, field, record, or field group as you have defined it. The facility also creates the corresponding (nonstaged) dictionary entry. The section Staging entries explains staged and nonstaged entries.

If it becomes necessary to modify an existing file, FILEMGMT locks all the file, field, record, and field group definitions for that file to protect the integrity of the dictionary data. The section File locking explains file locking.

Staging entries

FILEMGMT coordinates these general activities:

  • Construction and execution of Model 204 commands
  • Storage of entries in your installation's dictionary

The activities can be completed in a single FILEMGMT session or can be performed across multiple sessions. A dictionary entry containing your specifications is staged until all commands pertaining to the entry are executed. The entry is described as existing once execution is completed.

Some FILEMGMT functions let you operate on staged entries; others do not. The following descriptions of the FILEMGMT screens specify the circumstances under which you can redefine, delete, and rename staged entries.

Dictionary/204 and staging

Internally, Dictionary/204 manages staging by supporting two copies of every dictionary entry affected by your request. For example, if you are performing a file recreate, your request might affect entries of the following entity types in your installation's dictionary:

FILE FIELD RECORD FIELD GROUP

Copies of these entries exist until your commands have been executed. The copies have the entity types of:

STAGED FILE STAGED FIELD STAGED RECORD STAGED FIELD GROUP

The two copies are identical except that the staged version contains:

COMMAND attribute Specifies the command to be generated
COMMAND STATE attribute Indicates the status of the command

A file create request, unlike a file recreate, has only staged entries.

FILEMGMT copies an existing (or nonstaged) entry to a staged entry when you initiate a change to a file, field, record, or field group. When all relevant commands have been executed, FILEMGMT copies the staged entry to a nonstaged entry by deleting the nonstaged entry and renaming the staged entry as nonstaged.

Executing commands

FILEMGMT constructs Model 204 commands from the information you enter. The commands, when executed, perform the functions you requested from the primary screen.

The execution of a command depends upon the following factors:

  • Completeness of the request for a FILEMGMT function

    For example, a file create function is not complete when you finish entering a file description, because the file must be sized. FILEMGMT must complete the description to construct the Model 204 commands that perform the create operation.

    Until your request is completely specified, and until the commands constructed from the request have actually been executed, your request is considered to be staged.

    To execute the commands, you advance to the Execute Commands screen, select the Model 204 commands that are waiting to be executed, and press the PF6 (EXEcute) key.

  • Execution option you select

    When Dictionary/204 is installed, the dictionary administrator determines which execution options are available to FILEMGMT users and which one is the default option. The execution option determines how staged Model 204 commands are executed on the Execute Commands screen.

    The execution options are:

  • Active immediate
  • Active delayed
  • Inactive with commands written to a procedure file
  • Inactive with commands written to a directed output file

Dictionary/204 provides an option for requiring that all commands against files be executed through the FILEMGMT interface.

Execution options

The options provided by FILEMGMT are listed in the following table. They are more fully described again in the section "Execute Commands screen".

Note

If you select Inactive mode, then the Dictionary/204 files are updated, but not the physical files.

Option Commands selected on the Execute Commands screen are...
Active immediate Executed as soon as FILEMGMT verifies that you have the necessary privileges to execute the commands.
Active delayed

Updated as pending and are executed at a later time in batch mode. FILEMGMT verifies that you have the necessary privileges to execute the commands before it flags them as pending.

Consult the Rocket Model 204 Installation Guide for your operating system for information about the JCL or CCAIN statements you need to include for a batch run.

Inactive USE file

Not executed. Instead, they are generated and written to a directed output USE file. You specify the name of this file on the Execute Commands screen. OUTFILE is the default if you do not specify a file name.

A default USE file can be defined by the dictionary administrator in the Facility Administration feature of the Dictionary Administration facility or obtained from the user's ACCOUNT entry.

The section Execute Commands screen describes the JCL you need to include for the USE file.

Inactive procedure file

Not executed. Instead, they are generated and written to a procedure file. You specify the name of the procedure file and its password (if any) on the Execute Commands screen.

The dictionary administrator can define a default procedure file in the Facility Administration feature of the Dictionary Administration facility.

File locking

FILEMGMT provides a file locking capability to control file access and enhance data integrity. While you are creating a file or making any changes to the file definition, the file lock prevents other users from changing the file's:

  • Definitions
  • Fields, records, and field groups
  • Parameters and other characteristics

The file lock is maintained until you release the file by either executing or deleting the commands that FILEMGMT constructed. Your work can span multiple FILEMGMT sessions, if desired. Dictionary/204 maintains the file lock across sessions by keeping track of the account name. Only users who log in with the appropriate account name have access to the file.

FILEMGMT screens

Like all Dictionary/204 facilities, FILEMGMT provides a series of screens that let you select functions, view stored information, and enter new information. Specifically, FILEMGMT screens:

  • Prompt for information such as file options and parameters. Defaults are provided, so that you need enter only the information that differs from the defaults.
  • Enable you to select a function from the screen or proceed to another screen using one of the following methods:
  • Press a PF key
  • Enter a command at the prompt (===>) on the screen's command line.

    You can press Enter on any screen; the screen is redisplayed with the changes you specified. To update the dictionary, however, you must use a PF key or enter a command.

  • Enable you to invoke HELP text for the screen. To invoke HELP text, press the PF1 key or type "HELp" on the command line.
  • Flag error conditions and display error messages. FILEMGMT identifies errors in your entries by a less than (< ) sign in the right margin. Press Enter to view the messages associated with these errors. If you have only one error, the error message is displayed on the screen's message line below the command line.
  • Provide a menu from which you make your selection for a file management function. This menu is referred to in this chapter as the primary screen.

Logging on to FILEMGMT

The FILEMGMT subsystem must be started before you can use the following methods to log on to the FILEMGMT facility. If the subsystem has not been started, contact your dictionary administrator.

To log on to the FILEMGMT facility, you choose one of the following methods:

  • Select the File Management option from the Dictionary /204 main menu.

Note

The absence of the File Management option from your main menu means you are not authorized to use this facility.

  • Invoke FILEMGMT from the primary screen of another Dictionary/204 or Workshop/204 facility by issuing the INVOKE command. The command syntax is:

    INVoke FILEMGMT

  • Call the FILEMGMT subsystem from the Model 204 command prompt by typing the subsystem name:

    > FILEMGMT

FILEMGMT primary screen

The FILEMGMT primary screen is displayed when you log on to FILEMGMT:

DICTIONARY FILE MANAGEMENT VER 6 REL 1 Filename: Enter option number in one prefix area _ File _ Field _ Record _ Field Group _________________________ __________ __________ ______________ 1 CREATE 7 INCREASE 1 DEFINE 1 Define 1 Define 2 RESET 8 DECREASE 2 REDEFINE 2 Redefine 2 Redefine 3 Delete 9 SECURE 3 DELETE 3 Delete 3 Delete 4 ReCREATE 10 DESECURE 4 RENAME 4 Rename 4 Rename 5 Copy 11 INITIALIZE 5 Copy 5 Copy 6 Size Field, Record or Field Group Name: ===> 1=HELp 2=DOCument 3=QUIt 4= 5= 6=COMmands 7= 8= 9=DELcmds 10= 11= 12=

Capitalized function names refer to actual Model 204 commands (for example, CREATE, DECREASE). Function names in mixed case refer to functions that FILEMGMT performs upon dictionary entries only.

You can select a maintenance function from these categories:

FILE Maintenance Creates a new Model 204 file, determines the size of a file, recreates or modifies the parameters of an existing file, deletes or copies a file, and performs other file maintenance functions.
FIELD Maintenance Defines fields for a new or existing file, changes existing field names or attributes, and performs other field maintenance functions.
RECORD Maintenance Defines records for a new or existing file, changes existing record names or characteristics, and performs other record maintenance functions.
FIELD GROUP Maintenance Defines field groups for a new or existing file, changes existing field group names or contents, and performs other field group maintenance functions.

FILEMGMT functions

This section presents an overview of FILEMGMT functions. All functions can be selected from the primary screen. The functions are described in detail in the rest of this chapter.

File maintenance

Number Function Meaning
1 CREATE Adds a new Model 204 file. Proceeds to the File Definition - Organization screen.
2 RESET Changes the values of file parameters. Proceeds to the File Parameter Reset screen.
3 Delete Removes a file with its field, record, and field group entries from the dictionary. Proceeds to the File Delete screen.
4 ReCREATE Recreates a Model 204 file in order to reorganize the file. Proceeds to the File Definition - Organization screen.
5 Copy Copies a file and optionally its record and field definitions. Proceeds to the Copy screen for files.
6 Size Sizes a file. Proceeds to the File Size Definition screen.
7 INCREASE Increases the file table sizes of an existing file. Proceeds to the File Increase/Decrease screen.
8 DECREASE Decreases the file table sizes of an existing file. Proceeds to the File Increase/Decrease screen.
9 SECURE Secures the file.
10 DESECURE Desecures the file.
11 INITIALIZE Initializes an existing file. Proceeds to the File Initialize screen.

FIELD maintenance

Number Function Meaning
1 DEFINE Defines a new field in the file. If no field name is specified, proceeds to the Field Name List screen. If a field name is specified, proceeds to the Field Attributes screen.
2 REDEFINE Changes a field definition. If no field name is specified, proceeds to the Field Name List screen. If a field name is specified, proceeds to the Field Attributes screen.
3 DELETE Deletes a field, proceeds to the Field Attributes screen.
4 RENAME Renames a field, proceeds to the Field Attributes screen.
5 Copy Copies a field; if no field name is specified, copies all fields in the file. Proceeds to the Copy screen.

RECORD maintenance

Number Function Meaning
1 Define Defines a new record in the file. Proceeds to the Record Name List screen.
2 Redefine Changes a record definition. Proceeds to the Record Name List screen.
3 Delete Deletes a record. Proceeds to the Record Name List screen.
4 Rename Renames a record. Proceeds to the Record Name List screen.
5 Copy Copies a record if no record name is specified, copies all records in the file. Proceeds to the Copy screen.

FIELD GROUP maintenance

Number Function Meaning
1 Define Defines a new field group in the file. Proceeds to the Field Group List screen.
2 Redefine Changes a field group definition. Proceeds to the Field Group List screen.
3 Delete Deletes a field group. Proceeds to the Field Group List screen.
4 Rename Renames a field group. Proceeds to the Field Group List screen.

WARNING messages

FILEMGMT might generate WARNING messages when you store dictionary data. WARNING messages are informational messages. They indicate potential user errors, although the errors usually do not cancel Dictionary/204 processing.

Assume, for example, that Access/204 is installed at your site and you define a field without entering a MAX OCCURS value, which is required by Access/204. FILEMGMT warns you that the value is missing by issuing the following message, but nevertheless allows you to store the field definition:

FIM472 WARN: MAX OCCURS is null. Used by ACCESS.

You can choose to either continue processing despite a potential error by pressing the appropriate PF key again, or supply a missing value or otherwise correct the error before you reissue the command.

Widen screen

FILEMGMT provides a Widen screen, which enables you to enter or display names that do not fit on other FILEMGMT screens. The names might belong to:

  • Fields, including sort keys, hash keys, record security keys, and record identifying fields
  • Records or record types
  • Field groups

The names have a maximum length of 70 characters.

Widening the screen

To use the Widen screen from any of the FILEMGMT screens that support the WIDen command:

  1. Position the cursor on the name you want to widen.
  2. Press PF5. FILEMGMT displays the Widen screen.
  3. Type additional characters for the entry if you choose.
  4. Press PF12 to enter the new name and return to the previous screen.

The record name is displayed in its truncated form on the Record Name List screen. To view the complete record name, request the Widen screen again.

If using the WIDen command to view an entry-protected name or value that you cannot alter, press PF3 (QUIt) to return to the previous screen.