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

I am working through the SAS Programming 1 Essentials, on the 6th module about exporting results, and I can't figure out what the filepath is for my "outpath".  I am using SAS Studio and trying to create a line for %let outpath

 
 
 
I thought it might be %let outpath= "/folders/myfolders/EPG194/output"; which I ran within libname.sas.
 
But I am getting an error message when I try to do the first exercise,
 
Here is the code: 
proc export data=pg1.storm_final
outfile="&outpath/storm_final.csv"
dbms=csv replace;
run;
 
Here is the log:
NOTE: PROCEDURE EXPORT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
 
NOTE: The SAS System stopped processing this step because of errors.
99 proc export data=pg1.storm_final
100 outfile="&outpath/storm_final.csv"
NOTE: Line generated by the macro variable "OUTPATH".
100 ""/folders/myfolders/EPG194/output"
_
22
76
ERROR 22-322: Syntax error, expecting one of the following: ;, DATA, DBLABEL, DBMS, DEBUG, FILE, LABEL, OUTFILE, OUTTABLE, REPLACE,
TABLE, _DEBUG_.
 
ERROR 76-322: Syntax error, statement will be ignored.
 
101 dbms=csv replace;
102 run;
103
104
105 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
117
 
Thanks in advance for your help!
1 ACCEPTED SOLUTION

Accepted Solutions
CherylG
Calcite | Level 5
never mind - I solved it myself - removed the double quotes. sigh.

View solution in original post

2 REPLIES 2
CherylG
Calcite | Level 5
never mind - I solved it myself - removed the double quotes. sigh.
Cynthia_sas
SAS Super FREQ
Hi:
Yes, we do not recommend using quotes in the %LET statement -- that frequently breaks the code where you use the helper macro variable.
Cynthia

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

LIBNAME 101

Follow along as SAS technical trainer Dominique Weatherspoon expertly answers all your questions about SAS Libraries.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 4565 views
  • 3 likes
  • 2 in conversation