Operating System - OpenVMS
Showing results for 
Search instead for 
Did you mean: 

Regarding Logicals.

Go to solution

Regarding Logicals.

Dear Masters,

I'm pretty new to this OVMS platform.
I've cerain doubts regarding this OS.
What is the purpose of logical names? What are they?
What are important logicals? Why are they important?
Ian Miller.
Honored Contributor

Re: Regarding Logicals.

Robert Gezelter
Honored Contributor

Re: Regarding Logicals.


As Ian has mentioned, Logical Names are a feature that is unique to OpenVMS. There are some precedents (e.g., DDNAMES in IBM's OS/360 and descendants), but none have the power of Logical Names.

Logical Names are a powerful way to map a program's logical environment into actual devices and directories in a fully transparent manner, with no effort on the part of the programmer. They are a major reason why moving OpenVMS systems from one mass storage device to another is essentially effortless.

Logical Names can also have different values depending upon the process, job, user, group, system, or cluster. This enables the same program to operate in dramatically different environments without change. For example, there is no need to make changes between production programs and scripts and test programs and scripts; all of the changes can be contained within the list of logical names used by the program.

My article from the February 2004 OpenVMS Technical Journal (reprint at http://www.rlgsc.com/publications/vmstechjournal/inheritance.html) also has some diagrams about how the logical name facility can be used in powerful ways.

Used properly, the logical name facility is a powerful tool.

- Bob Gezelter, http://www.rlgsc.com
Daniel Fernandez Illan
Trusted Contributor

Re: Regarding Logicals.


Logicals names implementation is a VMS feature that stablish a difference with other O.S. (like UNIX) because for example permits define paths with independance of hardware definition or access to TWO OR MORE directories with the same VARIABLE NAME executing a ordered search. This marks a big difference with environmental variables of UNIX (you obtain more of one points of access with the same variable).


Re: Regarding Logicals.

Dear Gezelter,

I read all your lines wih great care and attention.
It really cleared the clouds lil bit.
Can you take some time and give me some examples which reflects your words?
Some practical scenarios where we the strength of logicals are revealed.

Rob Kersey

Re: Regarding Logicals.

A good use of a logical is as below:

$sho log sys$sysdevice

The logical sys$sysdevice points to the system disk/device $1$DUA0:

If you used the Device name ($1$DUA0:) in a .com file to execute a command i.e

$run $1$DUA0:[000000]hello.exe

and then changed your system disk to a SCSI disk the device name would change to something like $1$DKA0:. Then your .com file would fail. Ok you could change your .com file but if you have 100's of .com files referencing this disk/device name it could take some time!

If you use the logical sys$sydevice in your command you can change disks/device many times without worry!

This is just 1 example there are many more......!
Robert Gezelter
Honored Contributor

Re: Regarding Logicals.


As Rob noted, SYS$SYSDEVICE is the system disk on every system in the world, regardless of the hardware configuration of the particular system. SYS$SYSTEM is the pointer to the executable components provided by HP. The manager's directory is SYS$MANAGER. These are system provided logical names that reside in the System wide logical name table.

There is also a Group logical name table, which is different for each different group of users. So, without any knowledge of the differences, one group of users could have a name DATABASE pointing to file DISK$USERS:[ACCOUNTING]PHONENUMBERS.DAT and a different group of users could have the name pointing to DISK$USERS2:[OPERATIONS]LISTING.DAT. To provide even more possibilities, a default could be provided in the SYSTEM logical name table that pointed to yet a third file.

All of this variation is produced with ZERO changes to the applications program.

- Bob Gezelter, http://www.rlgsc.com
Honored Contributor

Re: Regarding Logicals.


Welcome to the great VMS Forum.
Hope you have got enough info from Bob, Ian and others.

Logical name is symbolic name or equivalence name given to any DEVICE (Disk, Terminal, Printer,.. etc) name, or file/directory name, or any other long string you want refer from inside or outside of your programs; easy and secure way of referring and sharing any long directory or file or device name in VMS system.

Once you DEFINE your easy-short-meaningfull symbol against any VMS device/disk/directory/subdirectory/filesname, then you can symboly use that symbol very easily wherever you want. No need to type that long or seceret VMS system's file, directory, or nodename, and disk name again and again.

There are SYSTEM defined and user defined logical names any system. You may be known this already, is like a ENVIRONMENT variable in DOS, WINDOWS, UNIX, or any other software such as PATH, HOME, PAGER, EDITOR, DISPLAY, MANPATH, PRINTER. etc, and you also can define this kind symbols in windows, dos and unix using "set" or "=" commands.

Like in Oracle we GRANT the "Roles" to specific users, in VMS also we can GRANT the access to our LOGIGAL (symbolic) name to any specific user, users group, world, or the system-wide in order to keep system security.

Jan van den Ende
Honored Contributor

Re: Regarding Logicals.


Archunan gave you some comparable mechanisms on other OSses.

ONE big difference has to be mentioned: all logical names on Group, System, or Cluster level are NOT set when a user logs in or some time thereafter be executing some command to define them.
They are defined at SYSTEM boot time, or set/changed sometime thereafter (usually by the system manager, or anyone suitably privileged)
Another unique future is, that the value CAN be changed, and FROM THAT MOMENT ON applies to EVERY process within its scope!

For example, in U*X, the sysadmin can have login procedures that SET environment variables at login, and (s)he can change the value that it is SET to, but I know of NO way to change that value for already RUNNING processes!



Have one on me.

Don't rust yours pelled jacker to fine doll missed aches.
Wim Van den Wyngaert
Honored Contributor

Re: Regarding Logicals.

My thoughts.

The HP3000 MPE operating system also has logicals but they are called file equations. They are even stronger than the VMS ones because you can even pass FDL-like parameters describing how to open the file and what to allocate. But they were only used for files and devices.

But on VMS you can change them more easely, you can classify them in tables, use them to hide real directories names, ...

On Unix you would have to use soft links to obtain the same result but for logicals that contain settings Unix uses files (cached when accessing them frequently).