Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-12-2007 03:21 AM
тАО04-12-2007 03:21 AM
I need to return the highest version number of a file.
I tried using
$ SPEC = F$PARSE("INFO.COM",,,"VERSION",""SYNTAX_ONLY"")
$ sh sym spec
The return value is ";" only.
Can anyone please let me know how to obtain the highest version of a file using F$PARSE.
Thnaks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-12-2007 03:30 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-12-2007 03:33 AM
тАО04-12-2007 03:33 AM
Re: F$PARSE
files, remove the "SYNTAX_ONLY".
LEXICALS
F$PARSE
Arguments
parse-type
[...]
SYNTAX_ The syntax of the file specification is checked
ONLY without verifying that the specified directory exists
on the specified device.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-12-2007 03:51 AM
тАО04-12-2007 03:51 AM
Re: F$PARSE
$ dir sys$login:login.com;
Directory ROOT$USERS:[JON]
LOGIN.COM;231
Total of 1 file.
$ write sys$output f$parse("sys$login:login.com;",,,"VERSION")
;
$
John Abbott had the correct answer with f$search, which is what actually does directory lookups. Give him points.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-12-2007 03:53 AM
тАО04-12-2007 03:53 AM
Re: F$PARSE
Worked in a single shot.
All credits to John.
Thanks again
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-12-2007 03:54 AM
тАО04-12-2007 03:54 AM
Re: F$PARSE
Seems like too big a bug to be but still.
I tried on OpenVMS 7.2-1 and 8.3
An 'ask the wizard' article on this avoids the question:
http://h71000.www7.hp.com/wizard/wiz_9147.html
The only working examples I see are effectively using:
F$PARSE(F$SEARCH(file...),,,"VERSION")
In that case obviously the "SYNTAX_ONLY" does no harm and can be recommended.
btw... why the double-double-quotes?
Act of desperation?
So for now i would recommend
$ SPEC = F$PARSE("INFO.COM",,,"VERSION",""SYNTAX_ONLY"")
Hope this helps some,
Hein van den Heuvel (at gmail dot com)
HvdH Performance Consulting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-12-2007 04:00 AM
тАО04-12-2007 04:00 AM
Re: F$PARSE
Thnaks to all.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-12-2007 04:01 AM
тАО04-12-2007 04:01 AM
Re: F$PARSE
Functionning as designed.
Got side-tracked.
Parse is supposed to do just that: look at pieces of string.
It should NOT look up the file.
F$SEARCH will do that.
Sorry if I confused anyone.
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-12-2007 05:03 AM
тАО04-12-2007 05:03 AM
Re: F$PARSE
$ say f$parse("DISK:[NOEXIST]JUNK.DAT",,,,"SYNTAX_ONLY")
DISK:[NOEXIST]JUNK.DAT;
$ say f$parse("DISK:[NOEXIST]JUNK.DAT",,,,)
$ say f$parse("DISK:[NOEXIST]JUNK.DAT",,,"DEVICE",)
DISK:
$ say f$parse("DISK:[NOEXIST]JUNK.DAT",,,"DIRECTORY",)
[NOEXIST]
$ say f$parse("DISK:[NOEXIST]JUNK.DAT",,,"NAME",)
JUNK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-13-2007 01:38 AM
тАО04-13-2007 01:38 AM
Re: F$PARSE
"By default, the F$PARSE function verifies that the directory in the file specification exists on the device in the file specification; however, the existence of the directory is not verified if you provide a field argument."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-14-2007 03:31 AM
тАО04-14-2007 03:31 AM
Re: F$PARSE
You can wrap it in F$INTEGER to return the value as as a numeric symbol rather than a string
Eg.
$SPEC =
F$INTEGER(F$PARSE(F$SEARCH("INFO.COM;"),,,"VERSION")-";")
J.