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?
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.
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: