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 !
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
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.