Chapter Contents


The CALENDAR Procedure

Example 2: Schedule Calendar Containing Multiple Calendars

Procedure features:
CALID statement:
_CAL_ variable
DUR statement
24-hour day, 7-day week

This example builds on Example 1 by identifying activities as belonging to one of two calendars, business or personal. This example


 Note about code
data allacty2;
  input date:date7. happen $ 10-34 who $ 35-47 _CAL_ $ long;
01JUL96  Dist. Mtg.               All          CAL1   1
02JUL96  Mgrs. Meeting            District 6   CAL1   2
03JUL96  Interview                JW           CAL1   1
05JUL96  VIP Banquet              JW           CAL1   1
06JUL96  Beach trip               family       CAL2   2
08JUL96  Sales Drive              District 6   CAL1   5
08JUL96  Trade Show               Knox         CAL1   3
09JUL96  Orthodontist             Meagan       CAL2   1
11JUL96  Mgrs. Meeting            District 7   CAL1   2
11JUL96  Planning Council         Group II     CAL1   1
12JUL96  Seminar                  White        CAL1   1
14JUL96  Co. Picnic               All          CAL1   1
14JUL96  Business trip            Fred         CAL2   2
15JUL96  Sales Drive              District 7   CAL1   5
16JUL96  Dentist                  JW           CAL1   1
17JUL96  Bank Meeting             1st Natl     CAL1   1
17JUL96  Real estate agent        Family       CAL2   1
18JUL96  NewsLetter Deadline      All          CAL1   1
18JUL96  Planning Council         Group III    CAL1   1
19JUL96  Seminar                  White        CAL1   1
22JUL96  Inventors Show           Melvin       CAL1   3
24JUL96  Birthday                 Mary         CAL1   1
25JUL96  Planning Council         Group IV     CAL1   1
25JUL96  Close Sale               WYGIX Co.    CAL1   2
27JUL96  Ballgame                 Family       CAL2   1
 Note about code
data vac;
   input hdate:date7.  holiday $ 11-25 _CAL_ $ ;
29JUL96   vacation                CAL2
04JUL96   Independence            CAL1
 Note about code
proc sort data=allacty2;
   by date;

 Note about code
options nodate pageno=1 pagesize=60 linesize=132;

 Note about code
proc calendar data=allacty2 holidata=vac;

 Note about code
   calid _CAL_ / output=combine;

 Note about code
   start date ;
   dur long;

 Note about code
   holistart hdate;
   holivar holiday;
   title1 'Summer Planning Calendar:  Julia Cho';
   title2 'President, Community Bank';
   title3 'Work and Home Schedule';


Schedule Calendar Containing Multiple Calendars
[HTML Output]
 [Listing Output]

Chapter Contents



Top of Page

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