Desktop productivity for business analysts and programmers

Automating SAS EG Prompt

Reply
Contributor
Posts: 70

Automating SAS EG Prompt

[ Edited ]

I am buiding a Model on SAS and so My Project has several programs and almost each program has one Prompt to call value from the user.

Now I have two questions related to prompts.

 

1. My Prompt values are not refreshing automatically i.e. Everytime I run my program with different set of data I have to Browse the prompt again and provide the value to the prompt so that it can call value from the user. Is there any way so that I don't have to browse the prompt everytime I run my program and it can bring the value from the data set on its own.

 

2. As I told earlier, My Projects has several programs and so I want to run them all together but everytime I do so, the project calls all the prompts in the beginning but I want them to be called as per their order (according to the programs). Is there any way so that I can call the prompts as per my wish and not in the beginning of the project.

Super User
Posts: 7,422

Re: Automating SAS EG Prompt

1. You can specify that the values for the prompt are read dynamically from a dataset; this dataset needs to be registered in metadata.

 

2. EG recognizes a prompt by its name; if the value is already set, the prompt does not come up. You need to create individual prompts for your process flow nodes if you want to be re-prompted.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Contributor
Posts: 70

Re: Automating SAS EG Prompt

1.Ya I tried creating Dynamic prompts but there is a problems.

It only allows to retrieve data from SAS Folder and I am not able to figure out How can I store data in the SAS Folder because it doesn;t allow me to browse data from library.

 

2. I have declared individual prompts for each program separately but when I run them collectively as a single project then all the prompts are called in the beginning only.

Super User
Posts: 7,422

Re: Automating SAS EG Prompt

When you register a dataset in metadata, you have to name a folder; use this path to access the registered dataset.

 

I'm afraid it won't be possible to make EG prompt only when it arrives at the node for which the prompt is defined. But maybe someone else can chime in, or SAS technical support could give you a hint how to achieve that.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Contributor
Posts: 70

Re: Automating SAS EG Prompt

Sorry but I didn't get that Register part because all I know about saving data is either in work library or in Permanent library but not in folder and may be because of that I didn't get the registering dataset in metadata part.

Can you please help me with how can we do that.

 

 

Okay, It means I have to look for something else then for this thing.

Super User
Posts: 7,422

Re: Automating SAS EG Prompt

When you have a dataset in a permanent library, you can register it either in SAS Management Console or in EG with Tools->Update Library Metadata. You can also try to use PROC METALIB from a code window.

A prerequisite for this is that the library itself is already registered in metadata; this needs to be done in SMC only.

 

Don't be put off by the SMC. Once you start experimenting with prompts and (further on) with stored processes, there's no way around it anyway.

Have a talk with your SAS admin regarding use of the SMC.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Contributor
Posts: 70

Re: Automating SAS EG Prompt

Okay, That I will do for sure. Smiley Happy

But before that I have one more question regarding Prompts.

As I am building a Model and as its not possible in SAS to call different Prompts at different time when all the programs are run together but for my purpose I need to do that. So is there any other way to do that.

 

 

Super User
Posts: 7,422

Re: Automating SAS EG Prompt

Maybe splitting your project into several process flows might be an option.

 

I'm afraid I won't be of much more help here, as I'm doing the automation on the batch job level, and the inputs are provided by the scheduler.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Contributor
Posts: 70

Re: Automating SAS EG Prompt

Okay, and is it possible to split a single project into several different process flows..???

Super User
Posts: 7,422

Re: Automating SAS EG Prompt

"File - New - Process Flow", and then move the parts you want to separate to the new process flow.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Contributor
Posts: 70

Re: Automating SAS EG Prompt

Thanks,

I just tried that but NO Success Smiley Sad

Ask a Question
Discussion stats
  • 10 replies
  • 196 views
  • 0 likes
  • 2 in conversation