LOGICAL NAMES FILE NAMES SEARCH LISTS o Goals of Expanded Logical Name Support - Support RMS search lists - Allow more flexible control (access and denial of access) over the sharing of logical names - Reduce the ability of one process to interfere with another process through the manipulation of logical names - Provide more independent name spaces for logical names - Allow users to specify the order in which logical name tables are searched - Provide the foundation for more flexible access controls than currently exist o Changes to Logical Names - Users may create private and shareable tables - Multivalued logical names, up to 128 equivalence strings - Additional shareable table accessible to all processes in a job - User-specified table search order - Up to 255 characters in names and equivalence strings - Up to 31 alphanumeric characters in table names: (0-9, A-Z, $, __) - No interpretation of characters in names or equivalence strings o Changes to Logical Names (Cont.) - Tables can be given a UIC protection mask - Properties of logical names have been removed from the names themselves and placed into attributes associated with the names. The leading underscore that signalled an end to translation is replaced with the TERMINAL attribute. The RMS concealed device/specification of a leading double underscore is replaced with the CONCEALED attribute. Names can be defined NO_ALIAS to prevent spurious outer access mode definitions. o Changes to Logical Names (Cont.) - When translating a logical name, the list of tables to be searched and the order in which to search is specified by a logical name whose multiple translations specify the tables. By convention, each class of logical name use has a predefined logical name for this purpose. File and device name processing: LNM$FILE_DEV DCL logical name commands: LNM$DCL_LOGICAL NEW LOGICAL NAME SYSTEM SERVICES o Create Logical Name Table ($CRELNT) - This service creates a logical name table with a given name, attribute list, quota, and protection. This table can be either process specific (and reside in P1 space) or shared among processes (and reside in paged dynamic memory). o Create Logical Name ($CRELNM) - This service adds a given logical name and its set of equivalence strings to a given logical name table. - Multiple equivalence strings and properties associated with each equivalence name are passed by means of an item list. NEW LOGICAL NAME SYSTEM SERVICES (Cont.) o Delete Logical Name ($DELLNM) - This service deletes a given logical name or logical name table. Alternatively, all names within a table may be deleted. - If a table is deleted, then all names in that table are deleted. NEW LOGICAL NAME SYSTEM SERVICES (Cont.) o Translate Logical Name ($TRNLNM) - This service returns one or more of the translations and/or attributes associated with a given logical name or translation. - An item list is used to specify which equivalence string(s) and/or characteristics are to be returned. - The table name MUST be specified. o The old logical name system services ($CRELOG, $TRNLOG, and $DELLOG) have been converted into jacket routines for the new services. They execute in caller's mode. NEW AND CHANGED DCL COMMANDS o CREATE/NAME_TABLE table-name allows a logical name table to be created. /PROTECTION qualifier allows normal VMS protection (system, owner, group, world) to be assigned. o DEFINE logical-name equivalence-name[,...] ASSIGN equivalence-name[:][,...] logical-name[:] allows creation of multiple equivalence strings for the same logical name. /TABLE qualifier allows name to be put into any accessible table. /ACCESS_MODE qualifier allows an access mode to be specified. /JOB qualifier specifies the job table. o DEASSIGN logical-name[:] /TABLE qualifier allows removal of a name from any table (subject to the usual access controls). This command is also used to delete logical name tables. NEW AND CHANGED DCL COMMANDS (Cont.) o SHOW TRANSLATION logical-name /TABLE qualifier allows selective translation o F$LOGICAL Lexical Function continues to use $TRNLOG system service. o F$TRNLNM Lexical Function offers the full functionality of the $TRNLNM system service. Note that information available in a single call to $TRNLNM system service may require several invocations of the lexical function. V3 LOGICAL NAME TABLES PROCESS SPACE SYSTEM SPACE Tables "named" by small integers 0 - system table 1 - group table 2 - process table Search order fixed V4 LOGICAL NAME TABLE STRUCTURE PROCESS SPACE SYSTEM SPACE PROCESS SYSTEM DIRECTORY DIRECTORY o Tables are named by logical names in one of the directory tables: LNM$PROCESS_DIRECTORY LNM$SYSTEM_DIRECTORY o Tables created by VMS: LNM$PROCESS_TABLE - process table LNM$JOB_nnnnnnnn - job (process-tree) table LNM$GROUP_grpnum - group table LNM$SYSTEM - system table o VMS - created logical table names: LNM$PROCESS_DIRECTORY: LNM$PROCESS ---> LNM$PROCESS_TABLE LNM$JOB ---> LNM$JOB_nnnnnnnn LNM$GROUP ---> LNM$GROUP_grpnum LNM$SYSTEM_DIRECTORY: LNM$DIRECTORIES ---> LNM$PROCESS_DIRECTORY, LNM$SYSTEM_DIRECTORY LNM$SYSTEM ---> LNM$SYSTEM_TABLE LNM$FILE_DEV ---> LNM$PROCESS, LNM$JOB, LNM$GROUP, LNM$SYSTEM LNM$FILE_DEV [exec] ---> LNM$SYSTEM LNM$DCL_LOGICAL ---> LNM$FILE_DEV LNM$TEMPORARY_MAILBOX ---> LNM$JOB LNM$PERMANENT_MAILBOX ---> LNM$SYSTEM RMS FILE NAME ENHANCEMENTS o EXPANDED FIELD SIZES AND ADDITIONAL CHARACTERS - File name, directory name and file type fields increased to 39 characters each. - Two new characters are allowed in the file name and file type fields. These are: "$" (dollar sign) and "_" (underscore). RMS FILE NAME ENHANCEMENTS (Cont.) o ROOTED DIRECTORIES AND CONCEALED DEVICE NAMES - Rooted directories have been generalized and expanded to allow 8 levels of rooted directories. - New syntax for access to "root" level: ROOT:[000000]. Relative references within rooted directory are permitted, i.e., ROOT:[-.FOO] is valid. - A concealed logical name is no longer characterized by double underscore. A concealed name is indicated by the CONCEALED attribute available through the new logical name services. - CONCEALED attribute implies the TERMINAL attribute. - Rooted directories do not have to be concealed, i.e. DISK:[ROOT.][DIR]NAME is valid. o SYS$FILESCAN - New system service to parse VMS file name specification syntax. - Does not apply any defaulting. - Does not do logical name translation. - Does not assign a channel or do directory lookups. - Can return descriptions of each file specification component present in a string. - Can return a set of flags indicating which fields are present. - Stops at the first inappropriate character. - Supported in TPARSE by TPA$_FILESPEC. RMS SEARCH LISTS o Search lists are simply an application of multivalued logical names. o When attempting to locate a file, RMS chooses the first ACCESSIBLE device, directory and filename combination that it finds. o When searching for a file, RMS uses all possible translations of a given logical name. An error is reported only if all possibilities are exhausted and the file is not found. RMS SEARCH LISTS (Cont.) For example, consider the following sequence of commands $ DEFINE OPERATION LIST,MAP $ DEFINE LJK$DEFAULT SYS$LOGIN,LJK$DISK:[DEFAULT] $ SET DEFAULT LJK$DEFAULT $ DIRECTORY OPERATION The file would be searched for in the following order (assume that SYS$LOGIN and LJK$DISK each have a single trivial translation). SYS$LOGIN:LIST SYS$LOGIN:MAP LJK$DISK:[DEFAULT]LIST LJK$DISK:[DEFAULT]MAP SEARCH LIST ATTRIBUTES - Multiple file specifications contained within a single logical name. - Any file name component may be specified in a search list logical name. - New NAM block flag indicating a search list logical name is present in the current file name specification: NAM$V_SEARCH_LIST. - A search list logical name is allowed any place in file specification that logical names are currently allowed. - Search list can provide "wildcard" devices. - Search list processed for $OPEN, $PARSE/$SEARCH - Create-if option supported. - Search list ignored for $CREATE, first specification is used. SEARCH LISTS (Cont.) o Each RMS input string can be a search list: - Primary Filename (FNA/FNS) - Default Filename (DNA/DNS) - Related Filename (RLF RSL/RSA) - SYS$DISK (SET DEFAULT) o If more than one input string is a search list, then the "cross-product" is used for examination. The primary filespec is processed most rapidly. o Wildcards can be used with search lists in valid wildcard usages ($PARSE/$SEARCH). o Library routines LIB$FIND_FILE and LIB$FILE_SCAN extended to process search lists, defaulting and related name processing. SEARCH LISTS (Cont.) o RMS continues searching if a given combination fails for any of these reasons: RMS$_ACC ACP file access failed RMS$_DEV error in device name (no such device) RMS$_DNF directory not found RMS$_DNR device not ready, not mounted or unavailable RMS$_DPE device positioning error RMS$_FLK file currently locked by another user RMS$_FND ACP file or directory lookup failed RMS$_FNF file not found RMS$_NMF no more files found RMS$_PRV insufficient privilege or file protection violation RMS$_WLK device currently write locked o All other errors, such as syntax errors cause RMS to stop and return that error. o If search list exhausted, the error status of the last attempt is returned. EXAMPLE OF SEARCH LISTS AND NEW FILENAMES o Shared cluster-wide HSC system disk node 1: SYS$SYSROOT ---> HSC$DUA0:[SYS1.],SYS$COMMON]: SYS$COMMON ---> HSC$DUA0:[V4COMMON.] node 2: SYS$SYSROOT ---> HSC$DUA0:[SYS2.],SYS$COMMON: SYS$COMMON ---> HSC$DUA0:[V4COMMON.] Contents of [SYSx.SYSEXE]: AUTOGEN.PAR PAGEFILE.SYS PARAMS.DAT SWAPFILE.SYS NETxxx.DAT SYSDUMP.DMP OLDSITEx.DAT VAXVMSSYS.PAR Contents of [V4COMMON]: Everything else, shared between nodes, including SYS.EXE. EXPANDED LOGICAL NAME SUPPORT o Changes to Logical Names - A large number of logical name tables can be created (instead of three). Those tables that exist in system space can be shared among processes. - Logical names will become multivalued. That is, a given logical name can have several (up to 128) translations. - When translating a logical name, the list of tables to be searched and the order in which to search will be specified by a logical name whose multiple translations specify the tables. By convention, each class of logical name use, such as file specification operations by RMS, will use a predefined name for this purpose. EXPANDED LOGICAL NAME SUPPORT (Cont.) o Changes to Logical Names - The maximum length of a logical name and an equivalence string will be expanded from 63 characters to 255 characters. - Properties of logical names will be removed from the name itself and placed into attributes associated with a name. For example, a leading underscore that signalled an end to translation will be replaced with the TERMINAL attribute. The concealed device that was indicated by a leading double underscore will be replaced with the CONCEALED attribute. - Each logical name table will be provided with a set of access controls similar to those used for file protection. These controls include an owner UIC, access mode, a protection mask, and access control lists. V3 TO V4 DIFFERENCES o Mailbox logical names are no longer in the group table; instead, they are entered into the job table. o The SET UIC command does NOT alter the definition of LNM$GROUP. o Search lists do not cost appreciably if the desired file is located by the first list element. o Multiple lists can be confusing, especially for SET DEFAULT. o Many layered products not yet upgraded to process search lists in input lists. o SHOW LOGICAL completely re-written. V3 TO V4 DIFFERENCES (Cont.) o If no translation exists: - $TRNLOG returned success: SS$_NOTRAN - $TRNLNM returns error: SS$_NOLOGNAM o Private MOUNT logical names entered in the JOB table. o SHOW DEFAULT does not display any translation if SYS$DISK translates to a search list. o Names in shareable tables can have an access mode. Most VMS-defined names are defined in exec mode. o SYSNAM and GRPNAM privilege continue. o SYSNAM privilege allows user to bypass access mode maximization on creation/deletion of names and tables. o GRPNAM obsolete, superceded by normal VMS protection.