RD Controls Software Release Note 56.1 <P> <b> VMS Logical Name Randomizer</b>

RD Controls Software Release Note 56.1

VMS Logical Name Randomizer

F. J. Nagy

Introduction

The VMS Record Management Services (RMS) allows a logical name to be a search list of disks and directories by defining a logical name with more than one equivalence name. When used in file specifications, each equivalence string is used until a match is found. In this use of search lists, the order of the equivalence strings of the logical name is important.

Several EPICURE subsystems also use search list logical names. Frequently these search lists identify multiple network nodes which supply the same EPICURE services. An example of this are the data source class logicals which are lists of the Front End nodes supporting access to devices in the source class. In this usage, the order of the equivalence strings is unimportant except to determine the default Front End for the source class (assuming all the Front Ends are operating). In fact, since the source class logicals are defined on each consumer system (running DAR), we would like to scramble the list order to provide some degree of Front End load leveling.

Program Operation

The LNM_RANDOMIZER program provides a means to scramble the order of the equivalence strings of a search list. It does this by fully translating the logical name to build a list of the equivalence names in their original order. A random number () is generated in the range of zero to (where is the number of equivalence names in the list). The list of equivalence names is then treated as a circular list and shifted (circularly) by entries. The logical name is then redefined with the same equivalence strings in a new order.

Input Format

LNM_RANDOMIZER reads its input from SYS$INPUT. Each line LNM_RANDOMIZER reads must contain a single logical name and its qualifiers. If the first non-blank character of the line is an exclamation mark (``!''), the line will be treated as a comment and ignored. Similarly, anything after an exclamation mark on a line with a logical name will also be taken as a comment and ignored. Blank lines are also ignored.

Actions

LNM_RANDOMIZER will translate the logical name, randomize the elements of the search list and redefine the logical name. Logical name attributes and translation attributes of equivalence names are preserved with the new definition. Similarly, the logical name will be redefined in the same table and access mode as the original name was found. Because of this feature of LNM_RANDOMIZER, one rarely needs to use any of the qualifiers with the logical names except in one of more of these special conditions:

  1. the logical name is not defined in the standard logical name tables which RMS will search. This search list of logical name tables is defined by the LNM$FILE_DEV logical name which LNM_RANDOMIZER uses as the default logical name table for the translation. If the logical name is defined in a table not in this list, the /TABLE= must be used.
  2. the same logical name appears in multiple tables and the definition in an inner (more privileged) table is to be randomized.
  3. the same logical name appears with different access modes in the same logical name table.

Privileges

CMEXEC privilege is required to use LNM_RANDOMIZER because the logical names are redefined by calling SYS$CRELNM from executive mode so that the original access mode (supervisor or executive) will be preserved when the logical name is redefined.

LNM_RANDOMIZER requires CMEXEC privilege.

Qualifiers

The reader should be familiar with the VMS DCL DEFINE command as LNM_RANDOMIZER patterns the usage of qualifiers on the logical names after the use of the qualifiers on the DEFINE command.

/EXECUTIVE_MODE

SYSNAM privilege is required to create an executive mode logical name.

Attempts to translate and replace a logical name originally created in executive mode. If the specified logical name exists in supervisor mode but not in executive mode, then the logical name will be translated and replaced, retaining its original access mode. This qualifier is only useful if a particular logical name table has names defined in both supervisor and executive modes.

/EXCLUDE=(item{,})

Excludes selected equivalence strings from randomization. The possible selections are FIRST or LAST. Both may be selected by using /EXCLUDE=(FIRST,LAST). The selected names will retain their positions in the list of equivalence strings; the other equivalence strings will be randomized using the normal algorithm.

/GROUP

Requires GRPNAM or SYSNAM privilege to place a name in the group logical name table.

Attempts to translate and replace a logical name in the group logical name table. The /GROUP qualifier is synonymous with /TABLE=$GROUP. This qualifier is needed only if the logical name appears in multiple logical name tables and a particular instance of these multiple logical names is to be randomized.

/JOB

Attempts to translate and replace a logical name in the job logical name table. The /JOB qualifier is synonymous with /TABLE=$JOB. This qualifier is needed only if the logical name appears in multiple logical name tables and a particular instance of these multiple logical names is to be randomized.

/LOG

/NOLOG

Enables or disables the informational messages (see below).

/PROCESS (default)

Attempts to translate and replace a logical name in the process logical name table. The /PROCESS qualifier is synonymous with /TABLE=$PROCESS. This qualifier is needed only if the logical name appears in multiple logical name tables and a particular instance of these multiple logical names is to be randomized.

