Procedure features: |
PROC CALENDAR statement options:
| CALEDATA= |
| DATETIME |
| WORKDATA= | |
CALID statement:
| _CAL_ variable |
| OUTPUT=COMBINE option |
| OUTPUT=MIXED option | |
DUR
statement |
OUTSTART statement |
OUTFIN statement |
|
Data sets: |
|
This example
- produces a schedule calendar
- schedules activities around
holidays
- uses separate work patterns and holidays for each calendar
- uses an 8-hour day, 5 1/2-day work week
- displays and
identifies multiple calendars on each calendar page
(combined output)
- displays but does not identify multiple calendars
on each calendar page (mixed output).
This example creates both combined and mixed output. Producing combined
or mixed calendar output requires only one change to a PROC CALENDAR step:
the setting of the OUTPUT= option in the CALID statement. Combined output
is produced first, then mixed output.
This example and Multiple Schedule Calendars with Atypical Workshifts (Separated Output) use the same input
data for multiple calendars to produce different output.
The only differences in these programs are how the activities data set is
sorted and how the OUTPUT= option is set.
To print . . . |
Sort the activities data set by . . . |
And set OUTPUT= to |
See Example |
Separate pages for each calendar |
calendar id and starting date |
SEPARATE |
3, 8
|
All activities on the same page and identify each calendar |
starting date |
COMBINE |
4, 2 |
All activities on the same page and NOT identify each calendar |
starting date |
MIX |
4 |
| libname well 'SAS-data-library'; |
| proc sort data=well.act;
by date;
run; |
| options nodate pageno=1 linesize=132 pagesize=60; |
| proc calendar data=well.act
holidata=well.hol
caledata=well.cal
workdata=well.wor
datetime;
title1 'Well Drilling Work Schedule: Combined Calendars';
format cost dollar9.2; |
| calid _cal_ / output=combine; |
| start date;
dur dur; |
| holistart date;
holivar holiday;
run; |
Multiple Schedule Calendars with Atypical Workshifts (Combined Output)
To produce mixed output instead of combined, use the same program and
change the setting of the OUTPUT= option to OUTPUT=MIX:
proc calendar data=well.act
holidata=well.hol
caledata=well.cal
workdata=well.wor
datetime;
calid _cal_ / output=mix;
start date;
dur dur;
holistart date;
holivar holiday;
outstart Monday;
outfin Saturday;
title1 'Well Drilling Work Schedule: Mixed Calendars';
format cost dollar9.2;
run;
Multiple Schedule Calendar with Atypical Workshifts (Mixed Output)
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.