BookmarkSubscribeRSS Feed
Quentin
PROC Star

I'm trying to create a set of dynamic stored process prompts. 

 

I have all the data needed to use as source data for the prompts in a single SAS dataset, that looks like:

 

Prompt    Value   Label
Prompt1   A         Pretty A
Prompt1   B         Pretty B
Prompt2   X         Pretty X Label
Prompt2   Y         Pretty Y Label
....

 

That dataset has all of the values and labels for a group of prompts.

 

What is the best way for me to use this data as a source for the group of dynamic prompts?

 

I know I can split the data into one dataset for each prompt, and then register each of those tables and use them as a data source for each prompt.  But then I end up with N SAS datasets (one for each prompt) and N registered tables.

 

I would love to have just one SAS dataset and one registered table.  Could live with one sas dataset and N registered tables (i.e. each registered table represents a different subset of the SAS dataset).

 

I don't see a way to register a metadata table and only use a subset of SAS dataset rows.  And don't see a way to define a prompt using a metadata table as a source and only use a subset of rows.

 

Perhaps I should be making an InfoMap to use as a source for my prompts instead?  I haven't done that much, but I think there may be more subsetting options?

 

Check out the Boston Area SAS Users Group (BASUG) video archives: https://www.basug.org/videos.
3 REPLIES 3
tomrvincent
Rhodochrosite | Level 12
Have each of the prompts as separate fields in one metadata table.
Quentin
PROC Star

At the time I wrote this (2 years ago : )  I was hopeful that I could get it to work in the normalized vertical structure.

 

I think transposing it to a wide format would be problematic, as each prompt could have a different number of value-label pairs.  I guess if there's an option to ignore null values it could work.  I hate the thought of a wide dataset like that, but I guess I could maintain the data in the vertical structure, and have a job that PROC TRANSPOSES it to be wide.

 

Worth a thought, if I run into this again.  Thx.

Check out the Boston Area SAS Users Group (BASUG) video archives: https://www.basug.org/videos.
tomrvincent
Rhodochrosite | Level 12
I noticed that nobody provided you with any suggestions which is why I decided to respond. 🙂

Unreplied-to questions are like a sad, cold puppy out in the rain... 🙂

The whole dynamic list is clumsy and limited, but at least it exists at all.

Having 4 fields in the table doesn't seem like that problematic to me. I don't think you could do a transpose out to a metadata table but if you get it to work please share your success story.

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 1040 views
  • 1 like
  • 2 in conversation