Defining file security with FILEMGMT

From m204wiki
Revision as of 14:12, 18 April 2013 by DmeWiccan (talk | contribs) (Automatically generated page update)
Jump to navigation Jump to search

You can define security for a Model 204 file either using the File Management Subsystem facility (FILEMGMT) or from the command line. For ease of use and to avoid errors, FILEMGMT (described in this chapter) is recommended.

For information on defining file security using the command line, see See File security.

Press the PF8 (FORward) key from the File Definition - Organization screen, or the PF7 (BACkward) key from the File Definition - Procedure screen. FILEMGMT displays the second file definition screen, the Security screen:

FILEMGMT File Definition - Security PAGE 2 OF 3 Filename: ABC Inactive FILE ACCESS OPENCTL X' 80 ' Public: X Semipublic: _ Private: _ Record Security: _ Key: REMOTE FILE ACCESS PRIVILEGES NO/INV PWD: _ VALID PWD: _ GROUP MEMBER: _ DEFAULT FILE PRIVILEGES PRIVDEF X' BFFF ' File Manager: X Record Security Override: _ View File Parms: X RETRIEVE DATA WITH PROCEDURES Adhoc: X Internal: X External: X UPDATE DATA WITH PROCEDURES Adhoc: X Internal: X External: X INTERNAL PROCEDURES Display/Copy: X Define: X Change: X Delete: X Include: X DEFAULT FIELD LEVEL SECURITY SELLVL: 0 READLVL: 0 UPDTLVL: 0 ADDLVL: 0 ===> 1=HELp 2= 3=QUIt 4=FIElds 5=WIDen 6=COMmands 7=BACkward 8=FORward 9=SIZe 10= 11= 12=END

You use the File Definition - Security screen to specify Model 204 security parameters for the file you are creating. When this screen is displayed for a file for the first time, FILEMGMT shows the standard Model 204 default values for the parameters.

For some of the parameters shown on this screen, you specify an actual parameter value. For others, you select options, and FILEMGMT uses your selections to compute an appropriate parameter value.

Setting file security describes the type of information you enter. For more information about parameter settings, refer to the Rocket Model 204 File Manager's Guide and to Seven-Step File Load Examples. For a discussion of how to select the most appropriate options for your particular file, refer to the Rocket Model 204 File Manager's Guide.

The cursor is initially positioned at the first input prompt (the Public input field).

Setting file security

You can select more than one option from an option category.

To select an option, type X or another value as indicated.

To enter a null: type a space, press the ERASE EOF key, or preserve the default underscore character (_). Null indicates that you do not want to select the option.

Typing a character other than these is invalid, and produces an error message.

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.
FILE ACCESS

Selects file access characteristics for the specified file. FILEMGMT computes the Model 204 OPENCTL parameter from your selections and displays the computed value.

Select just one option from the Public, Semipublic, and Private options.

Public File is a public file. The default is X.
Semipublic File is a semipublic file. The default is null.
Private File is a private file. The default is null.
Record Security File has record security in effect. The default is null.
Key

Name of the field used as the record security key. Key requires an entry if you select Record Security. The entry must be a valid field name (1-70 characters). The requirements for a valid field name are described in the Rocket Model 204 File Manager's Guide.

A null entry is required unless you select Record Security. The default is null.

