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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 5 replies
  • 1714 views
  • 0 likes
  • 3 in conversation