Online File

How to use this page


Rick Aster: Professional SAS Programming Secrets: Contents

Chapter 13
Program 13g
Changing the order of variables


*
  Professional SAS Programming Secrets
  Program 13g
  Changing the order of variables
*;

proc contents data=work.disorder noprint
    out=work.pos (keep=name type length);
run;
data work.posalpha;
   set work.pos;
   alphaname = upcase(name);
run;
proc sort data=work.posalpha;
   by type alphaname;
run;

options source2;
filename pinc catalog 'work.flexcode.example.source';
data _null_;
   set work.posalpha end=last;
   file pinc;
   if _n_ = 1 then put 'data work.order;' / +3 'length';
   put +7 name @;
   if type = 2 then put '$' +1 @;
   put length;
   if last then put +7 ';' / +3 'set work.disorder;' / 'run;';
run;
%INCLUDE pinc;
filename pinc clear;

 O /\

Global
Statements

RICK ASTER

SAS

BOOKS

Tech | Dictionary

Download | Rastinate

Rick Aster

Professional SAS Programming Secrets

Contents/Online Files

Corrections