Chapter Contents

Previous

Next
The CALENDAR Procedure

Example 5: Schedule Calendar, Blank or with Holidays


Procedure features:
PROC CALENDAR statement
options:
FILL
HOLIDATA=
INTERVAL=WORKDAY
DUR statement
HOLIDUR statement
HOLISTART statement
HOLIVAR statement

This example produces a schedule calendar that displays only holidays. You can use this same code to produce a set of blank calendars by removing the HOLIDATA= option and the HOLISTART, HOLIVAR, and HOLIDUR statements from the PROC CALENDAR step.





Program
 Note about code
data acts;
   input sta : date7. act $ 11-30 dur;
   datalines;
01JAN97   Start                 0
31DEC97   Finish                0
;
 Note about code
data holidays;
   input sta : date7. act $ 11-30 dur;
   datalines;
01JAN97   New Year's            1
28MAR97   Good Friday           1
30MAY97   Memorial Day          1
04JUL97   Independence Day      1
01SEP97   Labor Day             1
27NOV97   Thanksgiving          2
25DEC97   Christmas Break       5
;
 Note about code
options nodate pageno=1 linesize=132 pagesize=30;


 Note about code
proc calendar data=acts holidata=holidays fill interval=workday;


 Note about code
   start sta;
   dur dur;


 Note about code
   holistart sta;
   holivar act;
   holidur dur;
   title1 'Calendar of Holidays Only';
run;



Output

Schedule Calendars with Holidays Only .
Without INTERVAL=WORKDAY, the 5-day Christmas break would be scheduled through the weekend. [HTML Output]
 [Listing Output]


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.