[an error occurred while processing this directive]

HP OpenVMS Systems

Ask the Wizard
» 

HP OpenVMS Systems

OpenVMS information

» What's new on our site
» Upcoming events
» Configuration and buying assistance
» Send us your comments

HP OpenVMS systems

» OpenVMS software
» Supported Servers
» OpenVMS virtualization
» OpenVMS solutions and partners
» OpenVMS success stories
» OpenVMS service and support
» OpenVMS resources and information
» OpenVMS documentation
» Education and training

Quick Links

» Non-javascript page
» Ask the Wizard
» OpenVMS FAQ

Test Drive OpenVMS

» OpenVMS I64 test drive
» Java test drive

Other information resources available to you include:

» OpenVMS freeware
» ECO kits, software and hardware support, prior version support
» Alpha SRM, ARC, and AlphaBIOS firmware updates
» ENCOMPASS - HP user group
» OpenVMS software downloads, OpenVMS freeware CD-ROM
» OpenVMS firmware locations
» DECconnect passive adaptor charts
» Cables reference guide
» MicroVAX console commands
» OpenVMS student research

Select a topic below to see Questions Frequently Asked by partners

» Using the online documentation library(installing BNU from the asap SDK)
» Global sections(how to create and use.)
» xx$CREATE_BUFOBJ system service(usage)
» Ethernet address(methods of determination)
» Shareable images(cookbook approach to creating one)
» Sharing data/code at absolute addresses(a guide with examples)
» Determining the Alpha microprocessor
» Using GETSYI to get hardware status

Evolving business value

» Business Systems Evolution
» AlphaServer systems transition planning
» Alpha RetainTrust program

Related links

» HP Integrity servers
» HP Alpha systems
» HP storage
» HP software
» HP products and services
» HP solutions
» HP support
disaster proof
HP Integrity server animation
HP Integrity server animation
Content starts here

Ask the Wizard Questions

DCL to convert binary time to text

The Question is:


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.


The Answer is:

    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.