VMS like or type "logicals" in Windows?

Hi all,

I was always really fond of the ability in OpenVMS to use logicals, and the searchlist ablities on the fly at command time.

I know windows has the PATH statement but the implications changing it has further reaching impacts meaning I will need the core PATH statement to accommodate for the things like "program files\.{product directory}... etc" and I need the specific item at run-time to be included or maybe I'm just missing something. I like the aspect of being able to create a logical in VMS called like DATF and it references a searchlist of directories. I want to be able to use something like DATF (or some name) in windows and have it refer to different directories.

Any thoughts on how this might be able to be achieved in a Windows OS?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Hi davism,

VMS, huh? :)  Not really my cup o' tea ... but if I'm interpreting your post correctly, I think you're after something similar to the Libraries feature in Windows 7.

See the links below:

Feel free to clarify if you're looking for something else. I'll admit that it's been quite awhile since I played with VMS, and I'm not familiar with DATF.

Hope this helps!
Or how about symbolic links (a la mklink, from the CLI)?


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
davismAuthor Commented:

This is a bit intriguing. I have Windows 7 on another drive and will have to take a look at that.

I'll need to see if I can do this from a command line or programmatically, This would be interesting.

By the way, the DATF reference was an EXAMPLE of a LOGICAL NAME.  (i.e. DEFINE DATF DK01:[TEST])

I will take a look...
The 7 Worst Nightmares of a Sysadmin

Fear not! To defend your business’ IT systems we’re going to shine a light on the seven most sinister terrors that haunt sysadmins. That way you can be sure there’s nothing in your stack waiting to go bump in the night.

Pardon my ignorance.  :)  So in VMS-land, the file or directory  referenced by the DATF logical is the same as that which resides on  DK01:[TEST]?
 If so, symbolic links, hard links, or directory junctions via mklink are exactly what you're  looking for. It's basically a combination of ln and symlink from  the UNIX/POSIX side of things, where logical references can be created  which point to other targets (either local or remote).

 Glad to help otherwise if you had something else in mind.

Happy reading!
davismAuthor Commented:
Yes, when I was reading that a little more the link sounds like it may work. Is that Vista only? If so, I'm again going to have to wait until later when I am on that machine with a vista OS.

In addition, I have to look to see if I can do a logical search path which is essentially a list of directories which can be on different devices. (i.e. C drive, D drive, E drive or different shares). It's sorta like the LIBRARY functionality in Windows 7.

Either way, I will take a look at these.
Will let you know...
mklink is available on Vista, Windows 7, and WS2008.

For XP, you'll have to use SysInternals Junction (http://technet.microsoft.com/en-us/sysinternals/bb896768.aspx), linkd from the Windows 2000 or WS2003 Resource Kit, or the scary-yet-powerful fsutil command-line tool. Note that these are only for directory symbolic links (a.k.a. NTFS junctions in Windows-land). I'm not sure that NTFS 3.1 (XP, WS2003) supports symbolic links at the file-level, the way that mklink allows in post-Vista OSes.

Regarding the logical search path, are you trying to ensure that files can be located using Windows Search (Vista, Windows 7)? Or are you trying to ensure that executables within the symbolic link can be launched regardless of the current system path (i.e. the way that the %path% environment variable works)?
nociSoftware EngineerCommented:
Logicals is a kernel name space where you can connect objects.
Queues, Disks, Mailboxes, Files, etc.

The kernel looks for f.e. SYS$BATCH and it can be translated to the actual batch queue that is intended for you environment.

The name space is split into:
Process (process private)
Job (running Job)
Group (UIC/username based)
System wide

And searched in more or less the same order.
Meaning that f.e. SYS$BATCH can have a system default of SYSTEM_QUEUE and that
system management (Group 1) can assign themselves a different queue through a SYS$BATCH logical in the Group table for group 1.

The disk APPLICATION_DISK can be DKA100: for one job and DKA200: for anotherone.
Logicals are a powerful feature that allows for virtualisation of process environments.

This feature is Unique for OpenVMS.
If you restrict yourself for Systemwide only Filename targeted logicals then SYMLINKS can be used...
If you use logicals like:  DATAFILE
where datafile means DKA100:[USER1.DATADIR]FILE.DAT for one user1
and DKA100:[USER3.DATADIR.SUB]FILE.DAT for user3 each running a program that
tries to op DATAFILE then there is no equivalent.

And PATH is not an equivalent for SEARCH-PATH's as suggested before.

A search path is like a PATH but only for that translation...
then Personal is DKA100:[USER1.DATADIR] for user1, DKA200:[USER3.DATADIR] and the SHARED: pointes to DKA500:[SHARED]

