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
No new posts SMTP the current generation number of... Jyothi Kulunde JCL & VSAM 4 Thu May 04, 2017 4:08 pm
No new posts How to get current date -1 and curren... murali.andaluri DFSORT/ICETOOL 3 Wed Mar 08, 2017 2:09 pm
No new posts Convert current to hex value gopurs DFSORT/ICETOOL 4 Wed Feb 15, 2017 5:40 am
No new posts Checking Current date vickey_dw DFSORT/ICETOOL 1 Wed Feb 08, 2017 11:14 pm
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


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