MAINFRAME - TIP OF THE DAY :
Q. If there is a situation, where we need to code more than 255 steps in a JOB?
A. We need to split jcl into two jcls , at the end of the first jcl check the condition code and initiate the second jcl.
Programmers Voted for below topics. Please Vote for good Posts.
Thank You! for your feedback. Connecting to the server. Please Wait...
Posted: Sun Apr 22, 2007 5:18 pm Post subject: printing months with days and date.
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. _________________ 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....
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
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.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum