Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!lll-tis!ames!mailrus!tut.cis.ohio-state.edu!ut-sally!utah-cs!utah-gr!uplherc!sp7040!obie!wsccs!dave From: dave@wsccs.UUCP (VAX Headroom @ The End of the Galaxy) Newsgroups: comp.os.vms Subject: Re: VMS logicals help -> dir and -> sub-dir Message-ID: <163@wsccs.UUCP> Date: 17 Feb 88 23:28:13 GMT References: <722@zycad.UUCP> Lines: 44 Keywords: vms4.5, logicals Summary: How to append a NULL directory In article <722@zycad.UUCP>, kjb@zycad.UUCP (Kevin Buchs) writes: > > If I define a logical as node::disk:[directory] then there is no way to > refer to subdirectories. If I instead define the logical as > node::disk:[directory.] (notice the trailing dot) then this logical does > allow [sub-directory] to be appended. It however cannot be used without > appending a subdirectory, and there is no way to append a null subdirectory. $ define x node::disk:[directory.] /translate=conceiled $ dir x:[000000] will give you the top directory. I like to refer to logical names defined the way x above is as "fake devices" since they will appear to be a device in directory listings and they act like devices. 000000 is how you get THE root directory on a disk like dir $disk1:[000000]. We used to have $disk1 defined as sys$sysdevice:[disk1.]/trans=conc when we had one disk drive and put our users there. When we got a new disk drive we redefined $disk1 to be dub0:/trans=conc and did a copy sys$sysdevice:[*...] $disk1:[...] and it worked fine. No changes to the authorize records were necessary. Anyway, 000000 is equivalent to the "root" directory on a "device", or, if you prefer, a null directory. you may occasionally see outputs from these types of things as dua0:[disk1.][000000] or dua0:[disk1.][user1.c] Also, this only works once, you can't have define x dua0:[disk1.]/trans=conc define y x:[xyz.]/trans=conc as the result of dir y:[a] would be (internally) dir dua0:[disk1.][xyz.][a] and VMS wont buy this. (at least the last time I tried it.) Also, using "fake devices" it is possible to get directories more than eight levels deep. +-----------------------------------------------------------------------------+ | | Dave E Martin | DISCLAIMER: Been Cancelled | | /\ | "...between the streets of | $ opinion/mine/noUinTech | | / \ . /\ | Dallas, and the beaches of |----------------------------| | / \/ \/\/ \ | Miami ... THIS was Max | ...!ihnp4!utah-cs!utah-gr! | | / U i n T e c h \ | Headroom's finest hour." | uplherc!sp7040!obie! | | | --Max Headroom | wsccs!net23.dnet!dave | +-----------------------------------------------------------------------------+