Desktop productivity for business analysts and programmers

SAS Prompts Programmatically

Reply
Contributor
Posts: 70

SAS Prompts Programmatically

I have a question.

 

Is it possible to create SAS Prompts Programmatically..??

I am using a Stored Process Program and to wants to pass the values in the static list prompts through codes. Is it possible..??

 

If yes, How..??

Super User
Posts: 7,762

Re: SAS Prompts Programmatically

Posted in reply to DipeshGupta

Prompts are defined in metadata. Although it may be possible to create metadata objects programmatically, I would strongly advise against it. One skewed program run and your metadata repository is trashed. Since the repository constitutes one big SPOF, it should be treated with utmost care.

 

What you can do is to define dynamic prompts that take their data from datasets. You can even create cascading prompts, where the results of a first prompt can be used as a where condition on the following prompt(s).

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

Re: SAS Prompts Programmatically

Posted in reply to KurtBremser

First, I was using dynamic Prompts only but there I am facing a problem as Dynamic Prompts can only access data from SAS Folders but in my Stored Process Model, I have a library named Model which will be created on the path given by the user so that differeent users or even same user but different sessions can be run without any confusion because the Library name will be same(MODEL) but the data will be stored at different path.

 

Now the problem occurs with SAS Folders as I can create Library named MODEL at different locations for different users but how can I do this with the SAS Folders. How can I create different SAS Folders for different users or link it with the Library created by different users at different path.

 

How can I use Dynamic Prompts in such a case..??

Super User
Posts: 7,762

Re: SAS Prompts Programmatically

Posted in reply to DipeshGupta

If the prompt engine from SAS can't handle your issues, consider building the prompts yourself with HTML forms & Javascript. That's how I do such things.

You will have to sharpen your skills in web page creation, of course.

HTML 5

HTML 4

Javascript

(These are the documents I go to when I have to do web programming)

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

Re: SAS Prompts Programmatically

Posted in reply to KurtBremser

Okay but is there any other solution to my problem that goes through SAS and not through Self Created WebPages..??

Beacuse we are focussing to achieve everything through SAS.

Super User
Posts: 7,762

Re: SAS Prompts Programmatically

Posted in reply to DipeshGupta

When you get screws instead of nails, it's time to look for a screwdriver in addition to the hammer.

Maxim 14: Use the right tool.

 

Trying to use SAS as the do-all Swiss Army Knife won't do it in the long run, IMO. Given the seeming complexity of your project, you should consider getting help from SAS or a SAS consultant.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Ask a Question
Discussion stats
  • 5 replies
  • 280 views
  • 1 like
  • 2 in conversation