REMOTE FILE ACCESS PRIVILEGES Additional OPENCTL options for Parallel Query Option/204 (PQO) sites, the following options determine how a file can be accessed remotely.
NO/INV PWD Accessible remotely without a valid password.
VALID PWD Accessible remotely with a valid password.
GROUP MEMBER Accessible remotely as a permanent group member.
DEFAULT FILE PRIVILEGES Select the default user privileges for the specified file. FILEMGMT computes the Model 204 PRIVDEF parameter from your selections and displays the computed value.
File Manager Default user privileges include file manager privileges. The default is X.
Record Security Override Default user privileges allow record security to be overridden. The default is null.
View File Parms Default user privileges allow file parameters to be viewed. The default is X. The default cannot be changed for a pre-9.0 file.
RETRIEVE DATA WITH Select the default user privileges for PROCEDURES retrieving data by means of procedures.
Adhoc Default user privileges allow data to be retrieved by ad hoc requests. The default is X.
Internal Default user privileges allow data to be retrieved by internal procedures. The default is X.
External Default user privileges allow data to be retrieved by external procedures. The default is X.
UPDATE DATA WITH PROCEDURES Select the default user privileges for updating data by means of procedures.
Adhoc Default user privileges allow data to be updated by ad hoc requests. The default is X.
Internal Default user privileges allow data to be updated by internal procedures. The default is X.
External Default user privileges allow data to be updated by external procedures. The default is X.
INTERNAL PROCEDURES Select the default user privileges for performing operations on internal procedures.
Display/Copy Default user privileges allow internal procedures to be displayed, echoed, and copied. The default is X.
Define Default user privileges allow internal procedures to be defined. The default is X.
Change Default user privileges allow changes (other than deletions) to internal procedures. The default is X.
Delete Default user privileges allow internal procedure to be deleted. The default is X.
Include Default user privileges allow internal procedures to be included. The default is X.
DEFAULT FIELD LEVEL SECURITY Default field level security. Valid values are 0-255. The defaults are 0.
SELLVL Default SELECT access.
READLVL Default READ access.
UPDTLVL Default UPDATE access.
ADDLVL Default ADD access.

Resetting file security

  1. Select the FILE Maintenance RESET function (number 2) from the primary screen. FILEMGMT displays the first of the reset screens, the File Parameter Reset screen.

Press PF8 (FORward) to display the File Security Reset screen:

FILEMGMT File Security Reset Screen Page 2 of 2 Filename: ABC Inactive FILE ACCESS OPENCTL X' 80 ' Public: X Semipublic: _ Private: _ Record Security: REMOTE FILE ACCESS PRIVILEGES NO/INV PWD: _ VALID PWD: _ GROUP MEMBER: _ DEFAULT FILE PRIVILEGES PRIVDEF X' BFFF ' File Manager: X Record Security Override: _ View File Parms: X RETRIEVE DATA WITH PROCEDURES Adhoc: X Internal: X External: X UPDATE DATA WITH PROCEDURES Adhoc: X Internal: X External: X INTERNAL PROCEDURES Display/Copy: X Define: X Change: X Delete: X Include: X DEFAULT FIELD LEVEL SECURITY SELLVL: 0 READLVL: 0 UPDTLVL: 0 ADDLVL: 0 DEFAULT PROCEDURE CLASS PRCLDEF: 0 ===> 1=HELp 2= 3=QUIt 4= 5= 6=COMmands 7=BACkward 8= 9= 10= 11= 12=END

You use the Reset screens to change the values of Model 204 file parameters that were originally set on the File Definition screens or the File Size Definition screen. FILEMGMT stages the file for a RESET command in response to your input.

The Reset screens display the file parameters that can be reset. File parameters not displayed on the Reset screens can be changed only by recreating the file.

For some of the file parameters shown on these screens, you specify an actual parameter value. For others, you select options, and FILEMGMT uses your selections to compute appropriate values for the FOPT, FRCVOPT, OPENCTL, and PRIVDEF parameters.

You need not fill in all values on all screens. Current parameter values are preserved for any parameters for which you do not enter values.

You can move freely between the two Reset screens by pressing the PF7 (BACkward) and PF8 (FORward) keys. FILEMGMT does not save any of the information you enter until you press one of the following function keys from either of the screens:

PF6 COMmands
PF12 END

The section Input for the Security Reset screens describes the type of information you enter. For more information about parameter settings, refer to the Model 204 Parameter and Command Reference. For a discussion of how to select the most appropriate options for your particular file, refer to the Rocket Model 204 File Manager's Guide.

The cursor is initially positioned at the first input prompt on the first screen.

Input for the Security Reset screens

You can select more than one option from an option category.

To select an option, type X or a numeric value.

To enter a null: type a space, press the ERASE EOF key, or preserve the default underscore character (_). Null indicates that you do not want to select the option.

Typing a character other than these is invalid, and produces an error message.

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.
Screen 2: File Security Reset screen
FILE ACCESS Select file access characteristics for the specified file. FILEMGMT computes a new value for the Model 204 OPENCTL parameter from your selections and displays the computed value. Select just one option from the Public, Semipublic, and Private options.
Public File is a public file. The default is X.
Semipublic File is a semipublic file. The default is null.
Private File is a private file. The default is null.
Record Security File has record security in effect. The default is null.
REMOTE FILE ACCESS PRIVILEGES Additional OPENCTL options for Parallel Query Option/204 (PQO) sites, the following options determine how a file can be accessed remotely.
NO/INV/ PWD Accessible remotely without a valid password
VALID PWD Accessible remotely with a valid password.
GROUP MEMBER Accessible remotely as a permanent group member.
DEFAULT PROCEDURE CLASS PRCLDEF

Default user class for procedures, if the file is public or semipublic.

Valid values are 0-255. The default is 0.

DEFAULT FILE PRIVILEGES Select default user privileges characteristics for the specified file. FILEMGMT computes a new value for the Model 204 PRIVDEF parameter from your selections and displays the computed value.
File Manager Default user privileges include file manager privileges. The default is X.
Record Security Default user privileges allow record security Override to be overridden. The default is null.
View File Parms Default user privileges allow file parameters to be viewed. The default is X. The default cannot be changed for a pre-9.0 file.
RETRIEVE DATA WITH PROCEDURES
Adhoc Default user privileges allow data to be retrieved by ad hoc requests. The default is X.
Internal Default user privileges allow data to be retrieved by internal procedures. The default is X.
External Default user privileges allow data to be retrieved by external procedures. The default is X.
UPDATE DATA WITH PROCEDURES
Adhoc Default user privileges allow data to be updated by ad hoc requests. The default is X.
Internal Default user privileges allow data to be updated by internal procedures. The default is X.
External Default user privileges allow data to be updated by external procedures. The default is X.
INTERNAL PROCEDURES
Display/Copy Default user privileges allow internal procedures to be displayed, echoed, and copied. The default is X.
Define Default user privileges allow internal procedures to be defined. The default is X.
Change Default user privileges allow changes (other than deletions) to internal procedures. The default is X.
Delete Default user privileges allow internal procedures to be deleted. The default is X.
Include Default user privileges allow internal procedures to be included. The default is X.
DEFAULT FIELD LEVEL SECURITY Default field level security. Valid values are 0-255. The default is 0.
SELLVL Default SELECT access.
READLVL Default READ access.
UPDTLVL Default UPDATE access.
ADDLVL Default ADD access.

File parameter reset 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 File Parameter Reset screens.
PF3 QUIt Exits from the File Parameter Reset screens and returns to the primary screen without changing any parameter values.
PF6 COMmands Stages the file for RESET. Proceeds to the Execute Commands screens. This screen displays the staged commands that were generated for the file and allows you to select the commands you want to execute.
PF7 BACkward Screen 2 only. Returns to the first File Parameter Reset screen.
PF8 FORward Screen 1 only. Proceeds to the second File Parameter Reset screen.
PF12 END Stages the file for RESET. Exits from the File Parameter Reset screen and returns to the primary screen.

Controlling file access with the SECURE and DESECURE commands

SECURE and DESECURE are Model 204 commands that you can use to control file access.

Securing a file ensures that a user cannot access a file illegally by running a Model 204 program with a different password table. A special key in the password table serves as the key for securing a file. The key can be changed by the system manager with the LOGKEY command.

When a secured file is opened, Model 204 compares the key to a copy placed in the file by the SECURE command. The file is opened if the two fields match. If the fields do not match, the user is logged out and an error message is displayed on the operator's console.

Existing files can be secured or desecured. Staged files can be secured or desecured, with these exceptions:

  • Files staged for SECURE cannot be desecured, and conversely, files staged for DESECURE cannot be secured.
  • Files staged for CREATE, RECREATE, DELETE, and INITIALIZE can be neither secured nor desecured.

You must have file-level privileges of at least X'A000' (file manager and ad hoc data update) to issue SECURE and DESECURE commands. In this case, you actually need update but not retrieve privileges. (Refer to "File security" for a discussion of these privileges.)

To stage a file for the SECURE or DESECURE command:

  1. Enter the file name on the primary screen.

Select the SECURE or DESECURE command.

Press Enter.

FILEMGMT displays a message confirming that the file is staged for SECURE or DESECURE. You can proceed to the Execute Commands screen to execute the command.