BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
SASuserlot
Barite | Level 11

I am running the proc rank and proc reg procedures. However it generating the 100's pictures  of plots based on my macro . These pictures are saving the same location where my program saved. Is there any way I can avoid this? Is  "ods listing" causing this? I am giving my generalized code. please let me. Thanks.

 ods listing;
proc rank data=bytrt(where=(trtan in (&num,5))) out=out#
     by lbtestcd &extraby;
     where safepop=1 & 
           lbcfb^=. & lbbase^=. & lbendfl=1  
           ;
     var LBCFB LBBASE;
     ranks KLBCFB KLBBASE;
   run;
   
   proc reg data=OUT&num(where=(trtan in (&num,5)));
   where safepop=1 &) & 
         lbcfb^=. & lbbase^=. & lbendfl=1 ;
     by lbtestcd &extraby;
     model KLBCFB = KLBBASE;
     output out=RESIDUAL&num r=RESID;
   run;
  ods listing close;
1 ACCEPTED SOLUTION

Accepted Solutions
maguiremq
SAS Super FREQ

You can also include a PLOTS = NONE option on the PROC REG statement.

 

   proc reg data=OUT&num(where=(trtan in (&num,5))) plots = none;
   where safepop=1 &) & 
         lbcfb^=. & lbbase^=. & lbendfl=1;
     by lbtestcd &extraby;
     model KLBCFB = KLBBASE;
     output out=RESIDUAL&num r=RESID;
   run;

 Looking at your code, though, I'm a bit confused. Seems as though there are some out-of-place parentheses and ampersands. Here's what I'm trying to convey:

proc reg data = sashelp.cars plots = none;
	model msrp = cylinders mpg_city mpg_highway;
run;
quit;

View solution in original post

4 REPLIES 4
FreelanceReinh
Jade | Level 19

Hello @SASuserlot,

 

First I would add:

ods graphics off;

For a few more things that can be suppressed in order to avoid clutter (and reduce run time) see Rick Wicklin's little macro ODSOff in Re: how slow would the TTest procedure be ?

 

 

maguiremq
SAS Super FREQ

You can also include a PLOTS = NONE option on the PROC REG statement.

 

   proc reg data=OUT&num(where=(trtan in (&num,5))) plots = none;
   where safepop=1 &) & 
         lbcfb^=. & lbbase^=. & lbendfl=1;
     by lbtestcd &extraby;
     model KLBCFB = KLBBASE;
     output out=RESIDUAL&num r=RESID;
   run;

 Looking at your code, though, I'm a bit confused. Seems as though there are some out-of-place parentheses and ampersands. Here's what I'm trying to convey:

proc reg data = sashelp.cars plots = none;
	model msrp = cylinders mpg_city mpg_highway;
run;
quit;
SASuserlot
Barite | Level 11

Thanks, it worked. I deleted some code, because it have some project related code. Thanks again.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 760 views
  • 2 likes
  • 3 in conversation