- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Converting VMS Internal Date Fmt to Date Strings i...
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
Discussions
Discussions
Forums
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
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
тАО09-13-2007 09:10 AM
тАО09-13-2007 09:10 AM
Is there any way within DCL to convert these to their sring equivalents (either "dd-mmm-yyyy hh:mm:ss" or "d hh:mm:ss" as appropriate)?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-13-2007 09:40 AM
тАО09-13-2007 09:40 AM
Re: Converting VMS Internal Date Fmt to Date Strings in DCL
The same technique works for any other binary date.
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1155146
Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-13-2007 10:03 AM
тАО09-13-2007 10:03 AM
SolutionIt's buried in amongst Hein's code. The magic incantation is
$ time_string=F$FAO("!%D",F$CVUI(32,32,F$FAO("!AD",8,binary_time)))
where binary_time is a symbol containing a string with the 8 byte binary time value.
Strictly speaking the sequence is undocumented and unsupported. It depends on an interaction between the implementation of strings in DCL and the "blindness" of F$FAO passing arguments to SYS$FAO.
On the other hand, someone would have to try pretty hard to break it, without breaking a whole bunch of supported stuff...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-13-2007 08:16 PM
тАО09-13-2007 08:16 PM
Re: Converting VMS Internal Date Fmt to Date Strings in DCL
You can still read down SYSUAF.DAT to get the username, but it's much easier to return information using the utility.
Example:
$START:
$ DEFINE SYS$OUTPUT SYS$TEMP:UAFMAN_CPL_'PRCPID'.TMP
$ UAF SHOW */BRIEF
$ DEASS SYS$OUTPUT
$ !
$ OPEN /WRITE OUTFILE UAFMAN$TEMP:UAFMAN_CPL_REPORT.TMP
$ OPEN /READ INFILE SYS$TEMP:UAFMAN_CPL_'PRCPID'.TMP
$ READ /END=ERROR INFILE DUMMY ! Dump headers
$ READ /END=ERROR INFILE DUMMY ! Dump headers
$ !
$LOOP:
$ READ /END=END_LOOP INFILE INDATA
$ !
$ USER = F$EDIT(F$EXT(21,15,INDATA),"TRIM")
$ !
$ GETUAI 'USER' /UIC=UIC
$ !
$ IF F$EXT(0,4,UIC) .EQS. "[250" .OR. F$EXT(0,4,UIC) .EQS. "[310"
$ THEN
$ ELSE
$ GOTO LOOP
$ ENDIF
$ !
$ GETUAI 'USER' /PWLIFE=PWDLIFE /OWNER=OWNER /ACCOUNT=ACCOUNT
$ !
$ IF PWDLIFE .NES. " 60 00:00:00.00"
$ THEN
$ WS "%UCPL-I-PWLIFE, User ''USER' has a password life of ''PWDLIFE', owner ''OWNER', group ''ACCOUNT'"
$ WRITE OUTFILE "%UCPL-I-PWLIFE, User ''USER' has a password life of ''PWDLIFE', owner ''OWNER', group ''ACCOUNT'"
$ ENDIF
$ !
$ GOTO LOOP
$ !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-14-2007 12:33 AM
тАО09-14-2007 12:33 AM
Re: Converting VMS Internal Date Fmt to Date Strings in DCL
I read about the $FAO system service & read the threads pointed to in the answer. Makes sense.