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.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.