Hello I am getting an error with this statement and I'm not sure what I am doing wrong:
proc print data=dmbi.test (OBS=300); (keep="Time"n "Provider Name"n "Class Name"n); run;
Error:
71 proc print data=dmbi.test (OBS=300);
72 (keep="Time"n "Provider Name"n "Class Name"n);
_
180 ERROR 180-322: Statement is not valid or it is used out of proper order.
73 run;
proc print data=dmbi.test (OBS=300 keep="Time"n "Provider Name"n "Class Name"n); run;
You can only have one set of parenthesis which enclose ALL data set options.
View solution in original post
proc print data=dmbi.test (OBS=300); /* this semicolon ends the PROC PRINT statement */ (keep="Time"n "Provider Name"n "Class Name"n); run;
All dataset options need to be in one pair of brackets:
proc print data=dmbi.test ( OBS=300 keep="Time"n "Provider Name"n "Class Name"n ); run;
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!
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.