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

How to go back to past date in COBOL?


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

New User


Joined: 12 Mar 2009
Posts: 23
Location: Bangalore

PostPosted: Wed Jun 17, 2009 4:15 pm
Reply with quote

Hi ,
I have a requirement in which i need to go 5 years back and need to add 1 day to that day.I am getting the date from a file in mm,dd yyyy format.


For clear picture pls see the below example...

If i am getting the date as June 30,2009,then

5year-period-start-date = June 30,2009 - 5 years + 1=july 1,2004(desired result)
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Wed Jun 17, 2009 4:49 pm
Reply with quote

Hi,

Let's start with -- What logic do you have in mind?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Wed Jun 17, 2009 4:51 pm
Reply with quote

Here is a listing of the LE (language environment) manuals.
pick your release/ops-sys version.

the manuals list routines that you can call to perform date calculations.

If you do a search on this forum, you will find many threads discussion date manipulation.
Back to top
View user's profile Send private message
tapas84

New User


Joined: 12 Mar 2009
Posts: 23
Location: Bangalore

PostPosted: Tue Jun 23, 2009 1:56 pm
Reply with quote

Hi Dick,
Thanks for your input.I got my logic.Thanks again.
Back to top
View user's profile Send private message
kumar40322

New User


Joined: 25 Apr 2009
Posts: 15
Location: Hyderabad

PostPosted: Tue Jun 23, 2009 2:50 pm
Reply with quote

Hi

As u got the logic, can u show me the logic?
Back to top
View user's profile Send private message
sakthikumarT

New User


Joined: 09 Apr 2009
Posts: 50
Location: Bangalore

PostPosted: Tue Jun 23, 2009 3:07 pm
Reply with quote

Could you able to explain your logic.?
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 Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
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 Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
Search our Forums:

Back to Top