BookmarkSubscribeRSS Feed
HenriTheuwissen
Calcite | Level 5

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

7 REPLIES 7
jakarman
Barite | Level 11

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.

---->-- ja karman --<-----
TomKari
Onyx | Level 15

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

HenriTheuwissen
Calcite | Level 5

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

Quentin
Super User

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

BASUG is hosting free webinars Next up: Jane Eslinger presenting PROC REPORT and the ODS EXCEL destination on Mar 27 at noon ET. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.
jakarman
Barite | Level 11

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.
    

---->-- ja karman --<-----
ChrisHemedinger
Community Manager

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

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
HenriTheuwissen
Calcite | Level 5

Hi All,

Thank you all for your input on this topic.

Chris,

you gave me the real answer to my problem.

Regards,

Henri

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 7 replies
  • 2074 views
  • 0 likes
  • 5 in conversation