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
 

 

How to go back to past date in COBOL?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: How to go back to past date in COBOL?
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

Senior Member


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

PostPosted: Wed Jun 17, 2009 4:49 pm    Post subject:
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: 6968
Location: porcelain throne

PostPosted: Wed Jun 17, 2009 4:51 pm    Post subject:
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    Post subject: Reply to: How to go back to past date in COBOL?
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    Post subject:
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: 42
Location: Bangalore

PostPosted: Tue Jun 23, 2009 3:07 pm    Post subject:
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    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 XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm
No new posts COBOL DB2 program - zIIP eligible vasanthz COBOL Programming 7 Wed May 31, 2017 5:12 am


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