Hello, expert,
I have code:
ROC SQL;
CREATE TABLE WORK.Number AS
SELECT int(MAX('Primary ID'n / 7)) FORMAT=BEST12. into:RowN
FROM WORK.modeltraining_blocked;
QUIT;
%macro leaveoneout;
%local i;
%do i=1 %to 7;
data model_sample;
set WORK.modeltraining_blocked;
if ('Primary ID'n < (&i-1)*&RowN) or ('Primary ID'n > (&i+1)*&RowN);
run;
%end;
%mend;
when this code is running, it shows.
1. WARNING: INTO clause is ignored in the CREATE TABLE statement.
2. if ('Primary ID'n < (&i-1)*&RowN) or ('Primary ID'n >
78 ! (&i+1)*&RowN); (two red underlie below the ")")
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, a numeric constant, a datetime constant,
a missing value, INPUT, PUT.
would you please suggest the reason?
Many thanks
Hello,
You cannot create a new table and export columns to macrovariables using
the same SELECT instruction. Hence the INTO clause is ignored and the macrovariable
RowN not created.
Hello,
You cannot create a new table and export columns to macrovariables using
the same SELECT instruction. Hence the INTO clause is ignored and the macrovariable
RowN not created.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.
Ready to level-up your skills? Choose your own adventure.