Online File

How to use this page


Rick Aster: Professional SAS Programming Shortcuts: Contents

Chapter 30
Program
$COUNTY informat and format (discrete binary encoding of Irish counties)


proc format library=library;
invalue $county (upcase just)
    ' ' = '00'x
    'CARLOW' = '01'x    'CAVAN' = '02'x
    'CLARE' = '03'x    'CORK' = '04'x
    'DONEGAL' = '05'x    'GALWAY' = '06'x
    'KERRY' = '07'x    'KILKENNY' = '08'x
    'LAOIS' = '09'x    'LEITRIM' = '0a'x
    'LIMERICK' = '0b'x    'LONGFORD' = '0c'x
    'MAYO' = '0d'x    'OFFALY' = '0e'x
    'ROSCOMMON' = '0f'x    'SLIGO' = '10'x
    'TIPPERARY' = '11'x    'WATERFORD' = '12'x
    'WESTMEATH' = '13'x    'WEXFORD' = '14'x
    other = 'ff'x
    ;
value $county
    '00'x = ' ' 
    '01'x = 'Carlow'     '02'x = 'Cavan' 
    '03'x = 'Clare'     '04'x = 'Cork' 
    '05'x = 'Donegal'     '06'x = 'Galway' 
    '07'x = 'Kerry'     '08'x = 'Kilkenny' 
    '09'x = 'Laois'     '0a'x = 'Leitrim' 
    '0b'x = 'Limerick'     '0c'x = 'Longford' 
    '0d'x = 'Mayo'     '0e'x = 'Offaly' 
    '0f'x = 'Roscommon'     '10'x = 'Sligo' 
    '11'x = 'Tipperary'     '12'x = 'Waterford' 
    '13'x = 'Westmeath'     '14'x = 'Wexford' 
    other = [$hex2.]
    ;
run;

 O /\

Global
Statements

RICK ASTER

SAS

BOOKS

Tech | Dictionary

Download | Rastinate

Rick Aster

Professional SAS Programming Shortcuts

Contents/Online Files

Corrections

Catalog Page