BookmarkSubscribeRSS Feed
antenga
Obsidian | Level 7

Hi,

 

I am creating a table which a column name 'Ev_%_Sat_Sch' in SAS DI and I get the warning : 'apparent invocation of  macro xxxx not resolved' .

 

This column name is in an existing SAS EG code and I am trying to put that in SAS DI without any changes to the table structure.

 

Is there a way I could just use the existing DI objects (e.g. extract, Join) without having to manipulate the existing generated code?

 

In the 'Physical Storage' tab for the DI objects, I have selected both 'Enable case-sensitive DBMS object names' and 'Enable special characters within table or column object names'.

 

Thank you.

 

Rgds.

 

5 REPLIES 5
ChrisNZ
Tourmaline | Level 20

If the column name was single quoted as your question shows, there would be no warning.

Unless the single quotes shown are themselves in a longer, double quoted string?

In any case, single quote you column name to make the warning disappear.

 

 

 

antenga
Obsidian | Level 7

Hi Chris,

 

The generated code has a double quote around the column name :- "xx_%_xx"n. I had changed the double quote to single quote to make it work :- 'xx_%_xx'n.

 

Was hoping for another way instead of changing the generated code.

 

Thanks.

ChrisNZ
Tourmaline | Level 20

It's a bit silly of sas to double quote for no reason by default, though I suppose they did not expect a variable containing a % sign.

Since it already has a nasty name, can you replace the underscore after the % with a space? That would remove the warning too.

Kurt_Bremser
Super User

I guess they DID expect macro calls in variable names, and that's why they use double quotes. So either have Scylla (non-resolvable macro triggers) or Charybdis (loss of macro functionality).

Using only standard SAS names would of course completely remove this issue.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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
  • 5 replies
  • 2077 views
  • 0 likes
  • 3 in conversation