Asked • 04/12/19

How to read variable names in a SAS data set?

Are there any statements\\functions capable of get the name of variables? Preferrably putting them into a column of another data set, a text field or a macro variable. **E.g.** **- Data set 1** Name age sex Jk 14 F FH 34 M - Expected data set **Var_name_of_dataset1** Name age sex PS: I know a statement: select into, which does sth relevantly It can read the value of a column into a field with customized separetors, and therefore wish there are similar ways of reading column names into a field or a column. Thanks

1 Expert Answer

By:

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.