Online File

How to use this page


Rick Aster: Professional SAS Programming Shortcuts: Contents

Chapter 59
Program
Alternate report when SAS dataset has no observations


DATA _NULL_;
   DSID = OPEN('WORK.T');
   IF DSID THEN NOBS = ATTRN(DSID, 'NLOBS');
   ELSE NOBS = .;
   RC = CLOSE(DSID);
   IF NOBS <= 0;
   FILE PRINT TITLES FOOTNOTES;
   PUT #15 @21 'NO DATA TO REPORT';
   STOP;
RUN; 

 O /\

Global
Statements

RICK ASTER

SAS

BOOKS

Tech | Dictionary

Download | Rastinate

Rick Aster

Professional SAS Programming Shortcuts

Contents/Online Files

Corrections

Catalog Page