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

'dir' on logicals for concealed devices

 
SOLVED
Go to solution
Ingvaldur
Occasional Visitor

'dir' on logicals for concealed devices

Hi

We have a few logicals defined as concealed devices and we are seeing some differences when doing identical 'dir' commands on a Alpha w. OpenVMS 8.2 vs Itaninum w. OpenVMS 8.3-1H1 on identically defined logicals.

The 'dir' command is entered directly for the logical i.e. without specifying any default. E.g.

$ dir local_root

where 'local_root' is defined as

"LOCAL_ROOT" [super] = "disk$mylabel:[dir1.]" [concealed] (LNM$PROCESS_TABLE)

On Alpha (8.2) each object is listed exactly once but on the Itanium (8.3-1H1) each object is listed twice.

By adding the default (subdir) when entering the command i.e. 'dir local_root:[dir2]' each object is listed exactly once on both platforms.

I dont know if the syntax we're using is supported, but it's apparently become a habit both no the command line and in dcl-scripts.

regards
- Ingvaldur
6 REPLIES
Jur van der Burg
Respected Contributor

Re: 'dir' on logicals for concealed devices

Concealed logical names should point to a device. Pointing them to another logical name is unsupported.

Jur.
Ingvaldur
Occasional Visitor

Re: 'dir' on logicals for concealed devices

Thanks for reply but redefining the logical to point to a device gave the same results.

The local_root is now defined like:
"LOCAL_ROOT" [super] = "mynodename$dkb21:[dir1.]" [concealed] (LNM$PROCESS_TABLE)

Having default set to 'test' and listing the contents of local_root:[test] without specifying 'test' gives the following results:

$ dir /size/date/prot local_root

Directory local_root:[TEST]

ccc.c;1 0.50KB 5-JAN-2010 13:20:18.43 (RE,RWED,RWED,RE)
ccc.c;1 0.50KB 5-JAN-2010 13:20:18.43 (RE,RWED,RWED,RE)

Total of 2 files, 1KB

It works as expected when specifying default/subdir when listing contents from above like:

$ dir /size/date/prot local_root:[test]

Directory LOCAL_ROOT:[TEST]

ccc.c;1 0.50KB 5-JAN-2010 13:20:18.43 (RE,RWED,RWED,RE)

Total of 1 file, 0.50KB

(We have a lot of concealed logicals that point to other logicals and it just works. But we're going to change that so they point to devices instead. Thank you for pointing that out.)

Regards
- Ingi
Robert Gezelter
Honored Contributor

Re: 'dir' on logicals for concealed devices

Ingvaldur,

Instead of explicitly specifying device names, it is far better to use the F$TRNLNM lexical function to dynamically translate the inner logical to a device name.

For example:

$ ASSIGN/JOB/TRANSLAT=CONCEAL 'F$TRNLNM("SYS$SYSDEVICE")'[KUMQUAT.] DISK$KUMQUAT:

Note that the ":" at the end of the device name is part of the string returned by F$TRNLNM. I strongly suggest careful understanding of the behavior of the lexical function before use, but this is far safer than explicitly inserting device names.

I also recommend reading my series of OpenVMS Consultant articles on OpenVMS.org relating to the use of logical names. The first article in the series can be found at:
http://www.openvms.org/stories.php?story=02/09/24/5441505

- Bob Gezelter, http://www.rlgsc.com
Jess Goodman
Esteemed Contributor

Re: 'dir' on logicals for concealed devices

Jur,

A concealed logical name definition CAN use another logical name, as long as that logical name is a concealed name defined as a physical device name. A common example is:

$ DEFINE/TRAN=CONCEAL logical DISK$volume:[dir.]

This has been supported since VMS 6.0. IIRC.
I have one, but it's personal.
Joseph Huber_1
Honored Contributor
Solution

Re: 'dir' on logicals for concealed devices


You did not show from which default You are issuing the Directory command.
DIR LOCAL_ROOT
effectively results in
DIR LOCAL_ROOT:[current_default].
Do a SHOW DEFAULT on the 2 systems in question.

The twice listing behaviour can be explained, if the current default is a list logical like SYS$COMMON or any other such logical list.
http://www.mpp.mpg.de/~huber
Ingvaldur
Occasional Visitor

Re: 'dir' on logicals for concealed devices

I had just figured that out for an hour ago, and just by accident, that if I did a 'set default local_root:' before listing the contents of local_root, then everything worked as expected (i.e. objects did show up only once).

One dcl-script that we use to changed between modules (and setting up various logicals) did set the default to the search-list which was defined from local_root + common_root.

Thank you all for your responses.

Regards
- Ingvaldur