Online File

How to use this page


Rick Aster: Professional SAS Programming Shortcuts: Contents

Chapter 28
Program
Adding check digits


DATA _NULL_;
   CODE = '0123456 ';

   DIGITSUM = 0;
   DO I = 1 TO 7;
      DIGITSUM + INPUT(SUBSTR(CODE, I, 1), F1.);
      END;
   CHECK = 10 - MOD(DIGITSUM, 10);
   SUBSTR(CODE, 8, 1) = PUT(CHECK, F1.);

   PUT CODE=;
RUN;

 O /\

Global
Statements

RICK ASTER

SAS

BOOKS

Tech | Dictionary

Download | Rastinate

Rick Aster

Professional SAS Programming Shortcuts

Contents/Online Files

Corrections

Catalog Page