Online File

How to use this page


Rick Aster: Professional SAS Programming Logic: Contents

Chapter 24
Program
Formats and informats


PROC FORMAT;

VALUE ANSWER
   1 = 'Yes'
   0 = 'No'
   ;

VALUE LEVEL
   0 = 'Zero'
   1 = 'Singular'
   2, 3, 4, 5, 6, 7, 8 = 'Multiple'
   .5 = 'Half'
   LOW -< 0 = 'Negative'
   0 <-< .5, .5 <-< 1 = 'Fractional'
   ._ - .Z = 'Missing'
   OTHER = 'Positive'
   ;

VALUE QTT
   1 = 'First Quarter'
   2 = 'Second Quarter'
   3 = 'Third Quarter'
   4 = 'Fourth Quarter';

VALUE WR
   LOW -< 40 = 'Light'
   40 - 84 = 'Medium'
   84 <- HIGH = 'Heavy';

VALUE PC (MIN=9 DEFAULT=9)
   0-<100000 = (|COMMA9.2|)
   OTHER = (|BEST9.|);

VALUE NKA (MIN=11 DEFAULT=11)
   . = '**Unknown**'
   OTHER = (|F11.|);

INVALUE ANSWER (UPCASE JUST MAX=32)
   'Y', 'YES' = 1
   'N', 'NO' = 0
   ' ', '.' = .
   ;

INVALUE $LOC (UPCASE JUST MAX=32)
   'DAYTONA BEACH' = 'D'
   'VALLEY FORGE' = 'E'
   'VANCOUVER' = 'P'
   'TIJUANA' = 'T'
   ' ', '.' = ' '
   ;
VALUE $LOC (MIN=13 MAX=32)
   'D' = 'Daytona Beach'
   'E' = 'Valley Forge'
   'P' = 'Vancouver'
   'T' = 'Tijuana'
   ;

INVALUE RSM (MAX=32)
   -1, 98, 99 = _ERROR_
   OTHER = _SAME_;

INVALUE NA (MAX=32)
   'n/a' = 0
   OTHER = (|COMMA32.|);

PICTURE PRC  
   0 = 'Free' 
   0 <-< .1 = '1.1111c' (MULT=1000000)
   .1 - 9999.99 = '001.11' (PREFIX='$');

PICTURE DMON (MIN=5 DEFAULT=12 MAX=32) OTHER = '%d %B       ' (DATATYPE=DATE);

PICTURE MPS (MIN=5 DEFAULT=5 MAX=32) OTHER = '%M.%0S' (DATATYPE=TIME);

RUN;

 O /\

Global
Statements

RICK ASTER

SAS

BOOKS

Tech

Download | Rastinate

Rick Aster

Professional SAS Programming Logic

Contents/Online Files

Corrections

Catalog Page