VMS: logicals UNIX: links, but...

Anton Rang rang at cpsin3.cps.msu.edu
Sun Apr 16 13:25:27 AEST 1989


Warning: I'm somewhat biased on this topic (read my .sig).

With that out of the way...I agree that VMS logical names can be
unnecessarily complex if you choose to utilize all of their features.
Maybe some of the things you can do with them are unnecessary.
However, here are two uses I really like.  (One of these really isn't
"logical names" as such, but a difference in program execution.)

1.  You can use a logical name to change which shareable image is
    loaded with a program.  I believe BSD 4.3 has shareable libraries;
    is there some way to do this?  (Why, you ask?  Suppose you have a
    graphics library which can support N different output devices.
    You write a new output driver and want to use it with your
    existing programs.  What's the best method?)  This isn't critical,
    but I'm curious....  (more details @ end of message)

2.  You can define a logical name to translate to more than one name.
    While this definitely can be confusing, it does let me essentially
    "merge" two directories.  For instance, I could keep libraries in
    two directories (perhaps writeable by different users).  Using a
    name like LIB:FRED (where LIB is my logical name), both
    directories will be searched (in the order defined by the name),
    and if a FRED file is found, it will be used.

    "Aha!" you say.  "Use symbolic links!"  Yes, but...suppose that
    directory /LIB1 is owned by USER1, and directory /LIB2 by USER2.
    Let there be a global directory /LIB.  Then adding a file to LIB1
    or LIB2 necessitates adding a new symbolic link in /LIB.  What's
    the best way to deal with this?  (It's come up here in connection
    with manual pages--I'd like to make /usr/man/manl really be a
    search path through directories for the various packages we have,
    and allow new manual pages to be added by the person managing each
    package without necessitating superuser intervention.)

This is not intended to generate flames.  Take the above with a grain
of salt; I've only used UNIX for two years or so, and I've had about 4
years experience with VMS, so I know it somewhat better.

			Anton

--------------------
  A (hopefully more clear) explanation of my graphics package example:

		$ PASCAL MY_PLOT			-- user writes program
		$ LINK MY_PLOT, SYS$LIBRARY:GRAPHLIB	-- user links it up

  Later, to run it:

		$ ASSIGN VT340 DI_DEVICE		-- pick device
		$ RUN MY_PLOT				-- run program

  Now the program will run with VT340 as the device.  There is a
device-independent (D-I) library and a device-dependent (D-D) one.
I'd like a technique for doing this.  At the moment, the best I've
come up with is using an environment variable for the device name,
then using that (in the D-I part) to fork a process to run the D-D
part, then communicating over a socket.  Since there is LOTS of
bidirectional comm. going on (i.e. sending bunches of 4x4 matrices at
each step), this is slow (I've tried it with a prototype).
  Ideas?

+---------------------------+------------------------+----------------------+
| Anton Rang (grad student) | "VMS Forever!"         | "Do worry...be SAD!" |
| Michigan State University | rang at cpswh.cps.msu.edu |                      |
+---------------------------+------------------------+----------------------+



More information about the Comp.unix.questions mailing list