I want to print three month calendar with days and dates.
for example - Jan, feb, march.
there are seven columns and seven rows for this. in the first rows all days will come as like mon, tue, wed, thur, fri, sat, sun. in others rows all the dates will come one by one. in the blank spaces "*" is required to fill.
in this manner i want to print three months calendar with days and dates.
can anyone help me regarding this problem. I will appreciate your help.
thanks and regards.
printing months with days and date.
Moderators: dbzTHEdinosauer, Moderator Group
-
- Member
- Posts: 3
- Joined: Sat Apr 21, 2007 3:55 pm
- Location: new Delhi
printing months with days and date.
shashi dubey.
new delhi.
new delhi.
Shashi dubey,
Well I can give you some pointers as how to proceed. well we cant give you the exact code
as your requirement is not complete....
Things like
1 -> Are you trying to print for specific months
2 -> Only for a period of 3 mnts
3 -> DO we have info reg the start and end-dates and the day like sun, mon..and so on...
But i am pretty sure we can achieve what you have asked for
NOTE : If we need to achieve the printing of the months dynamically for any given month
then we need to get the pre-requisites like start-day, end-day....no of days
and the info regarding the start day and end day falls on which day of the week using
some cobol functions or getting the info lile curr date and time from the system.
If you have any questions regarding the approach let us know.
Thanks,
Veera.
Well I can give you some pointers as how to proceed. well we cant give you the exact code
as your requirement is not complete....
Things like
1 -> Are you trying to print for specific months
2 -> Only for a period of 3 mnts
3 -> DO we have info reg the start and end-dates and the day like sun, mon..and so on...
But i am pretty sure we can achieve what you have asked for
Code: Select all
What we need to do is you need to declare a 2 dimensional TABLE in a COBOL pgm.
1 dimension for the column
1 dimension of the row
1 -> To get the const headers like MON,TUE ...initialize the table when the index is
(1,1) , (1,2) (1,3) ...so on until the COLUMN index reached 7 and the row index is const 1.
2 -> For printing the days just increments the counters accordingly 1 to 7 for each row and have a working storage variable and increment it for each time as you increment the column counter for printing the days.
( For this we need to know the start-date and end-date and also starting day and ending day as whether it is sun,mon or so on....
3-> Once you reach the max days for a month , then on...initialize the table again with stars.
NOTE : If we need to achieve the printing of the months dynamically for any given month
then we need to get the pre-requisites like start-day, end-day....no of days
and the info regarding the start day and end day falls on which day of the week using
some cobol functions or getting the info lile curr date and time from the system.
If you have any questions regarding the approach let us know.
Thanks,
Veera.
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