Testing Your Programs
Limiting Observations
Remember that you can use the
OBS= option in the INFILE statement to limit the number of observations
that are read or created during the execution of the DATA step.
data work.update;
infile invent obs=10;
input Item $ 1-13 IDnum $ 15-19
InStock 21-22 BackOrd 24-25;
Total=instock+backord;
run;
When processed, this
DATA step creates the work.update data set with variables but with
only 10 observations.
PUT Statement
When the source of program errors is not apparent, you can use the PUT statement to examine variable values and to print your own message in the log. For diagnostic purposes, you can use IF-THEN/ELSE statements to conditionally check for values. For more information about IF-THEN/ELSE ...
Get SAS Certification Prep Guide, 4th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.