Using a prompt, which takes a single integer numeric value, eg 4. How can I use this prompt to create a dynamic column name.
I use the prompt value to bring through certain columns, called something like "Names".
I would like to be able to name the columns something like "Names_Year_X".
Where X is the prompt value.
I have tried referring to the prompt value by using methods such as "Names_Year_&Prompt" and "Names_Year_&&Prompt&Prompt".
However, none of the above methods work, nor do a number of others I've tried. Does anyone have any advice for house this might work? Preferably using the Query Builder, but if not using a program node for some code is a secondary back up option.
Please post the full code you used to create the dynamically named column.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.