02-14-2018 08:52 AM
I am creating the below macro parameter and i get the following error.
%local armn; %let armn=; arm has trt1 and trt2 data test; set test1; output; &arm="total"; &armn=999; output; run;
output; &arm.="total"; &armn.=9999; output;
ERROR 180-322: Statement is not valid or it is used out of proper order.
The error is coming from armn and not sure why. Can anyone help me
02-14-2018 08:55 AM
Well what you post is invalid.
arm has trt1 and trt2
I not valid SAS code. And
Will also create invalid code. If that is not it, then check all the code up to the error, it may be happening well before this block. Its hard to tell from small snippets of either code or logs.
02-14-2018 09:00 AM
You need to educate yourself using this program as a learning tool.
First, picture what you want the DATA step to look like (with no macro language at all).
Second, add this statement and then re-run:
You will be able to see what the DATA step actually looks like, and compare it to your picture of what you wanted it to look like.