Online File

How to use this page


Rick Aster: Professional SAS Programming Shortcuts: Contents

Chapter 28
Program
Add punctuation to telephone number


DATA _NULL_;
   LENGTH PHONE $ 10 PPHONE $ 12;
   PHONE = '8005551212';
   SUBSTR(PPHONE, 1, 3) = SUBSTR(PHONE, 1, 3);
   SUBSTR(PPHONE, 4, 1) = '-';
   SUBSTR(PPHONE, 5, 3) = SUBSTR(PHONE, 4, 3);
   SUBSTR(PPHONE, 8, 1) = '-';
   SUBSTR(PPHONE, 9, 4) = SUBSTR(PHONE, 7, 4);
   PUTLOG PHONE= PPHONE=;
RUN;

 O /\

Global
Statements

RICK ASTER

SAS

BOOKS

Tech | Dictionary

Download | Rastinate

Rick Aster

Professional SAS Programming Shortcuts

Contents/Online Files

Corrections

Catalog Page