DATA Step, Macro, Functions and more

%let & Macro issue - WARNING: Apparent symbolic reference XX not resolved."

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 6
Accepted Solution

%let & Macro issue - WARNING: Apparent symbolic reference XX not resolved."

Hi guys,

 

would like to seek advice in solving the issue of "apparent invocation of macro" issue when i try to use %let and & to call the variable using proc sql statement. Here is the case.

 

%let ABC =FY15;

/* the dataset name is "FY15_CDE" */

 

when i want call the macro variable in proc sql statement by:

 

proc sql;

create table temp as

select * from &ABC_CDE;

quit;

 

the warning occurs:

 "WARNING: Apparent symbolic reference ABC not resolved."

 

May i know if there are any advice to solve this?

Thanks.


Accepted Solutions
Solution
‎03-19-2018 03:01 AM
Super Contributor
Posts: 500

Re: %let & Macro issue - WARNING: Apparent symbolic reference XX not resolved."

Posted in reply to nicolaskan

The warning should read "WARNING: Apparent symbolic reference ABC_CDE not resolved."

 

You have to tell sas that you want the variable ABC resolved, you just have to add a dot:

 

proc sql;

create table temp as

select * from &ABC._CDE;

quit;

View solution in original post


All Replies
Solution
‎03-19-2018 03:01 AM
Super Contributor
Posts: 500

Re: %let & Macro issue - WARNING: Apparent symbolic reference XX not resolved."

Posted in reply to nicolaskan

The warning should read "WARNING: Apparent symbolic reference ABC_CDE not resolved."

 

You have to tell sas that you want the variable ABC resolved, you just have to add a dot:

 

proc sql;

create table temp as

select * from &ABC._CDE;

quit;
Occasional Contributor
Posts: 6

Re: %let & Macro issue - WARNING: Apparent symbolic reference XX not resolved."

Posted in reply to andreas_lds

Problem solved. Thanks for the quick reply.

Respected Advisor
Posts: 4,574

Re: %let & Macro issue - WARNING: Apparent symbolic reference XX not resolved."

Posted in reply to nicolaskan

@nicolaskan Then please mark the correct answer as solution.

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 108 views
  • 2 likes
  • 3 in conversation