[Info-vax] Search for folders
Arne Vajhøj
arne at vajhoej.dk
Sat Jan 27 15:22:52 EST 2024
On 1/27/2024 3:06 PM, Arne Vajhøj wrote:
> On 1/27/2024 1:48 PM, Single Stage to Orbit wrote:
>> In my system account when I log in and run the dir command it shows me
>> this:
>>
>> $ dir/page
>>
>> Directory SYS$SYSROOT:[SYSMGR]
>
>> Total of 25 files.
>>
>> Directory SYS$COMMON:[SYSMGR]
>
>> [ snip ]
>>
>> Why does it shows me two directories?
>
> Now it starts to become a little bit tricky to explain.
>
> Let us start with the practical version.
>
> In VMS "default directory" does not need to be
> a single directory - it can actually be a list of
> directories.
>
> When opening an existing file all in the list are searched.
>
> When creating a new file it get created in the first
> in the list.
>
> It is rarely used by VMS users.
>
> But it is used by VMS itself.
>
> SYS$SYSROOT:[SYSMGR] is really disk:[SYSn.SYSMGR]
> SYS$COMMON:[SYSMGR] is really disk:[VMS$COMMON.SYSMGR] *and*
> disk:[SYSn.SYSCOMMON.SYSMGR]
>
> It is a cluster thing.
>
> disk:[SYS0.SYSMGR] contains file specific for node 0
> disk:[SYS1.SYSMGR] contains file specific for node 1
> disk:[SYS2.SYSMGR] contains file specific for node 2
>
> disk:[VMS$COMMON.SYSMGR] = disk:[SYS0.SYSCOMMON.SYSMGR] =
> disk:[SYS1.SYSCOMMON.SYSMGR] = disk:[SYS2.SYSCOMMON.SYSMGR] contains
> files shared by all 3 nodes
>
> So as a system manager you can have COM files specific for a node
> or shared for all nodes.
>
> Powerful.
>
> But also potential confusing.
And regarding the technical stuff behind it, then
it is possible because:
* the device part and the directory part of default
are store separately (in a logical SYS$DISK and
in process memory respectively)
* the device part does not need to be a device only
but can be a device plus a directory accessed via
a so called rooted logical
* a logical can have multiple values
Here comes a user example.
$ dir [...]
Directory DKA0:[arne.fun]
fun.txt;1 morefun.DIR;1
Total of 2 files.
Directory DKA0:[arne.fun.morefun]
morefun.txt;1
Total of 1 file.
Grand total of 2 directories, 3 files.
$ define/nolog funroot DKA0:[arne.fun.] /transl=(conc,term)
$ define/nolog morefunroot DKA0:[arne.fun.morefun.] /transl=(conc,term)
$ dir funroot:[000000]
Directory FUNROOT:[000000]
fun.txt;1 morefun.DIR;1
Total of 2 files.
$ dir morefunroot:[000000]
Directory MOREFUNROOT:[000000]
morefun.txt;1
Total of 1 file.
$ define/nolog doublefunroot funroot,morefunroot
$ dir doublefunroot:[000000]
Directory funroot:[000000]
fun.txt;1 morefun.DIR;1
Total of 2 files.
Directory morefunroot:[000000]
morefun.txt;1
Total of 1 file.
Grand total of 2 directories, 3 files.
Arne
More information about the Info-vax
mailing list