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
 

 

Need to add time in timestamp

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
rajeevdas03
Warnings : 1

New User


Joined: 21 Jan 2006
Posts: 19
Location: Mumbai

PostPosted: Tue Oct 20, 2015 8:49 am    Post subject: Need to add time in timestamp
Reply with quote

Hi friends,

How to add time in timestamp.
ex:
cm no shop no timestamp
123456 abcd 12/4/2014 07:34:23

I want to add 1500( 15 hrs time to timestamp).

please let me know how to do this, Appriciate your help in this.

Regards,
Raj
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Tue Oct 20, 2015 11:43 am    Post subject: Reply to: Need to add time in timestamp
Reply with quote

There's an ADD function, and if you go over 24 hours, so you have to adjust the date, there's and ADDDAYS function for the date part.
Back to top
View user's profile Send private message
rajeevdas03
Warnings : 1

New User


Joined: 21 Jan 2006
Posts: 19
Location: Mumbai

PostPosted: Tue Oct 20, 2015 11:18 pm    Post subject:
Reply with quote

Thanks,

can you please give me syntax for this, how to add this to get desired output
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Tue Oct 20, 2015 11:41 pm    Post subject: Reply to: Need to add time in timestamp
Reply with quote

where are you facing problems ,
the logic or the control statements ?
Back to top
View user's profile Send private message
rajeevdas03
Warnings : 1

New User


Joined: 21 Jan 2006
Posts: 19
Location: Mumbai

PostPosted: Wed Oct 21, 2015 10:41 pm    Post subject:
Reply with quote

Thanks Enrico,

Actually I need to add time in timestamp for different counties,

like india, Aus, Uk

ex:

time stamp is 2015-07-1218.13.00.000000 and I need to add 1230 time into this timestamp, this 1230 time is indian time differnce which is ahead of US time.

I am not sure how to do this using Sort or if this possible or not also not sure about syntax and statement,

Please help me to get desired result.

Regards,
Raj
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1610
Location: NY,USA

PostPosted: Wed Oct 21, 2015 11:34 pm    Post subject:
Reply with quote

Raj, You could have got it by yourself it you would have spend time doing research.
Anyway's, here is what I have found for you. think how to modify this to fit to your reuqirement.

http://ibmmainframes.com/viewtopic.php?t=45058&postdays=0&postorder=asc&start=0
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Thu Oct 22, 2015 4:55 am    Post subject: Reply to: Need to add time in timestamp
Reply with quote

I thought I'd said this already. You add your value to the time. If the time therefore goes over 23, you adjust, and add one to the day, using the built-in function.

That's it. Nothing else from what you have stated. Except you want different values, which you didn't mention originally. And half-hours. Which is 30 minutes. And multiple timezones, which could require subtraction (you haven't said).

So how will you know which value to add (or subtract) from the hours?

Can you just use an offset (+05.5). That's very common.
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 -> DFSORT/ICETOOL 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 a job submitted itself every time... arunsoods JCL & VSAM 3 Tue Nov 22, 2016 4:05 pm
No new posts Check System time(Minute) Using TIME1... balaji81_k DFSORT/ICETOOL 5 Fri Nov 11, 2016 10:53 am
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 cics & real time monitoring icehat CICS 5 Wed Sep 07, 2016 2:29 am
No new posts Get system time in micro second or cl... lind sh CICS 11 Mon Sep 05, 2016 11:14 pm


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