The Question is:
I mm trying to obtain the version number from files in multiple directories so
that I can compare them to 32000, to send out warning messages before they
reach the version limit of 32767.
I have been able to use f$parse and f$extract to do this in testing if I
explicitly include the version number as part of the filespec argument for
f$parse. But I have not been able to obtain the version number and do it
The Answer is :
You have not provided the code involved, which makes it exceedingly
difficult for the OpenVMS Wizard to determine the specific error(s).
Here is the general sequence for coding this task in DCL:
wildcode f$search for the next file to be evaluated.
test for the end of the search processing; test for a blank string.
f$parse to extract the version string.
subtract the string ";" from the version string, or use f$element.
use f$integer to convert the value to an integer.
test the resulting integer for the target version number range.
loop back to f$search; get the next file.
This task has also been resolved before, you might want to look for
existing solutions to this problem. If you are performing this task
to learn DCL itself, there are books on the topic available that may
(will?) be of interest.
As an alternative, you can use the OpenVMS Freeware DFU utility:
$ DEFINE DFU$NOSMG "TRUE"