Hi,
I want to use multiple prompts in a flow in SAS/Enterprsie Guide, where the user has to enter for instance a client number and a location. With the info provided by the user, I want to check whether this combination exists in a table. If the combination exists, I want to continue my processing otherwise the user should be prompted to provide other values for the prompt. Can one build this in Enterprise Guide?
Regards,
Henri
Only Eguide (prompting in Eg-project) or using prompts metadata-bases with use of eg Information maps or stored processes.
SAS(R) 9.3 Stored Processes: Developer's Guide
Before I forget to mention the prompts related to dataset input are not very reliable in selecting the correct app-server.
The related libname for that must be unique in your environment not existing in multiple app-servers.
If that does however it will open up a randomly chosen one. not the one you have associated the process to be run on.
Another option would be to use the tables to give him a pick list for each value, limiting him to only the correct ones.
Tom
Hi Jaap and Tom,
The question is more complex than just prompting for parameters.
I am using Enterprise Guide with prompts. Tom, I cannot display a pick list with the values, since I have to look-up in a table with thousands of records. So, the problem is: after the user entered values, some code is executed to verify the entered data (look-up in a SAS table) and when the info is correct, some more steps should be executed; otherwise I need to prompt the user for new, correct values.
Henri
Hi,
I don't know much about EG process flows.
But I'm a fan of %AnyObs() for checking whether there are any records in a dataset that meet some user-specified criterion passed in via prompt values.
I use a modified version of Jack Hamilton's macro:
http://www2.sas.com/proceedings/sugi26/p095-26.pdf
In web reports, I often collect user prompt values, then check if %AnyObs(MyData) is true. If it's false, I return a result: "You passed these prompt values, but no records were found. Please try again"
Roughly based on Don Henderson's approach:
http://hcsbi.blogspot.com/2011/04/this-page-intentionally-left-blank.html
Henri,
The prompt is a preprocess of the program it is just setting some sas-macro-variables.
When you are needing to do validation by really processing with sas-code the flow is changed. Think in managing the flow.
As you already have a flow to be managed every program could/should start with a check of the point how far it is in the flow and whether this program is allowed to run.
When it is not allowed to run it should set an error (sysrc >1) in SAS. The error recognition of SAS will work on that and not allowing automatic proceeding in the flow.
Back to your question:
you can do the same with that, let the prompt come, program run and when your checks wrong give a message en set the errorcode (sysrc).
Not very nice for the last wish is missing: starting a program within Eguide as result of some SAS code. The user should interact and restart the program manually.
Eguide is a client listening/serving possible multiple server processes running. At this a see some difficulty in your wish. Suppose many processes would be running simultenously and all were needing a prompt. How should this be designed?
Could be an enhancement request:
-> not only starting sas code manual, make it possible to start programs in a EGP project by a SAS code call.
Henri,
Here's another potential approach: a custom task that can prompt the user for a value, and pause the project while waiting for an answer:
Process Interruptus: a custom task to pause your process flow - The SAS Dummy
You could combine this task with Conditions in EG (see EG online help about Conditions) to prompt for a value, perform a check, and then follow one branch or another within your project.
Chris
Hi All,
Thank you all for your input on this topic.
Chris,
you gave me the real answer to my problem.
Regards,
Henri
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: