SAS Programming

DATA Step, Macro, Functions and more
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.

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

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