Computing.Net > Forums > OpenVMS > List files with version > 32K

List files with version > 32K

Reply to Message Icon

Original Message
Name: Gerry Wolf
Date: May 26, 2004 at 12:24:46 Pacific
Subject: List files with version > 32K
OS: OpenVMS
CPU/Ram: 600mhz/4GB
Comment:

Need a DCL procedure to find files with version number > 30K

Warmest Regards,

Gerry Wolf


Report Offensive Message For Removal


Response Number 1
Name: Hakan Andersson (by HakAnd)
Date: May 26, 2004 at 13:03:43 Pacific
Subject: List files with version > 32K
Reply: (edit)

Without looking at the lexicals or
any deeper investigation.......

another quick and dirty DCL-script

$10:
$ file=f$search("disk:<000000...>*.*;*")
$ if file .eqs. "" then goto 20
$ vn=f$extract(f$locate(";",file)+1,6,file)
$ if vn .lt. 30000 then goto 10
$ write sys$output "''file'"
$ goto 10
$20:
$ exit


Report Offensive Follow Up For Removal

Response Number 2
Name: kelbell
Date: May 27, 2004 at 04:10:03 Pacific
Subject: List files with version > 32K
Reply: (edit)

Change
vn=f$extract(f$locate(";",file)+1,6,file)
to
vn=f$element(1,";",file)

and

Change
write sys$output ""file'"
to
write sys$output file

But, of course, I'm not one to quibble. :-)


Report Offensive Follow Up For Removal

Response Number 3
Name: WillemGrooters
Date: May 27, 2004 at 23:46:51 Pacific
Subject: List files with version > 32K
Reply: (edit)

To get version, use F$PARSE:

$ version=f$parse(file,,,"VERSION")

This will hold the separator (";") as well.
To get version without ";":

$ version=f$parse(file,,,"VERSION") - ";"

and to get it as a number:

$ version=f$integer(f$parse(file,,,"VERSION") - ";")

Makes it easier to compare:

$ if version .ge. 32000 then ....

Willem Grooters


Report Offensive Follow Up For Removal

Response Number 4
Name: kelbell
Date: May 29, 2004 at 15:26:48 Pacific
Subject: List files with version > 32K
Reply: (edit)

Even better quibbling, Bill! Thanks. :-)


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: List files with version > 32K

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




How often do you use Computing.Net?

Every Day
Once a Week
Once a Month
This Is My First Time!


View Results

Poll Finishes In 3 Days.
Discuss in The Lounge