BookmarkSubscribeRSS Feed
wangmh008
Calcite | Level 5

I need to create a figure with pearson correlation value, I use proc sgplot to create the figure;

so firstly I open the ods:

ods graphics / reset noborder width=800px height=370px attrpriority=none;
options orientation=landscape;
ods rtf file="xxxx" style=tjournal BODYTITLE_AUX nogtitle nogfootnote;

Then I compute the corr:

ODS select none;

proc corr data=forplot1(where=(_name_='UNCOST'));
var lborresn COL1;
ods output pearsoncorr=corruncost;
run;

ODS select all;

 

my question is why I still get corr procedure in my output, since I used ods select none.  

2 REPLIES 2
ballardw
Super User

Anything that creates output between and ODS Destination; Ods destination close; sandwich of statements will appear in the document created. You have to explicitly state the destination to avoid sending the output: Ods rtf select none;

The default results window destination is the destination if not explicitly stated.

 

I generally do all the data manipulation first then only include the procedures that create the output I want in the "sandwich".

wangmh008
Calcite | Level 5

Thanks for the quick reply. It's very helpful. I will finish the data manipulation first next time.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 2 replies
  • 923 views
  • 0 likes
  • 2 in conversation