Online File

How to use this page


Rick Aster: Professional SAS Programming Shortcuts: Contents

Chapter 55
Program
Converting a list of changes to a list of days


data work.eod (keep=date latestrate
    rename=(latestrate=rate) index=(date));
   length date 4;
   retain previousdate latestrate;
   set work.changes;
   by effective;
   * Fill in dates between changes. ;
   if first.effective and effective > previousdate > .z then  
       do date = previousdate + 1 to effective - 1;
      output;
      end;
   if last.effective then do;
      date = effective;
      latestrate = rate;
      output;
      previousdate = effective;
      end;
run;

 O /\

Global
Statements

RICK ASTER

SAS

BOOKS

Tech | Dictionary

Download | Rastinate

Rick Aster

Professional SAS Programming Shortcuts

Contents/Online Files

Corrections

Catalog Page