BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
sanalitics
Obsidian | Level 7

Hi All,

 

I have created the macro @ autoexec with following definition:

%let library_temp= C:\testing;

%global lib_src=&library_temp;

 

and the definition of the library in DI is:

libname lib_test  "&lib_src" 

 

this resolves in DI without any issues.... But the same library when opened from EG I get the following error while expanding Library:

sas eg  sds.sds exception

Target site assign

 

Kindly help me fix the issue

1 ACCEPTED SOLUTION

Accepted Solutions
sanalitics
Obsidian | Level 7

Hi Patrick... thanks for responding:

.

once you've connected to the metadata server can you open a session under the application server you want to run your code (done directly in EG by expanding/connecting to the server in the server pane of your EG window)?

YES

2. are you using the same credentials to connect to the metadata server in EG and in DIS?

YES

 

in fact I found a solution by resolving all level of macros @ autoexec.

 

 

Thanks all for the time and support

 

View solution in original post

5 REPLIES 5
Astounding
PROC Star

Two issues stand out as part of the syntax in the base SAS world.

 

Your LIBNAME statement requires a semicolon at the end of it.

 

%GLOBAL statements can merely list names of global macro variables.  They cannot assign values.

LinusH
Tourmaline | Level 20
And %global is implied when using %let in open code.
Not sure why you want to use two variables with the same value...
Data never sleeps
sanalitics
Obsidian | Level 7

Hi Both, Thanks for the response.

kindly note that I have given logical statement and it’s not the perfect code copied.

i am aware of the semicolon and macro declaration.

the issue is that the macro is available @ Metadata server .. and the library works fine in DI

but the issue is when I open the library in EG... probably something to do with the app server macro variable resolution

Patrick
Opal | Level 21

@sanalitics

I have no idea what @ autoexec is but it's certainly not available under @ Metadata server as such macros get executed on the compute tier (workspace server) and not the SAS Metadata tier.  

 

The error you mention sounds more like you having some sort of connection issue with EG independent on what code you want to execute. If so then you should talk to your SAS Admin.

 

Questions

1. once you've connected to the metadata server can you open a session under the application server you want to run your code (done directly in EG by expanding/connecting to the server in the server pane of your EG window)?

2. are you using the same credentials to connect to the metadata server in EG and in DIS?

sanalitics
Obsidian | Level 7

Hi Patrick... thanks for responding:

.

once you've connected to the metadata server can you open a session under the application server you want to run your code (done directly in EG by expanding/connecting to the server in the server pane of your EG window)?

YES

2. are you using the same credentials to connect to the metadata server in EG and in DIS?

YES

 

in fact I found a solution by resolving all level of macros @ autoexec.

 

 

Thanks all for the time and support

 

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

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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
  • 2819 views
  • 0 likes
  • 4 in conversation