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: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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