Difference between revisions of "Concealed Logical Name"

From VSI OpenVMS Wiki
Jump to: navigation, search
(Created page with "A '''concealed logical''' is a type of logical name that conceals a part of the directory specification. The logical can then be used like a disk name. It is...")
 
 
Line 4: Line 4:
 
SMAN43$ define /sys /translation=concealed sub dsa1:[jdoe.sub.]
 
SMAN43$ define /sys /translation=concealed sub dsa1:[jdoe.sub.]
 
SMAN43$ sh log sub
 
SMAN43$ sh log sub
   "SUB" = "DSA1:[DZELENINA.SUB.]" (LNM$SYSTEM_TABLE)
+
   "SUB" = "DSA1:[JDOE.SUB.]" (LNM$SYSTEM_TABLE)
  
 
SMAN43$ dir sub:[000000]
 
SMAN43$ dir sub:[000000]
Line 19: Line 19:
 
  <nowiki>
 
  <nowiki>
 
SMAN43$ sh def
 
SMAN43$ sh def
   DSA1:[DZELENINA]
+
   DSA1:[JDOE]
  
 
SMAN43$ dir sub
 
SMAN43$ dir sub

Latest revision as of 14:28, 6 November 2023

A concealed logical is a type of logical name that conceals a part of the directory specification. The logical can then be used like a disk name. It is used to shorten and simplify file specifications as well as hide the directory structure from unprivileged users. In the following example, a concealed logical SUB is defined and used. Note the period at the end of the directory specification:

SMAN43$ define /sys /translation=concealed sub dsa1:[jdoe.sub.]
SMAN43$ sh log sub
   "SUB" = "DSA1:[JDOE.SUB.]" (LNM$SYSTEM_TABLE)

SMAN43$ dir sub:[000000]

Directory SUB:[000000]

B.LIS;1             ORIGINAL.LIS;1      SUB2.DIR;1

Total of 3 files.
 

Note that a concealed logical behaves like a disk; you have to use [000000] to go to the concealed directory itself. For example, when default is set to a concealed logical, it replaces the disk part of the specification:

SMAN43$ sh def
  DSA1:[JDOE]

SMAN43$ dir sub
%DIRECT-E-OPENIN, error opening SUB:[JDOE]*.*;* as input
-RMS-E-DNF, directory not found
-SYSTEM-W-NOSUCHFILE, no such file

SMAN43$ set def sub
SMAN43$ sh def
  SUB:[JDOE]
%DCL-I-INVDEF, SUB:[JDOE] does not exist