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
 
UTC Timestamp

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Log Thangavel

New User


Joined: 19 Jan 2018
Posts: 6
Location: USA

PostPosted: Mon Jan 22, 2018 9:04 pm    Post subject: UTC Timestamp
Reply with quote

Hi,

Pls let me know if we can able to get the UTC time in COBOL through any date time functions with out using DB2
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: Mon Jan 22, 2018 9:36 pm    Post subject:
Reply with quote

FUNCTION CURRENT-DATE provides a 21-character alphanumeric value with year, month, day, hour, minute, seconds, hundredths of a second, GMT offset sign, GMT offset hours and GMT offset minutes.

This could easily be found in the manual -- why are you not checking there first?
Back to top
View user's profile Send private message
Log Thangavel

New User


Joined: 19 Jan 2018
Posts: 6
Location: USA

PostPosted: Mon Jan 22, 2018 10:07 pm    Post subject: Reply to: UTC Timestamp
Reply with quote

Hi,
Thanks for you response. I knew that function already.

The UTC TS am looking for look like this

<timestamp>2018-01-10T15:00:05.216-06:00</timestamp>
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: Mon Jan 22, 2018 10:56 pm    Post subject:
Reply with quote

Are you SURE you belong on this forum for experts? The difference between the COBOL FUNCTION CURRENT-DATE and what you show in your post are minor format changes and hence well within a competent programmer's wheelhouse. The only real difference is that you would miss the thousandths of a second by using the COBOL function.

Perhaps you should start using Beginners and Students Forum instead of this one since it seems more on your level?
Back to top
View user's profile Send private message
Log Thangavel

New User


Joined: 19 Jan 2018
Posts: 6
Location: USA

PostPosted: Mon Jan 22, 2018 11:18 pm    Post subject:
Reply with quote

Am not sure if you got the question. The last few thousand were the one is missing and was expecting an answer for it

And stop your advices even if you don’t respond
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 Jan 23, 2018 12:36 am    Post subject:
Reply with quote

Quote:
The last few thousand were the one is missing and was expecting an answer for it
and yet you did not ask about this -- you asked about getting UTC time in COBOL. Your question was answered; it is not our fault if you did not clearly explain your requirement nor is it our fault if you failed to ask the right question. Note that fractions of a second are NOT required to be part of a timestamp so missing the thousandths of a second still means the COBOL FUNCTION CURRENT-DATE returns a valid timestamp.

Topic locked to prevent any further waste of time.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> COBOL Programming 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 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 Comparing timestamp in Synscort l.nethaji SYNCSORT 13 Wed Jan 20, 2016 4:47 pm

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