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
 
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. UTC Timestamp Log Thangavel COBOL Programming 5 Mon Jan 22, 2018 9:04 pm
No new posts Fetching data from JHS as per the cur... arunsoods All Other Mainframe Topics 4 Wed Nov 22, 2017 1:54 pm
No new posts Comparision with current time arunsoods DFSORT/ICETOOL 5 Thu Nov 09, 2017 10:37 am
This topic is locked: you cannot edit posts or make replies. Comparing current time with the time ... arunsoods SYNCSORT 1 Mon Oct 30, 2017 4:07 pm
This topic is locked: you cannot edit posts or make replies. Incrementing current time field by 30... arunsoods DFSORT/ICETOOL 11 Thu Oct 26, 2017 3:22 pm

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