Then the app will open

and user 4 not having a FILE.DAT in his datadir.
will get access to DKA500:[SHARED]DATAFILE.SHARED.

Besides the previous mentioned namespaces a system manager is free to create his own name space...
Think of logicals names only for the Financial Controllers:
LEDGER_TABLE  holding all translations need to use the bookkeeping software.

Off-course all these tables have their own access protection so only qualified people can access them.

nociSoftware EngineerCommented:
Oh the previously mentioned SYMLINKS are most like SYSTEM WIDE logicals with the difference that they are stored on disk and not in memory.
The reparse points are in memory (equivalent to mount --bind for UNIX).

If you care to modify the programs you might be able to use environment variables to do translations. You need to do all translations and knitting of filenames yourself.

strcpy(file, getenv("NAME"))
strcat(file,"\\")   /* or strcat(file,"//") if in unix */

I am sure there are DCL emulators out there that might offer functionality. WinDSL comes to mind from a few years aback. not sure if it is still available.

A simple DCL parser for DOS.
Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
<<need the specific item at run-time to be included or maybe I'm just missing something.>>

No, your not missing anything.  VMS has some very unique features (logicals, symbols, and DCL), which make it very nice to work with in terms of accomplishing tasks within the OS.
DCL can be replaced with VB script, symbols partially with environment variables, but there is nothing like logicals in Windows.
nociSoftware EngineerCommented:
Please note you cannot compare logicals to environment variables.
For DCL the SYMBOLS are 100% equivalent to environment variables.

For OpenVMS (note the difference, the KERNEL not the command interpreter) handles logical names. Because they reside in kernel space the kernel can trust their values (esp. so called Executive mode logical names) and use it to access objects using a translated name.

davismAuthor Commented:
TimPeer, one I reallly utilized A LOT of in different compacities previously is XLNT from Advanced Systems Concepts - www.advsyscon.com. It was excellent but didn't do logicals, per say.


In some quick evaluation on my Vista system the mflink seemed to work ideally. With respect system level logicals there are also group level. I would not want to invoke or utilize any system level logicals (comparable to that of like SYS$LOGIN.

What I want to do for this is like a a search path and in that since it is like a PATH.

In your example:

"If you use logicals like:  DATAFILE
where datafile means DKA100:[USER1.DATADIR]FILE.DAT for one user1
and DKA100:[USER3.DATADIR.SUB]FILE.DAT for user3 each running a program that
tries to op DATAFILE then there is no equivalent."

If I have a logical in a group level logical name table for like DATAFILE:  I can have that DATAFILE equate to DKA100:[DATF]FILE.DAT, DKA200:[DATF]FILE.DAT, DKA300:{DATF]FILE.DAT.  In that situation whomever utilizes that logical name table will and reference DATEFILE. It will look through DKA100:[DATF], DKA200:[DATF], DKA300:[DATF] and it will utilize the first location that the FILE.DAT and if none of them have that they it will fail in a FILE NOT FOUND type situation.

I did part of that with the mflink but I ran out of time to test whether or not it would find and utilize the like the FILE.DAT in the directories I specified.

The use of the LIBRARY in Windows 7 seeming would work as well (albeit I didn't get a chance to try being that I ran out of time) but I'm not sure if I can use that programmatically or from a command line.

JDettman, from a SEARCH-PATH prospective would you think that the MFLINK or LIBRARY would be as close a possible to a LOGICAL?   Albeit, the whole concept of LOGICAL NAME TABLES may or would be a little different.

Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
<<JDettman, from a SEARCH-PATH prospective would you think that the MFLINK or LIBRARY would be as close a possible to a LOGICAL?   Albeit, the whole concept of LOGICAL NAME TABLES may or would be a little different. >>
MFLINK gets pretty close; a lot closer then what I thought was available in Windows.  

Learn something new every day...
nociSoftware EngineerCommented:
I agree with JDettman,

Translation of a single name seems to be possible. Not sure if you can make the mkflink per process or systemwide only though.
The link with the filesystem seems to suggest it is for everybody the same. (SO it would be the equivalent for a single valued system logical name).

I can't find anything about searchlist like functionality.
Personaly I have no windows systems, at work it's limited to Windows-XP.
davismAuthor Commented:
Thanks guys!

I think the MFLINK is the best source albeit is does have some limitations include the ability in XP (albeit, a manner is possible with the resource kit).

Thanks and much appreciated!!!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Operating Systems

From novice to tech pro — start learning today.