BookmarkSubscribeRSS Feed
ColmSmyth
Fluorite | Level 6

Hello

 

I have what I hope is a really simple enterprise guide issue for the experts. I am very new to programming prompt windows in EG so I may not fully understand your responses so stick with me.

 

I have created a simple prompt which is called Project_Prompt and there are 3 static values that the user will be presented with when the stored process runs.

 

When the stored process runs a window pops up with a pompt for the user to select a project, this value as I understand it is stored in &Project_Prompt and lets say the unformatted project number is A12345

 

I have added SAS Code into the prompt area that is basically macro code that says:

 

%if &project_code='A1234' %then %do:

 

libname source "my daya";

 

%end;

 

However while this code runs and there is no error in the log there is no new libname assigned. If i remove the macro code and just leave the libname assignment it works.

 

Am I referencing the prompt incorrectly ?

 

Thanks

 

Colm

4 REPLIES 4
Reeza
Super User

Try removing the quotes from the string A12345. 

 

 

ColmSmyth
Fluorite | Level 6

Sadly this does not work either

ColmSmyth
Fluorite | Level 6

Hey again

 

Ok...some sucess....I have it now satating in the log that it has assigned the libname test which is perfect and what I wanted...however if I refresh the SASApp server tree there is no test libname....any ideas ?

 

Thanks

 

Colm

Patrick
Opal | Level 21

Is this running in the Workspace Server or the Stored Process Server context?

 

What you need to ensure is that your stored process executes in the same context than your SAS EG session as else the library assignment won't be avaialable in your SAS EG session.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 1024 views
  • 0 likes
  • 3 in conversation