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

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;

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26
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.

--
Paige Miller

View solution in original post

2 REPLIES 2
PaigeMiller
Diamond | Level 26
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.

--
Paige Miller
Kurt_Bremser
Super User
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;