Hi everyone,
I'm new to SAS and hoping you could help as I keep getting this ERROR 22-322 when I try creating a new output doc. I'll bet the answer is simple but cannot figure it out at all, such as when I do this:
ods excel file="&outpath/StormStats.xlsx"
style=snow
options(sheet_name='South Pacific Summary');
ods noproctitle;
title;
proc means data=pg1.storm_detail maxdec=0 median max;
class Season;
var Wind;
where Basin='SP' and Season in (2014,2015,2016);
run;
ods excel options(sheet_name='Detail');
proc print data=pg1.storm_detail noobs;
where Basin='SP' and Season in (2014,2015,2016);
by Season;
run;
ods excel close;
ods proctitle;
Any help would be greatly appreciated!
I think the error is how you're creating your outpath macro variable, specifically, do you have quotes on that variable? How is it created?
From the log it looks like you have quotes on that macro variable that then interfere with the quotes in the path. Remove the quotes from the macro variable.
It's followed by a ERROR 200-322 and here is also the log:
I think the error is how you're creating your outpath macro variable, specifically, do you have quotes on that variable? How is it created?
From the log it looks like you have quotes on that macro variable that then interfere with the quotes in the path. Remove the quotes from the macro variable.
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.