LEFT_MONTH = 12;
ELSE
LEFT_MONTH = MONTH - 1;
FIRST_WEEKDAY = (TOT_DAYS - NUM_OF_DAYS.LEFT_MONTH +1) // 7;
DISP_LEFT_MON = MONTH_NAME.LEFT_MONTH;
LEFT_DAYS. = '';
DO I = FIRST_WEEKDAY+1 TO NUM_OF_DAYS.LEFT_MONTH + FIRST_WEEKDAY ;
LEFT_DAYS.I=I-FIRST_WEEKDAY;
END;
END; /* if pan.aid = 'pf7' */
ELSE
DO;
TOT_DAYS = TOT_DAYS + NUM_OF_DAYS.MONTH;
IF MONTH = 12 THEN /* always keep track of center month */
DO;
MONTH = 1;
YEAR = YEAR + 1;
IF YEAR // 400 &lnot;= 0 & YEAR // 4 = 0 THEN /* leap year? */
NUM_OF_DAYS.2 = 29;
ELSE
NUM_OF_DAYS.2 = 28;
END;
ELSE
MONTH = MONTH + 1;
DISP_CENTER_MON = DISP_RIGHT_MON;
DOI=1TO37
LEFT_DAYS.I = CENTER_DAYS.I; /* shift the months to left */
CENTER_DAYS.I = RIGHT_DAYS.I;
END;
IF MONTH = 12 THEN /* need a new right month */
RIGHT_MONTH = 1;
ELSE
RIGHT_MONTH = MONTH + 1;
FIRST_WEEKDAY = (TOT_DAYS + NUM_OF_DAYS.MONTH +1) // 7;
RIGHT_DAYS. = '';
DO I = FIRST_WEEKDAY+1 TO NUM_OF_DAYS.RIGHT_MONTH + FIRST_WEEKDAY;
RIGHT_DAYS.I=I-FIRST_WEEKDAY;
END;
END; /* if pan.aid = 'pf8' */
/* and set it to red. */
ATTR_STRING = ''; /* assume current day not on screen */
IF YEAR = CUR_YEAR THEN
SELECT;
WHEN MONTH = CUR_MONTH THEN /* current month in middle */
DO;
CUR_DAY_FIELD = 'CENTER_DAYS.'||,
(SUBSTR(DATE_SAVE,7,2)+FIRST_WEEKDAY_SAVE);
ATTR_STRING = 'ATTRIB(' CUR_DAY_FIELD 'RED )' ;
END;
DO;
CUR_DAY_FIELD = 'LEFT_DAYS.'||,
(SUBSTR(DATE_SAVE,7,2)+FIRST_WEEKDAY_SAVE);
ATTR_STRING = 'ATTRIB(' CUR_DAY_FIELD 'RED )' ;
END;
DO;
CUR_DAY_FIELD = 'RIGHT_DAYS.'||,
Panel Facility
316
CICS TS for VSE/ESA: REXX Guide