• Aucun résultat trouvé

DIRECTIVE Command

Dans le document Operations Guide (Page 160-163)

The DIRECTIVE command associates a name with a procedure in a user-written library. When that name is used later as a command, MARC executes the associated procedure. MARC can thus execute a user-defined, user-created, and user-named process-that is, a directive-in addition to the processes provided with MARC.

The DIRECTIVE command can eliminate the need to write and define MCSs on a system. Because MARC executes the library procedure, the library procedure gains MCS privileges and capabilities. With this command, you can direct MARC to execute a number of functions that can otherwise be executed only by a specialized MCS, such as MCSLOGGER.

Syntax

DIRECTIVE - - - r - - ; '---r--.---,r--<name>- = -<fi 1 e n a m e > ' - - . - - - i

1 ~ ANYWIr~DOW---,----'----i

COMMAND CONTROL PRIVI LEGED SYSTEM

- - - . - < n a m e > - - - ' DISABLE --.J

ENABLE ~

<name>

-<letter>--.---~---~

~ ~-/16\

<letter>

:;=U

<digit>

Explanation

Up to 12 different directives can be available at anyone time. Because a name can be followed by text, each name can result in a number of actual commands. For this reason, only users with SYSTEMUSER privileges can use the DIRECTIVE command.

In addition, if the value of the system option SECADMIN is TRUE, only a usercode with security-administrator status can use the command definition features of the DIRECTIVE command. However, any user can use the DIRECTIVE command with no parameters to display the names of available directive commands.

When a command name is established, conflicts with other commands are considered to be intentional overrides. The only exceptions to this rule are the WRU command (which MARC handles in a special way) and the DIRECTIVE command itself MARC explicitly prevents users from assigning either of these two commands as a name.

Creating Custom Versions of MARC

A colon (:) must precede a list of one or more of the options ANYWINDOW, COMMAND, CONTROL, PRIVILEGED, and SYSTEM.

DIRECTIVE

Lists all current directive commands.

DIRECTIVE <name> = <file name>

DIRECTIVE + <name>

=

<file name>

Assigns the specified directive command name to the command contained in the specified file. The plus ( +) option is a safety measure that prevents your overwriting an existing directive. If you use this option and the name you specify already exists, MARC displays the following message:

<name> HAS ALREADY BEEN DEFINED

If you omit this option, a new name is created if none currently exists; the newly defined directive overwrites an existing directive.

DIRECTIVE - <name>

Deletes a directive command name. For example, suppose you have defined the name INFO by entering the following command:

DIRECTIVE INFO =SYSTEM/INFO/LIBRARY ON LIBS :SYSTEM

Now, however, you no longer want directives with the name INFO to be recognized.

Entering DIRECTNE - INFO ensures that MARC rejects commands preceded by the word INFO.

DIRECTIVE DISABLE <name>

Disables a directive command name without deleting the name.

If the name is currently enabled, specifying that name in a DIRECTNE DISABLE command disables the name, delinks the process from the name ifit is currently linked, and removes the process from the mix ifit is currently running and is unfrozen.

However, the association between the name and the process is unaffected. This command differs from the delete form (-), which eliminates the directive name entirely so that it is no longer recognized by MARC.

If the process associated with the name is currently in use - that is, if someone has invoked the name and the associated process is still active - specifying that name in a DIRECTNE DISABLE command schedules the name to be disabled and delinked. It also prevents use of the name by any new users. When the process that is in progress completes, the name is disabled and delinked.

If the name is currently scheduled to be disabled, specifying that name in a

DIRECTNE DISABLE command has no effect on the status of the name. The name remains scheduled to be disabled and delinked. However, specifying that name in a

Creating Custom Versions of MARC

DIRECTIVE ENABLE command at this point causes the name to become available again.

If a name that matches a name currently scheduled to be disabled is specified in a REPLACE (Replace Disk or Pack Volume) system command, the new directive is established in the ENABLED state and is available for immediate use.

If the name is currently disabled, specifying that name in a DIRECTIVE DISABLE command causes a message to appear stating that the name is already disabled.

DIRECTIVE ENABLE <name>

Reenables a directive name that was disabled by a DIRECTIVE DISABLE command. The next invocation of the name causes the associated process to be executed and relinked. If the name is currently enabled, specifying that name in a DIRECTIVE ENABLE command causes a message to appear stating that the name is already enabled. If the name is currently scheduled to be disabled and delinked, specifying that name in a DIRECTIVE ENABLE command causes the name to be enabled and made available for use.

ANYWINDOW

Enables you to use the directive as a control-type command-that is, a command preceded by a question mark (?)-that can be entered from any window except message control system (MCS) windows such as CANDE. The directive is processed by MARC dialogue 1 (MARCIl).

Note: Take care when specifying an ANYWINDOW directive, because overall MARC performance can be degraded if the called procedure is inefficient or fails to return control to MARC quickly.

COMMAND CONTROL PRIVILEGED SYSTEM

Specify security attributes for each command. These features enable you to change the security of an existing command as well as specify the security for new directives. For example, the command PS FORCE has a SYSTEMUSER security level. You can write a procedure that executes the PS FORCE command and then define a directive without the SYSTEM security attribute that executes the procedure.

The security attributes have different names in different code files. The naming conventions used by the DIRECTIVE command, the USERDATAFILE usercode database, and CaMS are as follows:

DIRECTIVE Command

Creating Custom Versions of MARC

continued

DI RECTIVE Command Option

SYSTEM

USERDATAFILE Equivalent SYSTEM USER

COMS Equivalent

SYSTEMUSER

Security attributes are additive. For example, ifboth the PRIVILEGED and SYSTEM attribu tes are assigned to a command, the user must be both a privileged user and a SYSTEMUSER to execute the command. If the user lacks either status, the system rejects the command and issues a security error message.

Note: When a directive command changes the security status of the user, the newly acquired privilege applies only to the user executing the directive command, and it applies only during the execution of that directive command. Further, the new privilege is effective only in MARC and certain other components of the system software, primarily COMS and the CONTROLLER. Other components-such as the GETSTATUS intrinsic, used to locate files- use the

information in the USERDATAFILE to determine privileges.

Dans le document Operations Guide (Page 160-163)

Documents relatifs