From:	SMTP%"MACRO32@WKUVX1.BITNET" 29-JUN-1993 11:29:41.83
To:	EVERHART
CC:	
Subj:	Re: File utility to see below 8 levels?

X-ListName: "VMS Internals, MACRO, & BLISS Discussions" <MACRO32@WKUVX1.BITNET>
Warnings-To: <>
Errors-To: MacroMan@WKUVX1.BITNET
Sender: MacroMan@WKUVX1.BITNET
Date: Tue, 29 Jun 1993 17:21 +0100 (MET)
From: DNW@NLR.NL
Reply-To: MACRO32@WKUVX1.BITNET
Subject: Re: File utility to see below 8 levels?
To: MACRO32@WKUVX1.BITNET
Message-ID: <01GZYIQ5SY6Q0012XV@HEARNVAX.nic.SURFnet.nl>
X-Envelope-to: MACRO32@WKUVX1.BITNET
X-VMS-To: IN%"MACRO32@WKUVX1.BITNET"
Content-Transfer-Encoding: 7BIT
References: The National Aerospace Laboratory NLR DOES NOT ACCEPT ANY FINANCIAL
            COMMITMENT derived from this message.

>#>Anyone know if there is a niche company out there that has already
>#>developed a program/disk utility for sale that will analyze a disk
>#>and return information on descendant subdirectories below 8 levels?
>#>
>#You can create a rooted device, and then you can come to 16 levels.
>#See chapter 6.3.4 Concatenating Rooted-Directory Specifications,
>#page 6-17 thru 6-19 in the Guide to VMS File Applications (AA-LA78A-TE)
>#which is in the gray wall, volume P 6A.
>
>#Define/trans=conc root device:[d1.d2.d3.d4.d5.d6.d7.d8]
>#Dir root:[d9.d10.d11.d12.d13.d14.d15.d16]
>#or
>#Dir device:[d1.d2.d3.d4.d5.d6.d7.d8.][d9.d10.d11.d12.d13.d14.d15.d16]
>
>I already knew that, but this isn't what I am looking for.  To give you
>some background:  In a Pathworks environment, it is very easy for a PC
>user to create subdirectories on a VMS file service (read: RMS disk)
>as deep as 21 levels, with no error message being generated.  The
>files below the 8th directory will not be backed up during incremental
>passes, and restoring an entire disk (from an image backup) to retrieve files
>is impractical.  Analyze/Disk does not report anything about these
>directories below the 8th level.
>
>I just wanted to ensure nothing was publically available before re-inventing
>the wheel in writing a program to do this.

Maybe you can do the following algorithm:

Rename all .dir files in level 8 subdir.
Do BACKUP
Rename all .dir files back to the directory they came from.

I believe this can all be done in DCL.
A small example:
It will take some time to find the directories on eight
level, so maybe it helps if you already know which
users have more than 8 subdirectories.
And off course you can make better names instead of ZZZ!UL,
just be sure they are the last file is the directory you rename
them to.
You can instead of saving the directory names in dcl-variables
write them to a command file, so you can after restore execute
the command file again.


$! NEED BYPASS PRIVILEGE
$ stream_id=0
$ count=0
$ filename=f$parse("device:[*.*.*.*.*.*.*.*]*.dir;1")
$ write sys$output filename
$ if (filename.nes."")
$ then
$file_search_loop:
$       filename=f$search(filename, stream_id)
$       write sys$output filename
$       if (filename.nes."")
$       then
$               count=count+1
$               name=f$fao("NNN!UL", count)
$               dire=f$fao("DEVICE:ZZZ!UL.DIR", count)
$               &name=filename
$               rename &'name' &dire
$               goto file_search_loop
$       endif
$ endif
$!!! backup stuff
$ restore_loop:
$ if count.gt.0
$ then
$       name=f$fao("NNN!UL", count)
$       dire=f$fao("DEVICE:ZZZ!UL.DIR", count)
$       rename &dire &'name'
$       count=count-1
$       goto restore_loop
$ endif

It's neither a wheel, nor an egg of Columbus,
but I'm sure you can upgrade it to what you want.

>farley@access.digex.com  <Charles U Farley>
>Open the pod door, Hal.
/Carlo Mekenkamp <DNW@NLR.NL>
