BookmarkSubscribeRSS Feed
JHE
Obsidian | Level 7 JHE
Obsidian | Level 7

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.

 

4 REPLIES 4
Reeza
Super User

@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.

 

 

 

 

JHE
Obsidian | Level 7 JHE
Obsidian | Level 7

you mean &lobname.trans?  &lobname i sMacro Varible.

Reeza
Super User

Try it 🙂

JHE
Obsidian | Level 7 JHE
Obsidian | Level 7

I resolved myself.

 

Paid_Fina&lobname.TRANS ---- name too long , change to Paid&lobname.TRANS  it works. Thank you all !

 

 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

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!

Register Now

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 1291 views
  • 0 likes
  • 2 in conversation