IBM SC34-5764-01 Server User Manual


 
NUM_OF_DAYS.2 = 29;
ELSE
NUM_OF_DAYS.2 = 28;
FIRST_WEEKDAY = (TOT_DAYS+1) // 7;
FIRST_WEEKDAY_SAVE = FIRST_WEEKDAY;
DISP_CENTER_MON = MONTH_NAME.MONTH; /* center display month name */
CENTER_DAYS. = ''; /* null out all unused month days */
/* starting at the first weekday of the month fill in center month */
DO I = FIRST_WEEKDAY+1 TO NUM_OF_DAYS.MONTH + FIRST_WEEKDAY ;
CENTER_DAYS.I=I-FIRST_WEEKDAY;
END;
IF MONTH = 1 THEN
LEFT_MONTH = 12;
ELSE
LEFT_MONTH = MONTH - 1;
DISP_LEFT_MON = MONTH_NAME.LEFT_MONTH; /* left display month name */
FIRST_WEEKDAY = (TOT_DAYS - NUM_OF_DAYS.LEFT_MONTH+1) // 7;
LEFT_DAYS. = '';
DO I = FIRST_WEEKDAY+1 TO NUM_OF_DAYS.LEFT_MONTH + FIRST_WEEKDAY ;
LEFT_DAYS.I=I-FIRST_WEEKDAY;
END;
FIRST_WEEKDAY = (TOT_DAYS + NUM_OF_DAYS.MONTH +1) // 7;
IF MONTH = 12 THEN
RIGHT_MONTH = 1;
ELSE
RIGHT_MONTH = MONTH + 1;
DISP_RIGHT_MON = MONTH_NAME.RIGHT_MONTH; /* right display month name */
RIGHT_DAYS. = '';
DO I = FIRST_WEEKDAY+1 TO NUM_OF_DAYS.RIGHT_MONTH + FIRST_WEEKDAY ;
RIGHT_DAYS.I=I-FIRST_WEEKDAY;
END;
ATTR_STRING = 'ATTRIB(' CUR_DAY_FIELD 'RED )' ;
'PANEL SEND CALENDAR' PATH_NAME ATTR_STRING
'PANEL RECEIVE CALENDAR'
IF PAN.AID = 'PF3' THEN
RETURN;
IF PAN.AID = 'PF7' THEN /* go back one month request */
DO;
IF MONTH = 1 THEN /* always keep track of center month */
DO;
MONTH = 12;
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;
MONTH = MONTH - 1;
TOT_DAYS = TOT_DAYS - NUM_OF_DAYS.MONTH;
DISP_RIGHT_MON = DISP_CENTER_MON;
DISP_CENTER_MON = DISP_LEFT_MON;
DOI=1TO37;
RIGHT_DAYS.I = CENTER_DAYS.I;
CENTER_DAYS.I = LEFT_DAYS.I;
END;
Panel Facility
Chapter 24. REXX/CICS Panel Facility 315