Dear Wizards,
I have an application which uses RMS-files as database.
In some of these files the application stores timestamp
data (quadword) for various transactions made in the system.
I need to analyze these transactions, and to be able to do
this I need the timestamp converted to a string
(e.g. "2-JAN-1996 16:55:39").
The problem is that I have not found any way to do this
by using DCL or lexical functions (which I must use since
I don't have any compiler for any programming-language).
Can you please tell me how to do this ?
The application today runs on a VAX-4000 system with
VMS 5.5-2, but will soon be moved to an Alpha system
with VMS 6.2 .
Thanks in advance.
This method is totally unsupported and may stop working
eventually, but it seems to work on all versions of OpenVMS, VAX
and Alpha to date.
$ binary_time[0,32] = %xA4FE0000 ! low longword of binary date
$ binary_time[32,32] = %x0099D8C4 ! high longword
$ date_string=f$cvtime(f$fao("!%D",-
f$cvui(32,32,f$fao("!AD",8,binary_time))),"ABSOLUTE")
$ show sym date_string
DATE_STRING = "7-FEB-1996 09:10:53.00"
The F$FAO magic depends on the way DCL stores strings internally. It's
not at all supported. Use at your own risk.