BookmarkSubscribeRSS Feed
camfarrell25
Quartz | Level 8

Hello,

 

I am trying to add a prompt that would allow the user to populate the following table using the prompt instead of manually adjusting the code.

Ideally, the user would be able to input multiple names and the associated gender.

The two variables:

Name $30

Gender $6

 



DATA gender_names_v2_add;

set gender_names_v1 (drop= datetime);

INPUT NAME GENDER; 

DATALINES;

PIEROLIVIER M

RUN; 

4 REPLIES 4
Reeza
Super User

So what is the question you need help with?

What are your parameter names and what's not working? I see no reference to your parameters in your code for starters.

 


@camfarrell25 wrote:

Hello,

 

I am trying to add a prompt that would allow the user to populate the following table using the prompt instead of manually adjusting the code.

Ideally, the user would be able to input multiple names and the associated gender.

The two variables:

Name $30

Gender $6

 



DATA gender_names_v2_add;

set gender_names_v1 (drop= datetime);

INPUT NAME GENDER; 

DATALINES;

PIEROLIVIER M

RUN; 


 

camfarrell25
Quartz | Level 8

I am not sure how to have the prompt be a table essentially, allowing the user to input name and gender.

Is that something that is feasible?

VDD
Ammonite | Level 13 VDD
Ammonite | Level 13

Have you looked at SAS Screen Control Language examples?

 

Reeza
Super User

@camfarrell25 wrote:

I am not sure how to have the prompt be a table essentially, allowing the user to input name and gender.

Is that something that is feasible?


 

Sure, register your table in the metadata server, then select Prompt Type as Text. Then for Method select User selects from static/dynamic list. If it's a dynamic list, you can add the source to be a table (if it's registered in the metadata server) or you can manually create your list in the prompt. 

 

I suspect we're dealing with an XY type problem here and if you could explain your requirements more we may be able to suggest different options. 

XY problem:  http://xyproblem.info/

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 1243 views
  • 0 likes
  • 3 in conversation