Previous Page | Next Page

The CALENDAR Procedure

Example 2: Schedule Calendar Containing Multiple Calendars


Procedure features:

CALID statement:

_CAL_ variable

OUTPUT=COMBINE option

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


Program

 Note about code
data allacty2;
  input date:date7. happen $ 10-34 who $ 35-47 _CAL_ $ long;
  datalines;
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_ $ ;
   datalines;
29JUL96   vacation                CAL2
04JUL96   Independence            CAL1
;
 Note about code
proc sort data=allacty2;
   by date;
run;
 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;
 Note about code
   title1 'Summer Planning Calendar:  Julia Cho';
   title2 'President, Community Bank';
   title3 'Work and Home Schedule';
run;

Output: Listing

Schedule Calendar Containing Multiple Calendars

                                                Summer Planning Calendar:  Julia Cho                                               1
                                                     President, Community Bank
                                                       Work and Home Schedule

           ------------------------------------------------------------------------------------------------------------------------
           |                                                                                                                      |
           |                                                      July  1996                                                      |
           |                                                                                                                      |
           |----------------------------------------------------------------------------------------------------------------------|
           |     Sunday     |     Monday     |    Tuesday     |   Wednesday    |    Thursday    |     Friday     |    Saturday    |
 ----------+----------------+----------------+----------------+----------------+----------------+----------------+----------------|
 |         |                |        1       |        2       |        3       |        4       |        5       |        6       |
 |.........|................|................|................|................|................|................|................|
 | CAL2    |                |                |                |                |                |                |+Beach trip/fam>|
 |.........|................|................|................|................|................|................|................|
 | CAL1    |                |                |                |+=Interview/JW=+|**Independence**|                |                |
 |         |                |+Dist. Mtg./All+|+===Mgrs. Meeting/District 6====+|                |+VIP Banquet/JW+|                |
 |         |                |                |                |                |                |                |                |
 |---------+----------------+----------------+----------------+----------------+----------------+----------------+----------------|
 |         |        7       |        8       |        9       |       10       |       11       |       12       |       13       |
 |.........|................|................|................|................|................|................|................|
 | CAL2    |<Beach trip/fam+|                |+Orthodontist/M+|                |                |                |                |
 |.........|................|................|................|................|................|................|................|
 | CAL1    |                |                |                |                |+Planning Counc+|+Seminar/White=+|                |
 |         |                |+================Trade Show/Knox=================+|+===Mgrs. Meeting/District 7====+|                |
 |         |                |+==============================Sales Drive/District 6==============================+|                |
 |---------+----------------+----------------+----------------+----------------+----------------+----------------+----------------|
 |         |       14       |       15       |       16       |       17       |       18       |       19       |       20       |
 |.........|................|................|................|................|................|................|................|
 | CAL2    |+======Business trip/Fred=======+|                |+Real estate ag+|                |                |                |
 |.........|................|................|................|................|................|................|................|
 | CAL1    |                |                |                |                |+Planning Counc+|                |                |
 |         |                |                |+==Dentist/JW==+|+Bank Meeting/1+|+NewsLetter Dea+|+Seminar/White=+|                |
 |         |+Co. Picnic/All+|+==============================Sales Drive/District 7==============================+|                |
 |---------+----------------+----------------+----------------+----------------+----------------+----------------+----------------|
 |         |       21       |       22       |       23       |       24       |       25       |       26       |       27       |
 |.........|................|................|................|................|................|................|................|
 | CAL2    |                |                |                |                |                |                |+Ballgame/Famil+|
 |.........|................|................|................|................|................|................|................|
 | CAL1    |                |                |                |+Birthday/Mary=+|+=====Close Sale/WYGIX Co.======+|                |
 |         |                |+=============Inventors Show/Melvin==============+|+Planning Counc+|                |                |
 |         |                |                |                |                |                |                |                |
 |---------+----------------+----------------+----------------+----------------+----------------+----------------+----------------|
 |         |       28       |       29       |       30       |       31       |                |                |                |
 |.........|................|................|................|................|................|................|................|
 | CAL2    |                |****vacation****|                |                |                |                |                |
 |         |                |                |                |                |                |                |                |
 |         |                |                |                |                |                |                |                |
 |         |                |                |                |                |                |                |                |
 |         |                |                |                |                |                |                |                |
 ----------------------------------------------------------------------------------------------------------------------------------

Previous Page | Next Page | Top of Page