|
I've also found lately, perhaps related to sometime use of HTML or other output formats instead of purely lst output, that some statistical procedures' lst output doesn't appear in the DM OUTPUT window unless I put a QUIT statement after a RUN statement.
S
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Peter Flom
Sent: Friday, July 16, 2010 11:30 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Why you should always use a RUN statement (A SAS Gotcha)
Hello all
OK, there are lots of places where it's written that using RUN statements
makes code look cleaner, but that invocation of another PROC statement makes
the previous PROC get submitted. So.. It sounds like that RUN statement is
a sort of esthetic extra.
Well, it just bit me. Luckily, we found the error before doing anything
really bad, because some of the results were ridiculous. But
I had this
title 'Predicted values';
title2 'AnxDepITT';
proc print data = schooler.anxdepitt;
run;
title2 'DisOrgITT';
proc print data = schooler.disorgitt;
run;
title2 'HostExcITT';
proc print data = schooler.hostexcitt;
run;
title2 'NegativeITT';
proc print data = schooler.negativeitt;
run;
title2 'PositiveITT';
proc print data = schooler.positiveitt;
run;
etc. only without the RUN statements other than the final one. And the
title2 are NOT where I would have thought they would go; rather, the title2
for anxdepitt is disorgitt, and so on.
Now that I've found the error, I sort of see why it happened. But I don't
find it intuitive at all. And it took me quite a while to find the problem.
So .. Always use RUN.
Have others been bitten by this one?
Peter
Peter Flom PhD.
Peter Flom Consulting LLC
5 Penn Plaza, Ste 2342
NY NY 10001
www.statisticalanalysisconsulting.com
www.IAmLearningDisabled.com
|