Online File

How to use this page


Rick Aster: Professional SAS Programming Secrets: Contents

Chapter 5
Program 5i
DOZEN format


*
  Professional SAS Programming Secrets
  Program 5i
  DOZEN format
*;
proc fcmp outlib=work.cmp.business_math;
function dozentext(n) $ 8;
   if missing(n) then return ('        ');
   nn = round(n);
   if 0 < nn < 1200 and mod(nn, 12) = 0 then ndozen = nn/12;
   if 0 < ndozen < 100 then return (put(ndozen, f2.) || ' dozen');
   else return (put(nn, comma8.));
   endsub;
quit;

proc format;
value dozen (default=8)
    1-<1200 = [dozentext()]
    other = [comma8.];
run;

 O /\

Global
Statements

RICK ASTER

SAS

BOOKS

Tech | Dictionary

Download | Rastinate

Rick Aster

Professional SAS Programming Secrets

Contents/Online Files

Corrections