|
FYI :
LOOK AT THE FOLLOWING SAS CODE & LOG >>>>>>>
DATA A;
INPUT X;
CARDS;
10
15
20
;
RUN CANCEL;
DATA B;
SET A;
WHERE X < 15;
RUN CANCEL;
1 DATA A;
2 INPUT X;
3 CARDS;
NOTE: The data set WORK.A has 3 observations and 1 variables.
NOTE: The DATA statement used 0.1 seconds.
7 ;
8 RUN CANCEL;
9
10 DATA B;
11 SET A;
12 WHERE X < 15;
13 RUN CANCEL;
NOTE: Data step not executed at user's request.
NOTE: The DATA statement used 0.06 seconds.
I THINK THIS WILL BE USEFUL/HELPFUL TO YOU.
SIMPLY USE " RUN CANCEL ; "
IN YOUR CODE TO TEST YOUR SAS CODE.
______________________________ Reply Separator _________________________________
Subject: How do you test?
Author: Lynn Nonnemaker <LNonnemaker@PRIASSOC.COM> at SMTP-GATEWAY
Date: 8/14/97 10:44 AM
How do people test SAS programs, particularly those who never use SAS
interactively?
To test programs on only a few observations, the simplest way I
know is to use an options obs=10(or whatever) statement. This does not
work, however, when you have where statements in the program; the
program bombs at the first where statement.
To deal with this, I often include a test macro at the top of
the program:
%macro test; if _n_ le 10; %mend test;, and then call %test
when I first set a large data set. When testing is done, I simply
comment out the If statement. This method is a problem for certain sorts
and whenever I set a large data set many times (the problem being that I
forget to add the %test call).
I am hoping that someone out there has developed a macro that
deals with these various issues. Otherwise, any insights from others
would be appreciated.
Thanks,
Lynn
************************************************************************
*************************
Lynn Nonnemaker
PRI Associates,
Inc.
1905 Chapel Hill Road
Durham, NC 27701
Phone: (919) 493-7534
Fax: (919) 493-2935
Email: LNonnemaker@priassoc.com
************************************************************************
***********************
|