Weird default directory behaviour

  • Follow


Alpha VMS 8.3:  (also behaves the same on VAX VMS 7.3)

$ show def
   TCPIP$TFTP_ROOT:[SWITCH1]

$ cd sys$tzdir:

$ show def
   SYS$TZDIR:[SWITCH1]
   =   SYS$COMMON:[SYS$ZONEINFO.USER]
   =   SYS$COMMON:[SYS$ZONEINFO.SYSTEM]

$ show log sys$tzdir/full
    "SYS$TZDIR" [exec] = "SYS$SYSROOT:[SYS$ZONEINFO.USER]" (LNM$SYSTEM_TABLE)
         = "SYS$SYSROOT:[SYS$ZONEINFO.SYSTEM]"

$ cd sys$manager
$ show def
   SYS$SYSROOT:[SYSMGR]
   =   SYS$SYSROOT:[SYSMGR]
   =   SYS$COMMON:[SYSMGR]
$


Can anyone explain why the original directory "SWITCH1" remains after I have 
changed to SYS$TZDIR ? Shouldn't behave just like SYS$MANAGER ?

consider the following:

$ cd sys$tzdir:
$ show def
   SYS$TZDIR:[SYSMGR]
   =   SYS$COMMON:[SYS$ZONEINFO.USER]
   =   SYS$COMMON:[SYS$ZONEINFO.SYSTEM]

$ dir *.dir

Directory SYS$COMMON:[SYS$ZONEINFO.USER]
SOURCES.DIR;1
Total of 1 file.

Directory SYS$COMMON:[SYS$ZONEINFO.SYSTEM]
AFRICA.DIR;1        AMERICA.DIR;1       ANTARCTICA.DIR;1    ARCTIC.DIR;1
ASIA.DIR;1          ATLANTIC.DIR;1      AUSTRALIA.DIR;1     BRAZIL.DIR;1
CANADA.DIR;1        CHILE.DIR;1         ETC.DIR;1           EUROPE.DIR;1
INDIAN.DIR;1        MEXICO.DIR;1        MIDEAST.DIR;1       PACIFIC.DIR;1
SOURCES.DIR;1       US.DIR;1
Total of 18 files.

$ dir [.antarctica]
%DIRECT-E-OPENIN, error opening SYS$COMMON:[SYSMGR.ANTARCTICA]*.*;* as input
-RMS-E-DNF, directory not found
-SYSTEM-W-NOSUCHFILE, no such file

Looks to me like a big bug. A DIRECTORY command works as expected and ignores 
the [SYSMGR] that remains from the previous default directory, but trying to set 
def to a subdirectory fails because it then uses the [SYSMGR] and discards the 
real current location.
0
Reply jfmezei.spamnot (8826) 3/7/2007 9:36:37 PM

