|
This is a new Benchmarks Online monthly feature. -- Ed. SAS CornerBy Dr.Karl Ho, Research and Statistical Support Services ManagerAlthough I've studied SAS for years, I never stop getting surprises from this big system. Every once in a while I find myself amazed by functions that I didn't even know existed. In this short piece, I will introduce a procedure that may be of interest to you if you need to be involved in human resources management. PROC CALENDAR procedure in SAS/BASE combines data from individual personal schedule with corporate schedule/events and print out calendars for individual workers. While scheduling applications abound, PROC CALENDAR serves more than just printing calendars. It also organizes calendars and schedules for a group or a company while keeping data for really easy retrieval. To create a calendar, the programmer needs to prepare two SAS data sets: events data and holiday data. The following example illustrates putting holidays and events together on one calendar:
The ODS statements convert the output into an HTML file CAL0.htm while the sample ASCII output is as follows:
Summer Planning Calendar: John Doe 1
President, Community Bank
?-------------------------------------------------------------------------------------------------------?
| |
| July 1996 |
| |
?-------------?-------------?-------------?-------------?-------------?-------------?-------------?
| Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday |
?-------------?-------------?-------------?-------------?-------------?-------------?-------------?
| | 1 | 2 | 3 | 4 | 5 | 6 |
| | | | |*Independence*|***Vacation***|***Vacation***|
| | | | | | | |
| | | | | | | |
| | | |+Interview/JW+| | | |
| |+Dist. Mtg./A+|+=Mgrs. Meeting/District 6==+| | | |
?-------------?-------------?-------------?-------------?-------------?-------------?-------------?
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
|***Vacation***| | | | | | |
| | | | | | | |
| |+=============Trade Show/Knox==============+|+Planning Cou+|+Seminar/Whit+| |
| |+=========================Sales Drive/District 6=========================+| |
| |+VIP Banquet/+| | |+=Mgrs. Meeting/District 7==+| |
?-------------?-------------?-------------?-------------?-------------?-------------?-------------?
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| | | | | | | |
| | | | | | | |
| | | | |+NewsLetter D+|+Co. Picnic/A+| |
| | |+=Dentist/JW=+|+Bank Meeting+|+Planning Cou+|+Seminar/Whit+| |
| |+=========================Sales Drive/District 7=========================+| |
?-------------?-------------?-------------?-------------?-------------?-------------?-------------?
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | |+Birthday/Mar+|+===Close Sale/WYGIX Co.====+| |
| |+==========Inventors Show/Melvin===========+|+Planning Cou+| | |
?-------------?-------------?-------------?-------------?-------------?-------------?-------------?
| 28 | 29 | 30 | 31 | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
?-------------?-------------?-------------?-------------?-------------?-------------?-------------?
|