Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 9
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: 8400
Location: Dubuque, Iowa, USA

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 Member


Joined: 30 Nov 2013
Posts: 667
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 Member


Joined: 30 Nov 2013
Posts: 667
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 How to get MQPUT Timestamp? Rohit Umarjikar Java & MQSeries 3 Wed Aug 08, 2018 10:33 am
No new posts row change timestamp charanmsrit DB2 3 Tue Jul 10, 2018 12:30 pm
No new posts mapping PLI structure to assembler co... Pedro PL/I & Assembler 3 Fri Jun 01, 2018 2:53 am
No new posts Code Coverage and static analysis too... Aditya.Srivastava PL/I & Assembler 2 Fri May 25, 2018 12:48 pm
No new posts Advanced Assembler Language and MVS I... Paul Voyner All Other Mainframe Topics 0 Wed Apr 18, 2018 3:49 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us