Chapter Contents

Previous

Next
The CALENDAR Procedure

Example 1: Schedule Calendar with Holidays -- 5-Day Default


Procedure features:
PROC CALENDAR statement
options:
DATA=
HOLIDATA=
WEEKDAYS
DUR statement
HOLISTART statement
HOLIVAR statement
HOLIDUR statement
START statement
Other features:
PROC SORT statement
BY statement
5-day default calendar

This example







Program
 Note about code
data allacty;
   input date : date7. event $ 9-36 who $ 37-48 long;
   datalines;
01JUL96 Dist. Mtg.                  All          1
17JUL96 Bank Meeting                1st Natl     1
02JUL96 Mgrs. Meeting               District 6   2
11JUL96 Mgrs. Meeting               District 7   2
03JUL96 Interview                   JW           1
08JUL96 Sales Drive                 District 6   5
15JUL96 Sales Drive                 District 7   5
08JUL96 Trade Show                  Knox         3
22JUL96 Inventors Show              Melvin       3
11JUL96 Planning Council            Group II     1
18JUL96 Planning Council            Group III    1
25JUL96 Planning Council            Group IV     1
12JUL96 Seminar                     White        1
19JUL96 Seminar                     White        1
18JUL96 NewsLetter Deadline         All          1
05JUL96 VIP Banquet                 JW           1
19JUL96 Co. Picnic                  All          1
16JUL96 Dentist                     JW           1
24JUL96 Birthday                    Mary         1
25JUL96 Close Sale                  WYGIX Co.    2
;
 Note about code
data hol;
   input date : date7. holiday $ 11-25 holilong @27;
   datalines;
05jul96   Vacation        3
04jul96   Independence    1
;
 Note about code
proc sort data=allacty;
   by date;
run;
 Note about code
options nodate pageno=1 linesize=132 pagesize=60;

 Note about code
proc calendar data=allacty holidata=hol weekdays;

 Note about code
   start date;
   dur long;


 Note about code
   holistart date;
   holivar holiday;
   holidur holilong;
   title1 'Summer Planning Calendar:  Julia Cho';
   title2 'President, Community Bank';
run;


Output

Schedule Calendar: 5-Day Week with Holidays
[HTML Output]
 [Listing Output]


Chapter Contents

Previous

Next

Top of Page

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