I am trying use the above resolved like %let perf=12; %macro addall(dname,rrun); %do j=1 %to &rrun; %let z=%sysfunc(putn,(&j,z2.)); &dname._&&mon.&z; %end; %mend addall; data new1; set %addall(new,&perf.); run; Getting below error data new1; 64 65 set %addall(new,&perf.); ERROR: Expected open parenthesis after macro function name not found. NOTE: Line generated by the macro variable "Z". 65 mon.(1,z2.)) _ _ 22 22 200 ERROR 22-7: Invalid option name 1. ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, ;, CUROBS, END, INDSNAME, KEY, KEYRESET, KEYS, NOBS, OPEN, POINT, _DATA_, _LAST_, _NULL_. ERROR 200-322: The symbol is not recognized and will be ignored. NOTE: Line generated by the macro variable "Z". 65 new_&mon. _ 22 200 WARNING: Apparent symbolic reference MON not resolved. ERROR: Expected open parenthesis after macro function name not found. NOTE: Line generated by the macro variable "Z". 65 new_&mon. ____ 180 WARNING: Apparent symbolic reference MON not resolved. ERROR: Expected open parenthesis after macro function name not found. NOTE: Line generated by the macro variable "Z". 65 new_&mon. ____ 180 WARNING: Apparent symbolic reference MON not resolved. ERROR: Expected open parenthesis after macro function name not found. NOTE: Line generated by the macro variable "Z". 65 new_&mon. ____ 180 WARNING: Apparent symbolic reference MON not resolved. ERROR: Expected open parenthesis after macro function name not found. NOTE: Line generated by the macro variable "Z". 65 new_&mon. ____ 180 WARNING: Apparent symbolic reference MON not resolved. ERROR: Expected open parenthesis after macro function name not found. NOTE: Line generated by the macro variable "Z". 65 new_&mon. ____ 180 WARNING: Apparent symbolic reference MON not resolved. ERROR: Expected open parenthesis after macro function name not found. NOTE: Line generated by the macro variable "Z". 65 new_&mon. ____ 180 WARNING: Apparent symbolic reference MON not resolved. ERROR: Expected open parenthesis after macro function name not found. NOTE: Line generated by the macro variable "Z". 65 new_&mon. ____ 180
... View more