On Mar 7, 4:36 pm, JF Mezei <jfmezei.spam...@vaxination.ca> wrote:
> Alpha VMS 8.3:  (also behaves the same on VAX VMS 7.3)
>
> $ show def
>    TCPIP$TFTP_ROOT:[SWITCH1]
>
> $ cd sys$tzdir:
>
> $ show def
>    SYS$TZDIR:[SWITCH1]
>    =   SYS$COMMON:[SYS$ZONEINFO.USER]
>    =   SYS$COMMON:[SYS$ZONEINFO.SYSTEM]
>
> $ show log sys$tzdir/full
>     "SYS$TZDIR" [exec] = "SYS$SYSROOT:[SYS$ZONEINFO.USER]" (LNM$SYSTEM_TABLE)
>          = "SYS$SYSROOT:[SYS$ZONEINFO.SYSTEM]"
>
> $ cd sys$manager
> $ show def
>    SYS$SYSROOT:[SYSMGR]
>    =   SYS$SYSROOT:[SYSMGR]
>    =   SYS$COMMON:[SYSMGR]
> $
>
> Can anyone explain why the original directory "SWITCH1" remains after I have
> changed to SYS$TZDIR ? Shouldn't behave just like SYS$MANAGER ?
>
> consider the following:
>
> $ cd sys$tzdir:
> $ show def
>    SYS$TZDIR:[SYSMGR]
>    =   SYS$COMMON:[SYS$ZONEINFO.USER]
>    =   SYS$COMMON:[SYS$ZONEINFO.SYSTEM]
>
> $ dir *.dir
>
> Directory SYS$COMMON:[SYS$ZONEINFO.USER]
> SOURCES.DIR;1
> Total of 1 file.
>
> Directory SYS$COMMON:[SYS$ZONEINFO.SYSTEM]
> AFRICA.DIR;1        AMERICA.DIR;1       ANTARCTICA.DIR;1    ARCTIC.DIR;1
> ASIA.DIR;1          ATLANTIC.DIR;1      AUSTRALIA.DIR;1     BRAZIL.DIR;1
> CANADA.DIR;1        CHILE.DIR;1         ETC.DIR;1           EUROPE.DIR;1
> INDIAN.DIR;1        MEXICO.DIR;1        MIDEAST.DIR;1       PACIFIC.DIR;1
> SOURCES.DIR;1       US.DIR;1
> Total of 18 files.
>
> $ dir [.antarctica]
> %DIRECT-E-OPENIN, error opening SYS$COMMON:[SYSMGR.ANTARCTICA]*.*;* as input
> -RMS-E-DNF, directory not found
> -SYSTEM-W-NOSUCHFILE, no such file
>
> Looks to me like a big bug. A DIRECTORY command works as expected and ignores
> the [SYSMGR] that remains from the previous default directory, but trying to set
> def to a subdirectory fails because it then uses the [SYSMGR] and discards the
> real current location.

We won't be able to tell you what's wrong until you tell us what that
"cd" command does. It don't look VMSish to me...  ;)


0
Reply johnhreinhardt (467) 3/7/2007 9:47:56 PM


One thing...

sys$tzdir is search list, not ?
sys$manager is not...

(sys$sysroot is, but not sys$manager...)

Jan-Eirk.




JF Mezei wrote:

> Alpha VMS 8.3:  (also behaves the same on VAX VMS 7.3)
> 
> $ show def
>   TCPIP$TFTP_ROOT:[SWITCH1]
> 
> $ cd sys$tzdir:
> 
> $ show def
>   SYS$TZDIR:[SWITCH1]
>   =   SYS$COMMON:[SYS$ZONEINFO.USER]
>   =   SYS$COMMON:[SYS$ZONEINFO.SYSTEM]
> 
> $ show log sys$tzdir/full
>    "SYS$TZDIR" [exec] = "SYS$SYSROOT:[SYS$ZONEINFO.USER]" 
> (LNM$SYSTEM_TABLE)
>         = "SYS$SYSROOT:[SYS$ZONEINFO.SYSTEM]"
> 
> $ cd sys$manager
> $ show def
>   SYS$SYSROOT:[SYSMGR]
>   =   SYS$SYSROOT:[SYSMGR]
>   =   SYS$COMMON:[SYSMGR]
> $
> 
> 
> Can anyone explain why the original directory "SWITCH1" remains after I 
> have changed to SYS$TZDIR ? Shouldn't behave just like SYS$MANAGER ?
> 
> consider the following:
> 
> $ cd sys$tzdir:
> $ show def
>   SYS$TZDIR:[SYSMGR]
>   =   SYS$COMMON:[SYS$ZONEINFO.USER]
>   =   SYS$COMMON:[SYS$ZONEINFO.SYSTEM]
> 
> $ dir *.dir
> 
> Directory SYS$COMMON:[SYS$ZONEINFO.USER]
> SOURCES.DIR;1
> Total of 1 file.
> 
> Directory SYS$COMMON:[SYS$ZONEINFO.SYSTEM]
> AFRICA.DIR;1        AMERICA.DIR;1       ANTARCTICA.DIR;1    ARCTIC.DIR;1
> ASIA.DIR;1          ATLANTIC.DIR;1      AUSTRALIA.DIR;1     BRAZIL.DIR;1
> CANADA.DIR;1        CHILE.DIR;1         ETC.DIR;1           EUROPE.DIR;1
> INDIAN.DIR;1        MEXICO.DIR;1        MIDEAST.DIR;1       PACIFIC.DIR;1
> SOURCES.DIR;1       US.DIR;1
> Total of 18 files.
> 
> $ dir [.antarctica]
> %DIRECT-E-OPENIN, error opening SYS$COMMON:[SYSMGR.ANTARCTICA]*.*;* as 
> input
> -RMS-E-DNF, directory not found
> -SYSTEM-W-NOSUCHFILE, no such file
> 
> Looks to me like a big bug. A DIRECTORY command works as expected and 
> ignores the [SYSMGR] that remains from the previous default directory, 
> but trying to set def to a subdirectory fails because it then uses the 
> [SYSMGR] and discards the real current location.
0
Reply jan-erik.soderholm (2469) 3/7/2007 10:28:59 PM

