My code:
%MACRO lobcodecount(lobname);
PROC SORT DATA=REWORKO.REWORK&lobname._CODECOUNT;
BY LOB Category Code CODE_DESCRIPTION;
RUN;
PROC SORT DATA=Paid_Fina&lobnameTRANS;
BY LOB Category Code CODE_DESCRIPTION;
RUN;
DATA REWORKO.REWORK&lobname._CODECOUNT_FINAL;
MERGE REWORKO.REWORK&lobname._CODECOUNT WORK.PAID_FINA&lobnameTRANS;
BY LOB Category Code CODE_DESCRIPTION;
RUN;
%Mend lobcodecount;
%lobcodecount(0500);
WORK.Paid_Fina&lobnameTRANS; macro varible &lobnameTRANS would not be able applyied.
why ?
Had the errors on Merger step.
Error message:
REWORKO.REWORK&lobname._CODECOUNT WORK.Paid_Fina&lobnameTRANS;
BY LOB Category Code CODE_DESCRIPTION;
RUN;
_
22
200
WARNING: Apparent symbolic reference LOBNAMETRANS not resolved.
ERROR: File WORK.PAID_FINA.DATA does not exist.
ERROR: File WORK.LOBNAMETRANS.DATA does not exist.
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, (, -, :, ;, END, _DATA_, _LAST_, _NULL_.
ERROR 200-322: The symbol is not recognized and will be ignored.
@JHE wrote:
200
WARNING: Apparent symbolic reference LOBNAMETRANS not resolved.
ERROR: File WORK.PAID_FINA.DATA does not exist.
ERROR: File WORK.LOBNAMETRANS.DATA does not exist.
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, (, -, :, ;, END, _DATA_, _LAST_, _NULL_.
ERROR 200-322: The symbol is not recognized and will be ignored.
Do you have a macro variable "LOBNAMETRANS"?
If not, check the code and see if you forgot to include a period after the LOBNAME portion.
Otherwise the macro processor can't tell if you're trying to use a macro variable named lobname or lobnametrans.
you mean &lobname.trans? &lobname i sMacro Varible.
Try it 🙂
I resolved myself.
Paid_Fina&lobname.TRANS ---- name too long , change to Paid&lobname.TRANS it works. Thank you all !
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!
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.