Hi All,
In one of my input file , i am receiving one date field as PIC X(8) format (eg: 20110101), now i have to add 7 days to this date filed and get the resultant date in PIC X(8) (in the above scenario it should be 20110108)same format. i have to consider leap year case also.....
can any one suggest me how to proceed....
Thanks in Advance,
Add 7 days to the date filed
Moderators: dbzTHEdinosauer, Moderator Group
- dbzTHEdinosauer
- Moderator
- Posts: 981
- Joined: Mon Oct 02, 2006 8:31 pm
most sites have established date routines.
suggest you inquire at your workplace, instead of a website that has no knowledge of your site.
after having done that and established that your site does not have an established date routine,
which I seriously doubt if it has been in business for more than a year,
you can look at the LE Overview
and determine which routines to use.
the routines can be found in one of the LE Manuals, found here
suggest you inquire at your workplace, instead of a website that has no knowledge of your site.
after having done that and established that your site does not have an established date routine,
which I seriously doubt if it has been in business for more than a year,
you can look at the LE Overview
and determine which routines to use.
the routines can be found in one of the LE Manuals, found here
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
- dbzTHEdinosauer
- Moderator
- Posts: 981
- Joined: Mon Oct 02, 2006 8:31 pm
already a cobol program?
do you mean the one that is reading the file?
you should have a date-routine-module at your site,
which can be CALLed with parameters,
to perform functions on dates.
do you mean the one that is reading the file?
you should have a date-routine-module at your site,
which can be CALLed with parameters,
to perform functions on dates.
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
- dbzTHEdinosauer
- Moderator
- Posts: 981
- Joined: Mon Oct 02, 2006 8:31 pm
well if you are going to be a one-man-band,
and incorporate in a module a date routine,
which should be available throughout your site (at least application-wise),
then refer to the links I provided in my first post,
(apparently you want to skip all the info about what LE is,
how it is used,
and other fundamental info
since you have not bothered to learn what is available at your site)
download the PROGRAMMERS REFERENCE manual,
look for ceedays and ceedate
which are used most often to calculate increments to dates.
and incorporate in a module a date routine,
which should be available throughout your site (at least application-wise),
then refer to the links I provided in my first post,
(apparently you want to skip all the info about what LE is,
how it is used,
and other fundamental info
since you have not bothered to learn what is available at your site)
download the PROGRAMMERS REFERENCE manual,
look for ceedays and ceedate
which are used most often to calculate increments to dates.
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
-
- Moderator
- Posts: 1625
- Joined: Sat Aug 09, 2008 9:02 am
- Location: Mumbai, India
ickgeek23 - Dick has given you the correct advise, listen him.
You've two options:
With second option, you'll be better off and that's what Dick has been suggesting you since start -- choice is yours.
This sentence does not make much sense - what does this convey about what was asked.yes, cobol program is reading the file, and doing some logic with the date, now i have to just add 7 days to this date ...
You've two options:
- You write your own date routine in COBOL
- Use an existing date-routine at your shop
With second option, you'll be better off and that's what Dick has been suggesting you since start -- choice is yours.
Regards,
Anuj
Anuj
FREE TUTORIALS
Tutorials
Free tutorials from mainframegurukul
- JCL Tutorial
Covers all important JCL concepts. - Cobol Tutorial
This tutorials covers all Cobol Topics from STRING to COMP-3. - DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. - SORT Tutorial
This Tutorial covers all important aspects of DFSORT with examples - CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page