BookmarkSubscribeRSS Feed
ralizadeh
Obsidian | Level 7

How to use a prompt to name the Source column showed below something different?

 

ralizadeh_0-1682630979761.png

 

I used it, and it gave me this:

 

ralizadeh_1-1682631035880.png

 

Thank you.

1 REPLY 1
JOL
SAS Employee JOL
SAS Employee

Yes you can use a Prompt to name the source column, but it requires modifying the underlying code. 

 

Are you sure you need to modify the Source column name, or do you need to choose the source transpose variable from a list?

If so create a Variable Prompt and add as below

 

JOL_1-1686596245088.png

 

 

If you really need to modify the Source column name:

1) Create a Text Prompt, with the list of values

2) Add the Text Prompt as in your example under Options. Run the task.

3) Start typing in the generated Code to create a copy

4) Right-Click on the code under the Project tree on the left to modify the code propertiesSelect Prompts,  add the Text Prompt. 

JOL_3-1686597915080.png

 

5) Modify the PROC TRANPOSE, NAME= option as follows:

         change NAME='&prompt_2'n  to NAME=&prompt_2

 

JOL_5-1686598638337.png

 

 

 

 

 

 

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 1 reply
  • 537 views
  • 0 likes
  • 2 in conversation