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

How to deduct 'minutes' from Time stamp in COBOL?


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mohanrazz

New User


Joined: 30 Sep 2008
Posts: 30
Location: India

PostPosted: Mon Oct 06, 2008 3:04 pm
Reply with quote

Hi,

Is there any INTRINSIC function to deduct minutes from timestamp.?

One timestamp will be passed to my COBOL program as Parm. In another PARM, i will be recieving a numeric value for MINUTES. I have to reduce this many minutes from the given time stamp. After deducting the minutes, if hour changes, i have to handle that. If time changes i have to handle that also.

For e.g. if timestamp passed to my cobol program is :
ws-in-ts ==> 2008-10-06-00.25.00.000000

If MINUTES to be deducted (passed as parm to my cobol program) is:
ws-in-min ==> 65

After deduction ws-result-ts should be ==> 2008-10-05-11.20.00.000000

similarly - If ws-in-ts ==> 2009-01-01-01.05.00.000000 and ws-in-min is 120, ws-res-ts should be ==> 2008-12-31-11.05.00.000000

Is there any intrinsic function to handle such scenarios?
Back to top
View user's profile Send private message
mohanrazz

New User


Joined: 30 Sep 2008
Posts: 30
Location: India

PostPosted: Mon Oct 06, 2008 3:19 pm
Reply with quote

SORRY..i gave wrong output in results: it should be 24 hour format:

For e.g. if timestamp passed to my cobol program is :
ws-in-ts ==> 2008-10-06-00.25.00.000000

If MINUTES to be deducted (passed as parm to my cobol program) is:
ws-in-min ==> 65

After deduction ws-result-ts should be ==> 2008-10-05-23.20.00.000000

similarly,
If ws-in-ts ==> 2009-01-01-01.05.00.000000 and ws-in-min is 120, ws-res-ts should be ==> 2008-12-31-23.05.00.000000
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top