Operating System - OpenVMS
1748200 Members
3526 Online
108759 Solutions
New Discussion юеВ

Re: C function to check for valid openVMS path specifcation

 
Steven Schweda
Honored Contributor

Re: C function to check for valid openVMS path specifcation

> (and just to add, I was just looking to
> syntactically validate a string for a valid
> openVMS path.)

But, as you can see, that can mean different
things, especially in a C context, where a
UNIX-like file spec is also accepted.
David Jones_21
Trusted Contributor

Re: C function to check for valid openVMS path specifcation

For just checking syntax, SYS$FILESCAN is an alternative to SYS$PARSE that may be easier for a novice to use.
I'm looking for marbles all day long.
John Gillings
Honored Contributor

Re: C function to check for valid openVMS path specifcation

re David, $FILESCAN

I'm not sure $FILESCAN does what Almond wants. $FILESCAN is happy to parse any random string, looking for anything which might be a filespec. You'll get a success status regardless of what you input (as long as the arguments are valid). For a completely invalid filespec the fldflags parameter will be empty, but any trailing garbage will be ignored in a valid filespec.

You could use the valuelst item list to extract the fields which $FILESCAN found, then reconstruct the proposed filespec and compare it with your input. If not equal there were excess characters in the string, and it is therefore invalid. That seems like a lot of work, and I suspect it would fail if you fed it an access control string with a password.

Perhaps try LIB$TRIM_FILESPEC?

LIB$TRIM_FILESPEC(instring,outstring,width,outlength)

make "width" longer than instring and check for a non-null outstring. Status seems to be success for all input strings. TRIM_FILESPEC uses $FILESCAN, but does all the unpacking and packing for you.

(BTW what decided to remove the HTML versions of the OpenVMS document set, replacing them with only PDF?

Not only do I now have to download a complete manual to read anything, but I now have to search it, rather than navigate an index. No doubt it's cheaper because they no longer have to maintain HTML indexes, but at what cost to customer satisfaction? At the very least they could have left the existing versions)
A crucible of informative mistakes
Steven Schweda
Honored Contributor

Re: C function to check for valid openVMS path specifcation

> (BTW what decided to remove the HTML
> versions of the OpenVMS document set,
> replacing them with only PDF?

It's a mystery to me. I seem to recall
having the same complaint about the HP-UX
"man" stuff. Idiocy would seem to be the
most likely explanation.

> [...] At the very least they could have
> left the existing versions)

No, at the _very_ least, they could have
removed everything. But I'll admit that
removing the most conveniently useful
material is pretty close.
Dennis Handly
Acclaimed Contributor

Re: C function to check for valid openVMS path specifcation

Hoff
Honored Contributor

Re: C function to check for valid openVMS path specifcation

>>Not only do I now have to download a complete manual to read anything, but I now have to search it, rather than navigate an index.

>Unfortunately. :-(

Mac OS X boxes will search the downloaded PDFs at blinding speed with the Spotlight search tool, and AFAIK Windows 7 also offers high-performance searches.

Downloading PDFs was already far more efficient than the HTML-based approach. (This also given the longstanding problems with the HP "search" engine indexing, and the unfortunate fondness for blocking Googlebot from various parts of the HP web site.)

There are secondary issues around the formatting of the downloaded PDF files. Many unfortunately seem to have been generated by substandard tools or conversions, and lack internal hyperlinks and related PDF features.
John Gillings
Honored Contributor

Re: C function to check for valid openVMS path specifcation

Hoff,

>Mac OS X boxes will search the downloaded
>PDFs at blinding speed

Sure, searches are fast, independent of OS, but they have no context, and I can't search until I've completed a 2MB download. That takes time, especially on this side of the planet. Since the documents themselves have cryptic names, it's non trivial to cache copies and keep track of them, and I then have to track changes.
Consider, suppose I want to look up a specific routine, let's say CREATE. With an INDEX I can use headings to go direct to the top of the routine I'm looking for. With a text search function, I get a bazillion hits in other contexts which aren't relevant to what I'm looking for. Indeed, the indexes and TOCs in the PDFs are a HINDERANCE because the documents themselves have no cross links. Thus, when I'm searching for even a highly specific string like LIB$TRIM_FILESPEC, the first few hits are in the (useless) index or TOC, instead of what I'm looking for.
A crucible of informative mistakes
John Gillings
Honored Contributor

Re: C function to check for valid openVMS path specifcation

I knew that HP had descended into Dilbert World to some extent, but hadn't realised how far!

Here is HPs response regarding the documentation:

"We regret the inconvenience. The HTML pages
were not complying to the HP standards and
had to be removed from the site."

So, instead of pushing back on the standard saying "that would inconvenience our paying customers - the standard should be changed", or reprocessing the HTML pages to conform with whatever nonsense the pointy haired bosses decided to call a standard, the "solution" is to delete useful information?

Wow!
A crucible of informative mistakes
Steven Schweda
Honored Contributor

Re: C function to check for valid openVMS path specifcation

> [...] not complying to the HP standards [...]

And I was afraid that they wouldn't have a
good reason. Silly of me, I see now.

This from the people who give us "Error while
posting the reply" half the time when we're
foolish enough to try "Submit>>" after
"Preview>>". It's enough to drive one to
personal abuse.
WW304289
Frequent Advisor

Re: C function to check for valid openVMS path specifcation

Some nitpicking.

> [...] not complying to the HP standards [...]

This "complying to" got my attention so I went and checked.

From <>

"
Is it comply with or comply to?

It is "comply with" or "conform to" not "comply to."

To act in agreement with rules or requests.
Definitely comply with
"

It will be interesting to see what form they will use in the announcement about complete removal of the documentation.

-Boris