/SUPERVISOR_MODE

Attempts to translate and replace a logical name originally created in supervisor mode. If the specified logical name exists in executive mode but not in supervisor mode, then the logical name will be translated and replaced, retaining its original access mode. This qualifier is only useful if a particular logical name table has names defined in both supervisor and executive modes.

/SYSTEM

Requires SYSNAM or SYSPRV privilege to place a name in the system logical name table.

Attempts to translate and replace a logical name in the system logical name table. The /SYSTEM qualifier is synonymous with /TABLE=$SYSTEM. This qualifier is needed only if the logical name appears in multiple logical name tables and a particular instance of these multiple logical names is to be randomized.

/TABLE=name

Requires WRITE (W) access to the table to specify the name of a shareable logical name table.

Attempts to translate and replace a logical name in the specified logical name table. This qualifier is only necessary if the logical name appears in more than one logical name table or if the logical name table is not in the default logical name table search list given by the LNM$FILE_DEV logical name.

Messages

The following are the specific messages from LNM_RANDOMIZER other messages (in particular CLI--W--ident) may also be output.

LNR--I--ACMODEIS, actual defined access mode of name `name' is `mode'

The access mode of the logical name as defined differs from the access mode selected by either the /EXECUTIVE_MODE or /SUPERVISOR_MODE qualifier. The original access mode is retained when the logical name is redefined. This message is displayed only if the /LOG qualifier is specified.

LNR--W--BADTABLE, bad table name for logical name `name'

The table name does not specify an existing logical name table. Check the name used on the /TABLE qualifier.

LNR--W--BADNAME, bad logical name `name'

The logical name exceeds the maximum length permitted, has a length of zero or is longer than the specified maximum length logical name string, table name string or equivalence string. Verify that the logical name is correct.

LNR--W--CRELNMFAI, $CRELNM service failed for name `name'

The SYS$CRELNM system service returned an unexpected error status. The status returned from SYS$CRELNM will be displayed as a message after this one.

LNR--F--INPFILOPN, error opening input file of logical names

The SYS$OUTPUT file could not be opened in order to read the list of logical names to be translated. This will likely happen if the SYS$OUTPUT logical name is redefined for the execution of LNM_RANDOMIZER. Check the definition of the SYS$OUTPUT logical name.

LNR--I--LNMEMPTY, logical name `name' has no equivalence names

The logical name is not randomized since it has no equivalence names. This message is displayed only if the /LOG qualifier is specified.

LNR--I--LNMSINGLE, logical name `name' has a single equivalence name

The logical name is not randomized since it has only a single equivalence name. This message is displayed only if the /LOG qualifier is specified.

LNR--W--NOPRIV, no privilege to translate or create logical name `name'

The current process does not have the requisite privilege or privileges to translate or re-create the logical name. In order to redefine the logical name, the process must have the same privileges as were necessary to originally DEFINE to logical name.

LNR--W--NOLOGNAM, no such logical name `name'

The specified logical name does not exist. Verify the spelling of the logical name.

LNR--I--RANDIZED, logical name `name', search list rotated by `n' places of `m' items

The logical name has been randomized by doing a circular rotation of the list of equivalence names. The message gives the number of positions the list has been rotated () and the total number of items in the search list (). This message is displayed only if the /LOG qualifier is specified.

LNR--W--TOODEEP, too many translations for logical name `name'

Ten translations were performed on the logical name; however, the name has not been defined. Check the definition of the logical name.

LNR--W--TOOFEW, logical name `name' has too few equivalence names for randomization

The logical name is not randomized since it has too few equivalence names remaining after the /EXCLUDE selections were applied. This message is displayed only if the /LOG qualifier is specified.

LNR--W--TRNLNMFAI, $TRNLNM service failed for name `name'

The SYS$TRNLNM system service returned an unexpected error status. The status returned from SYS$TRNLNM will be displayed as a message after this one.

LNR--I--UNCHANGED, logical name `name' search list unchanged

The logical name has not been randomized because a shift of zero positions was randomly selected. This message is displayed only if the /LOG qualifier is specified.

Sources

LNM_RANDOMIZER development was done under the EPICURE DAR project in the [.LNR] subdirectory. The sources can be found in the DAR project CMS library. The .EXE file can be found in the [WORK.DAR.LNR] directory of EPICURE_ROOT:.

Keywords: EPICURE, Startup, Logical Names

Distribution:

Security, Privacy, Legal

rwest@fsus04.fnal.gov