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

Increment time stamp by 10 secs in a loop


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Anurag Singh

New User


Joined: 20 Jan 2008
Posts: 25
Location: India

PostPosted: Wed Sep 16, 2009 1:59 pm
Reply with quote

Hi,
I have a file with 1000 records , now my requirement is as like i need to increment the timestamp by 10 secs for each of the 1000 records using REXX.

KIndly guide.

Thanks
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Sep 16, 2009 2:01 pm
Reply with quote

A rather strange request. And unfortunately not very well stated.

Is this a new timestamp, and existing timestamp ???
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Sep 16, 2009 2:02 pm
Reply with quote

where do You have problems...
with the logic or with rexx ...
what is the format of the timestamp ?
Back to top
View user's profile Send private message
pdighade

New User


Joined: 21 Jul 2008
Posts: 40
Location: pune

PostPosted: Mon Mar 29, 2010 10:07 pm
Reply with quote

If we want to increment the timestamp by 10 sec in loop for below format

suppose timestamp start from
hh:mm:sec.ms
23:21.12.01

How we can do that Please suggest
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Mar 29, 2010 10:23 pm
Reply with quote

is this thread related to ibmmainframes.com/viewtopic.php?t=47756
Back to top
View user's profile Send private message
pdighade

New User


Joined: 21 Jul 2008
Posts: 40
Location: pune

PostPosted: Mon Mar 29, 2010 10:33 pm
Reply with quote

No this thread is not related to this one just I wanted to know the
syntax for calculating the diff of timestamps and functions like addition od min or sec to timestamps. Other post is different
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Tue Mar 30, 2010 2:04 am
Reply with quote

1. use PARSE instruction to get individual variables for hh, mm and ss.
2. convert hh into seconds and mm into seconds
3. add all together.
4. add 10 to that result

do the reverse (sort of) to get back to timestamp format.
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts To get the the current time DFSORT/ICETOOL 13
No new posts RC query -Time column CA Products 3
This topic is locked: you cannot edit posts or make replies. REXX - Do - Not able to LOOP CLIST & REXX 10
No new posts C Compile time time stamps Java & MQSeries 10
No new posts Parallelization in CICS to reduce res... CICS 4
Search our Forums:

Back to Top