Online File

How to use this page


Rick Aster: Professional SAS Programming Shortcuts: Contents

Chapter 12
Program
Transforming all character variables


data _null_;
   * Examples of character variables;
   retain name 'A, B, and C' description 'Three letters';
   
   * Array of all character variables;
   array allchar{*} _character_;
   
   * Remove all commas.;
   do i = 1 to dim(allchar);
      allchar{i} = compress(allchar{i}, ',');
      end;
      
   * Change all ASCII tab characters to spaces.;
   do i = 1 to dim(allchar);
      allchar{i} = translate(allchar{i}, ' ', '09'x);
      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