Concealed Logical Name

From VSI OpenVMS Wiki
Jump to: navigation, search

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

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

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
%DCL-I-INVDEF, SUB:[JDOE] does not exist