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

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

List files with version > 32K

Reply to Message Icon

Name: Gerry Wolf
Date: May 26, 2004 at 12:24:46 Pacific
OS: OpenVMS
CPU/Ram: 600mhz/4GB
Comment:

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

Warmest Regards,

Gerry Wolf



Sponsored Link
Ads by Google

Response Number 1
Name: Hakan Andersson (by HakAnd)
Date: May 26, 2004 at 13:03:43 Pacific
Reply:

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


0

Response Number 2
Name: kelbell
Date: May 27, 2004 at 04:10:03 Pacific
Reply:

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. :-)


0

Response Number 3
Name: WillemGrooters
Date: May 27, 2004 at 23:46:51 Pacific
Reply:

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


0

Response Number 4
Name: kelbell
Date: May 29, 2004 at 15:26:48 Pacific
Reply:

Even better quibbling, Bill! Thanks. :-)


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to OpenVMS Forum Home


Sponsored links

Ads by Google


Results for: List files with version > 32K

Create a new file with text in existing file www.computing.net/answers/openvms/create-a-new-file-with-text-in-existing-file/594.html

Boot with 2nd System Drive www.computing.net/answers/openvms/boot-with-2nd-system-drive/323.html

Fileconversionproblem with SAMBA www.computing.net/answers/openvms/fileconversionproblem-with-samba/445.html