Online File

How to use this page


Rick Aster: Professional SAS Programming Shortcuts: Contents

Chapter 13
Program
Reading hierarchical data


data tax.magnol (drop=recordtype);
   retain;
   length order family $ 24
       genus genusc species speciesc $ 32;
   infile magnolio truncover;
   input @1 recordtype $char1. @;
   select (recordtype);
      when ('O') do;
         input @3 order $char24.;
         family = '';
         genus = ''; genusc = '';
         species = ''; speciesc = '';
         end;
      when ('F') do;
         input @3 family $char24.;
         genus = ''; genusc = '';
         species = ''; speciesc = '';
         end;
      when ('G') do;
         input @3 genus $char24. @28 genusc $char24.;
         species = ''; speciesc = '';
         end;
      when ('S') do;
         input @3 species $char24. @28 speciesc $char24.;
         output;
         end;
      otherwise ;
      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