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
 

 

current timestamp

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
rambabu
Currently Banned

New User


Joined: 18 Apr 2005
Posts: 67

PostPosted: Fri May 06, 2005 11:34 am    Post subject: current timestamp
Reply with quote

how can i get the current time stamp from db2 and cobol?
what is rtt?
Back to top
View user's profile Send private message

kvivek

New User


Joined: 09 May 2005
Posts: 51
Location: Singapore

PostPosted: Tue May 10, 2005 8:19 pm    Post subject:
Reply with quote

Hi Ram,

DB2
SELECT CURRENT_TIMESTAMP FROM SYSIBM.SYSDUMMY1

COBOL
01 WS-COBOL-TS PIC X(21)
01 WS-TIME-STAMP PIC X(26) VALUE VALUE '0001-01-01-01.01.01.000001'

MOVE FUNCTION CURRENT-DATE TO WS-COBOL-TS
MOVE WS-COBOL-TS(1:4) TO WS-TIME-STAMP(1:4)
MOVE WS-COBOL-TS(5:2) TO WS-TIME-STAMP(6:2)
MOVE WS-COBOL-TS(7:2) TO WS-TIME-STAMP(9:2)
MOVE WS-COBOL-TS(9:2) TO WS-TIME-STAMP(12:2)
MOVE WS-COBOL-TS(11:2) TO WS-TIME-STAMP(15:2)
MOVE WS-COBOL-TS(13:2) TO WS-TIME-STAMP(18:2)

Using the above command we will not be getting the ms part.
Experts please reply whether it's possible to get ms part by any other way?

Regards,
Vivek
Back to top
View user's profile Send private message
rambabu
Currently Banned

New User


Joined: 18 Apr 2005
Posts: 67

PostPosted: Wed May 11, 2005 3:54 pm    Post subject: thankx
Reply with quote

thankx
Back to top
View user's profile Send private message
Prakash_mainframes

New User


Joined: 26 Feb 2005
Posts: 5
Location: Pune

PostPosted: Wed Sep 14, 2005 11:41 am    Post subject: Re: current timestamp
Reply with quote

Hello,

I want to get the current timestamp with the nanoseconds also in my cobol program.. Can you tell me how to perform the same ?
Expecting your reply soon.

Cheers
Prakash
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 -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Get correct date and time when curren... balaji81_k DB2 24 Fri Oct 14, 2016 10:40 pm
No new posts Converting EBCDIC to Unicode (TimeStamp) muralikrishnan_new COBOL Programming 2 Mon Jul 25, 2016 10:42 pm
No new posts Convert Timestamp Value mrdinesh DFSORT/ICETOOL 7 Thu May 05, 2016 6:01 pm
No new posts Retrieve current year or month using ... vnktrrd DFSORT/ICETOOL 15 Tue Mar 15, 2016 4:14 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