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 !

 

 

sas-innovate-2024.png

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.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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