- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- need routine to parse combination time
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
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
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
05-03-2005 10:53 AM
05-03-2005 10:53 AM
I already know how to define a .CLD module with type=$DATETIME, pass the string to CLI$DCL_PARSE and call CLI$GET_VALUE, but unfortunately I have an application for which that approach is not an option.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2005 01:51 PM
05-03-2005 01:51 PM
SolutionNOTE THIS IS STRICTLY UNSUPPORTED!
I've attached a MACRO32 Module extracted from them OpenVMS sources which implements LIB$CVT_TIME. It's an internal routine used by DCL to parse combination times. I've replaced the names of the engineers in comments with "Engineer#n", to comply with privacy rules, but otherwise, it's directly from the V7.3-2 sources.
RENAME the .TXT file to .MAR and compile with:
$ MACRO CVTTIME
You'll get a few %AMAC-I messages which can be ignored (or fixed... left as an exercise ;-)
Pass it your combination time string, it will return the binary time, and optionally a string. See comments for full details.
(aside... learnt something new, the strings "LOGIN" and "BOOTTIME" may be used just like "YESTERDAY", "TODAY" and "TOMORROW" in combination times - not documented but seems to work back as far as V6.2)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2005 01:52 PM
05-03-2005 01:52 PM
Re: need routine to parse combination time
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2005 01:24 AM
05-04-2005 01:24 AM
Re: need routine to parse combination time
If it were already provided in the system runtime libraries -- wouldn't it be simpler just to set up a call to the lib$ routines to
1. turn the combination time into an absolute binary time, then
2. turn the binary time back into a string?
I mean ... why add the burden of having to maintain the macro code?
Robert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2005 02:06 AM
05-04-2005 02:06 AM
Re: need routine to parse combination time
... if it is already there, and has to be maintained, for the benefit of DCL?
Proost.
Have one on me.
jpe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2005 10:15 AM
05-04-2005 10:15 AM
Re: need routine to parse combination time
In my original post I asked for a C or Fortran routine - weren't you paying attention? No points for you! :)
Just kidding - THANK YOU VERY MUCH for this macro routine. I was hoping for a routine that worked pretty much the same as the CLI$ type=$DATETIME interface, but I expected that it would be impossible to match some of its more obscure "features". To get the actual VMS routine was far more than I could have hoped.
I do wonder about your "STRICTLY UNSUPPORTED" caveat. This seems to be a stand-alone module that only uses VMS system services and a RTL routine ($BINTIM, $ASCTIM, $GETTIM, $GETSYI, $GETJPI, LIB$SCOPY_DXDX) in the supported way.
Now just to be safe I have removed the weak reference to DCL$SCOPY_DXDX and stripped the LIB$ prefix from the names of the module's three entry points.
Therefore I would expect that these routines would continue to work the same way they do now under any future version of VMS. Am I missing something?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2005 04:00 PM
05-04-2005 04:00 PM
Re: need routine to parse combination time
>> I do wonder about your "STRICTLY UNSUPPORTED" caveat.
It is just a CYA clause. John, nor HP, will support that code, but full expect it to work and keep on working. But if it were to behave oddly, for example a poor reaction to a random input addres, then do not try to complain about that code. It will be just as if you written it, and you support it. No you may solicit HP's help, but it would not be under a support contract but under some time & material agreement.
>> This seems to be a stand-alone module that only uses VMS system services and a RTL routine ($BINTIM, $ASCTIM, $GETTIM, $GETSYI, $GETJPI, LIB$SCOPY_DXDX) in the supported way.
Right. So we expect it to work for ever.
>> Now just to be safe I have removed the weak reference to DCL$SCOPY_DXDX and stripped the LIB$ prefix from the names of the module's three entry points.
Excellent!
>> Therefore I would expect that these routines would continue to work the same way they do now under any future version of VMS.
Right
>> Am I missing something?
No, just a place to complain if the code does not always do exactly what you expect.
hth,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2005 04:26 PM
05-05-2005 04:26 PM
Re: need routine to parse combination time
>Therefore I would expect that these routines would continue to work the same way they do now under any future version of VMS. Am I missing something?
Hein is right. The "STRICTLY UNSUPPORTED" is an "all care, no responsibility" thing. I can give you the code, but I can't make a committment to support it into the future.
There's no reason to expect it will stop working, BUT, if anyone changes, fixes or adds stuff to the DCL code, it will be your responsibility to keep it up to date.
That said, I've entered a suggestion that this routine be added to LIBRTL for general consumption (but no promises that it will be accepted).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2005 09:54 PM
05-05-2005 09:54 PM
Re: need routine to parse combination time
For the record, I second John's suggestion that this routine be added to the official LIBRTL.
A suggestion on the LIBRTL and a possible relatively innocuous integration: LIB$TABLE_PARSE already has support for "subexpressions" the full date example is a good possible use of subexpressions (it would also provide a clean way to provide internationalization).
- Bob Gezelter, http://www.rlgsc.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2005 07:53 AM
06-02-2005 07:53 AM
Re: need routine to parse combination time
Bill