From: fairfield@slacvx.slac.stanford.edu
Subject: Re: Q: SET DEFAULT and logicals
Organization: Stanford Linear Accelerator Center
Date: Sat, 12 Dec 1992 01:26:32 GMT

In article <1992Dec11.123536.1@vxdesy.desy.de>, pawlak@vxdesy.desy.de writes:
> A user came to me today complaining about a DCL problem, which can be 
> summarized by the following command sequence:
> 
> $ SHOW DEFAULT
>   DUA1:[USER]
> $ DEFINE DIR1 DUA0:[ARCHIVE]
> $ DEFINE DIR2 DIR1
> $ SET DEFAULT DIR2
> $ SHOW DEFAULT
>   DUA1:[ARCHIVE]
> %DCL-I-INVDEF, DUA1:[ARCHIVE] does not exist
> $ SET DEFAULT DIR1
> $ SHOW DEFAULT
>   DUA0:[ARCHIVE]              
> 
> I suspect this behaviour is a feature - the DCL dictinary says that
> "You can use a logical name, but it must constitute at least the device
> part of the specification" - and DIR2 does not directly constitute the
> device specification... My question is why? After all, DIR2 can be 
> perfectly used everywhere else, why can't I set default to it?
>                                      Michal (pawlak@zeubac.desy.de)
> 
> PS: I suggested my user to DEFINE DIR2 DIR1: - which seems to fix his
>     problem. The question "why?" remains... 
> 
> PPS: Try to continue the fun with DEFINE DIR3 DIR2: Why???? 

    I believe there was a discussion of this very thing a month or two ago. 
In any case, it is _now_, as of V5.5-2, a documented bug though it has 
existed for many previous versions of VMS.  From the V5.5-2 Release Notes:


        1.1.5 SET DEFAULT and SHOW DEFAULT Commands-Behavior Changed

              V5.5-2

              In VMS Version 5.5-2, the DCL command SET DEFAULT does not
              set the default correctly when you use a logical name that
              has multiple translations. For example:

              $ SET DEFAULT DISK1:[DIRECTORY1]
              $ DEFINE myfile myfile1
              $ DEFINE myfile1 DISK2:[DIRECTORY2]
              $ SET DEFAULT myfile
              $ SHOW DEFAULT
                DISK1:[DIRECTORY2]

              In this example, the default should read:

              DISK2:[DIRECTORY2]

              This problem will be corrected in a future release of VMS.

              Currently, DCL does not show the right default device in
              the SHOW DEFAULT command when you use a logical name that
              has multiple translations. For example:

              $ SET DEFAULT DISK1:[DIRECTORY]
              $ DEFINE myfile myfile1
              $ DEFINE myfile1 DISK2:[DIRECTORY]
              $ SET DEFAULT myfile:  ! Must be with a colon
              $ SHOW DEFAULT
                myfile:[DIRECTORY]
              $ WRITE SYS$OUTPUT F$ENVIRONMENT("DEFAULT")
                myfile:[DIRECTORY]

              In this example, "myfile" is used as the default
              device. The correct default directory display should be
              DISK2:[DIRECTORY].

              This SHOW DEFAULT behavior will be changed in a future
              release of VMS.

-- 
 Dr. Kenneth H. Fairfield    |  Internet: Fairfield@Slac.Stanford.Edu
 SLAC, P.O.Box 4349, MS 98   |  DECnet:   45537::FAIRFIELD (45537=SLACVX)
 Stanford, CA   94309        |  BITNET    Fairfield@Slacvx
 ----------------------------------------------------------------------------
 These opinions are mine, not SLAC's, Stanford's, nor the DOE's...
Xref: sparky comp.os.vms:19405 vmsnet.misc:1074 vmsnet.networks.desktop.pathworks:3751