Online File

How to use this page


Rick Aster: Professional SAS Programming Shortcuts: Contents

Chapter 55
Program
Visual calendar


data work.ym / view=work.ym;
   set corp.calendar;
   by date;
   year = year(date);
   month = month(date);
run;

data work.month (keep=year month days1-days42 flag1-flag42);
   set work.ym;
   by year month;
   array days{6, 7} $ 2;
   array flag{6, 7} $ 1;
   retain days '  ' flag ' ' week 1;

   weekday = weekday(date);
   if first.month then do;
      do w = 1 to 6;
         do d = 1 to 7;
            days{w, d} = '  ';
            flag{w, d} = ' ';
            end;
         end;
      week = 1;
      end;
   else if weekday = 1 then week + 1;

   days{week, weekday} = put(day(date), f2.);
   flag{week, weekday} = openday;

   if last.month then output;
run;

 O /\

Global
Statements

RICK ASTER

SAS

BOOKS

Tech | Dictionary

Download | Rastinate

Rick Aster

Professional SAS Programming Shortcuts

Contents/Online Files

Corrections

Catalog Page