IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

current timestamp


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
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
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts To get the count of rows for every 1 ... DB2 3
No new posts To get the the current time DFSORT/ICETOOL 13
No new posts Changeman - how can we know the curr... Compuware & Other Tools 2
No new posts Fetch data from programs execute (dat... DB2 3
No new posts replace word 'MONTH' with current mon... SYNCSORT 11
Search our Forums:

Back to Top