On Mar 7, 4:36 pm, JF Mezei <jfmezei.spam...@vaxination.ca> wrote:
> Alpha VMS 8.3:  (also behaves the same on VAX VMS 7.3)
>
> $ show def
>    TCPIP$TFTP_ROOT:[SWITCH1]
>
> $ cd sys$tzdir:
>
> $ show def
>    SYS$TZDIR:[SWITCH1]
>    =   SYS$COMMON:[SYS$ZONEINFO.USER]
>    =   SYS$COMMON:[SYS$ZONEINFO.SYSTEM]
>
> $ show log sys$tzdir/full
>     "SYS$TZDIR" [exec] = "SYS$SYSROOT:[SYS$ZONEINFO.USER]" (LNM$SYSTEM_TABLE)
>          = "SYS$SYSROOT:[SYS$ZONEINFO.SYSTEM]"
>
> $ cd sys$manager
> $ show def
>    SYS$SYSROOT:[SYSMGR]
>    =   SYS$SYSROOT:[SYSMGR]
>    =   SYS$COMMON:[SYSMGR]
> $
>
> Can anyone explain why the original directory "SWITCH1" remains after I have
> changed to SYS$TZDIR ? Shouldn't behave just like SYS$MANAGER ?

Yes.

No.

Oh, you want the explanation! OK.

SYS$TZDIR is a search list of two defaults (a default being a device
and a directory together). SYS$MANAGER, OTOH, is a device and a
directory with the device being a search list. So SYS$MANAGER itself
is not a search list. This makes all the difference in the world.

So in the first case, SYS$DISK is set to (DEFINE-ed to be) dir1, dir2.
In the case of SYS$MANAGER, SYS$DISK is defined to be SYS$SYSROOT:
whilst the "default directory" is set to [SYSMGR]. The second and
third instances of [SYSMGR] in the SHOW DEFAULT output are a direct
consequence of the default directory being [SYSMGR].

That's how search lists work. That's normal. It's always been this way
AFAIK, going back to at least V4 or V5.

>
> consider the following:
>
> $ cd sys$tzdir:
> $ show def
>    SYS$TZDIR:[SYSMGR]
>    =   SYS$COMMON:[SYS$ZONEINFO.USER]
>    =   SYS$COMMON:[SYS$ZONEINFO.SYSTEM]
>
> $ dir *.dir
>
> Directory SYS$COMMON:[SYS$ZONEINFO.USER]
> SOURCES.DIR;1
> Total of 1 file.
>
> Directory SYS$COMMON:[SYS$ZONEINFO.SYSTEM]
> AFRICA.DIR;1        AMERICA.DIR;1       ANTARCTICA.DIR;1    ARCTIC.DIR;1
> ASIA.DIR;1          ATLANTIC.DIR;1      AUSTRALIA.DIR;1     BRAZIL.DIR;1
> CANADA.DIR;1        CHILE.DIR;1         ETC.DIR;1           EUROPE.DIR;1
> INDIAN.DIR;1        MEXICO.DIR;1        MIDEAST.DIR;1       PACIFIC.DIR;1
> SOURCES.DIR;1       US.DIR;1
> Total of 18 files.
>
> $ dir [.antarctica]
> %DIRECT-E-OPENIN, error opening SYS$COMMON:[SYSMGR.ANTARCTICA]*.*;* as input
> -RMS-E-DNF, directory not found
> -SYSTEM-W-NOSUCHFILE, no such file
>
> Looks to me like a big bug. A DIRECTORY command works as expected and ignores
> the [SYSMGR] that remains from the previous default directory, but trying to set
> def to a subdirectory fails because it then uses the [SYSMGR] and discards the
> real current location.

