BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Is it possible for SAS to create variable from data set column names?

At the moment I am using arrays to create these variables, but it is possible for new data set column names/variables to be added or removed using a data step?

I want to be able to run data steps without having to worry about having to amend to code should there be new variables or variables need removing.


Thanks
2 REPLIES 2
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Explore using PROC IMPORT. Have a look (and search) at the SAS support website http://support.sas.com/ using your keywords.

Scott Barry
SBBWorks, Inc.

http://www2.sas.com/proceedings/sugi30/038-30.pdf

http://support.sas.com/documentation/cdl/en/proc/59565/HTML/default/a000308090.htm
Patrick
Opal | Level 21
SAS is quite powerful for tasks like this - but to give you an answer you will have to explain a bit more in detail what you have and what you want to achieve.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 559 views
  • 0 likes
  • 3 in conversation