All sorts of things on VMS system have logical names (names, usually simple ones, that can be used to refer to something that has a very complicated real name). There are literally thousands of logical names defined; they are stored in tables and translated, usually automatically, to the real name on an as-needed basis.
Your task for this project is to prompt the user at the keyboard for a name, to assume that the name is a logical name and translate into its "equivalence name" (the real name of whatever it is), and then to display some information about whatever the name refers to. Here are the specifics of what your program should do.
You must use LNM$FILE_DEV as the list of table names to search for the logical name. LNM$FILE_DEV is the top-most list of logical name tables; by using it, you are sure of finding the name if it exists in any logical name table. Also, some logical names (such as DISK$LOGIN) translate to two or more equivalence strings. Don't worry about such situations. You are required only to display one equivalence name (the first) for each logical name.
EXTRA CREDITFor extra credit, on any name that is determined to be a device, use the $GETDVIW_S system macro to determine what kind of device it is - disk, tape, or terminal. (You cannot easily determine if a device is a printer.) Display a message like, "Device is a disk." just before performing the SHOW DEVICE command. Use similar messages for the other types of devices. If $GETDVIW_S cannot tell you what type of device it is, display "Unknown device type" before performing the SHOW DEVICE command.
Handin in a .LIS printout of your program on greenbar paper. Also, hand in the CARBON captured output from running your program and entering the following names.
both disk$login tt jim_wolfe project lans decw$utils 300lib disk$develop mumble john_carr mua
The $spawn macro is part of the iopack library file. It is available for use in any program that contains the PROJECT:IOPACK library. The form of $spawn is
$spawn [command] [infile]
where command is a reference to a fixed length string
descriptor of a DCL command and infile is a reference to a
fixed length string descriptor of a file specification in which
DCL commands can be found. Thus, $spawn can be used to execute a
single DCL command while inside a program; or it can be used to
execute the entire collection of commands from a file (a .COM)
file. Both arguments to $spawn are optional; you should use one
or the other, not both. For this program, I would think you
would use the command argument, since you don't know how to
create a .COM file in assembly language.
NOTE: The names mua and lans are defined by me. If, when you try to run your program, those names do not translate as logical names, let me know immediately. The method I used to define them may be affected by system reboot actions. If these names are not defined, I can redefine them.