This is just how search lists work. In the *.dir case you didn't
specify a directory, so DIR first goes to SYS$DISK. Since it contains
directories, it uses those. When you specified DIR [.ANTARCTICA], you
explicitly specified a directory, so that overrode the directory in SYS
$DISK.

Try the same thing but instead of DIR *.DIR run DIR []*.DIR and you
will see that the two are different because [] means the default
directory which is [SYSMGR].

That's just how search lists work: If your file-spec doesn't include
brackets, the directory comes from SYS$DISK. If your file spec *does*
include brackets, the directory comes from the "default directory"
which is given in the first line of the output from SHOW DEFAULT.

BTW, this is actually explained in the examples for SET DEFAULT and
SHOW DEFAULT, so it's even documented!

AEF

0
Reply spamsink2001 (3065) 3/7/2007 11:07:41 PM

JF Mezei wrote:
> 
> Alpha VMS 8.3:  (also behaves the same on VAX VMS 7.3)
> 
> $ show def
>    TCPIP$TFTP_ROOT:[SWITCH1]
> 
> $ cd sys$tzdir:
> 
> $ show def
>    SYS$TZDIR:[SWITCH1]
>    =   SYS$COMMON:[SYS$ZONEINFO.USER]
>    =   SYS$COMMON:[SYS$ZONEINFO.SYSTEM]
> 
> $ show log sys$tzdir/full
>     "SYS$TZDIR" [exec] = "SYS$SYSROOT:[SYS$ZONEINFO.USER]" (LNM$SYSTEM_TABLE)
>          = "SYS$SYSROOT:[SYS$ZONEINFO.SYSTEM]"

Same on V7.3-2:

DJAS02::DDACHTERA$ cd sys$tzdir
DJAS02::DDACHTERA$ pwd
  SYS$TZDIR:[DDACHTERA]
  =   SYS$COMMON:[SYS$ZONEINFO.USER]
  =   SYS$COMMON:[SYS$ZONEINFO.SYSTEM]

(Wow! CD -AND- PWD! That'll mess ya up, huh? ;-)

My CD.COM is available on my freeware site. PWD is simply:

DJAS02::DDACHTERA$ sh sym pwd
  PWD == "SHOW DEFAULT"

Just as a prove-out:

DJAS02::DDACHTERA$ set def sys$tzdir
DJAS02::DDACHTERA$ sh def
  SYS$TZDIR:[DDACHTERA]
  =   SYS$COMMON:[SYS$ZONEINFO.USER]
  =   SYS$COMMON:[SYS$ZONEINFO.SYSTEM]

-- 
David J Dachtera
dba DJE Systems
http://www.djesys.com/

Unofficial OpenVMS Marketing Home Page
http://www.djesys.com/vms/market/

Unofficial Affordable OpenVMS Home Page:
http://www.djesys.com/vms/soho/

Unofficial OpenVMS-IA32 Home Page:
http://www.djesys.com/vms/ia32/

Unofficial OpenVMS Hobbyist Support Page:
http://www.djesys.com/vms/support/
0
Reply djesys.no (1536) 3/8/2007 3:35:47 AM

4 Replies
41 Views

(page loaded in 0.151 seconds)

Similiar Articles:











7/8/2012 7:15:07 AM


Reply: