Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

TIMESTAMP in ASSEMBLER

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
ravi243

New User


Joined: 03 Aug 2011
Posts: 8
Location: Bangalore

PostPosted: Tue May 26, 2015 12:13 am    Post subject: TIMESTAMP in ASSEMBLER
Reply with quote

Hi All,


How to read the current time stamp in assembler in MMDDYYYYHHMN? Can Some one please tell me ? STCK is the intruction wihch can be used?? Thanks
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Tue May 26, 2015 12:55 am    Post subject: Reply to: TIMESTAMP in ASSEMBLER
Reply with quote

You posted your question in the COBOL forum. Are you asking about the 21-character COBOL CURRENT-DATE intrinsic function format? Something in Assembler? Something else you have not explained? You mentioned STCK -- but why not use the TIME macro in Assembler instead?

I think you need to start over and explain what you want to know and what language you are using -- COBOL, Assembler, or whatever.
Back to top
View user's profile Send private message
steve-myers

Active User


Joined: 30 Nov 2013
Posts: 462
Location: The Universe

PostPosted: Tue May 26, 2015 1:43 am    Post subject:
Reply with quote

The Assembler TIME macro can obtain the data you want, though not in the format you propose. That is an Assembler question, as Mr. Sample clearly states, not a Cobol question.

This, too, is an Assembler issue: the STCK machine instruction will store a 64-bit binary value that represents the current value in the hardware Time of Date clock. The high order 52 bits represent the number of microseconds since January 1, 1900 in UTC time. In systems using an External Time Reference, this value must be adjusted by the number of "leap" seconds and then converted to local time. Even after these adjustments, as you can see, it requires considerable manipulation to get something more useful.
Back to top
View user's profile Send private message
steve-myers

Active User


Joined: 30 Nov 2013
Posts: 462
Location: The Universe

PostPosted: Tue May 26, 2015 4:05 am    Post subject:
Reply with quote

Code:
         TIME  DEC,RESULT,ZONE=LT,LINKAGE=SYSTEM,DATETYPE=YYYYMMDD
         ...
RESULT   DC    XL16'0'
produced

17235816 42190000 20150525 00000000

in RESULT when displayed as hexadecimal digits. 20150525 is the date, and
17235816 42190000 is the time of day - 17:23:58.16.

The discussion of the TIME macro in MVS Programming Assembler Services Reference Vol 2 (IARR2V-XCTLX) for your z/OS release will tell you about additional options and more detail about the output.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Converting EBCDIC to Unicode (TimeStamp) muralikrishnan_new COBOL Programming 2 Mon Jul 25, 2016 10:42 pm
No new posts Online Assembler Program Starting point Aditya.Srivastava PL/I & Assembler 4 Fri Jul 08, 2016 6:48 pm
No new posts Convert Timestamp Value mrdinesh DFSORT/ICETOOL 7 Thu May 05, 2016 6:01 pm
This topic is locked: you cannot edit posts or make replies. MVS Assembler profiles for Pune Locat... shailesh_do Mainframe Jobs 0 Mon Feb 22, 2016 6:21 pm
No new posts Comparing timestamp in Synscort l.nethaji SYNCSORT 13 Wed Jan 20, 2016 4:47 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us