0
votes

My supervisor sent me a SAS dataset. I opened it in SAS and found that the headers shown are long variable labels instead of variable names. How can I change the headers from variable labels to variable names? I know how to get variable names by 'proc contents' procedure, but I do not know how to let SAS display a dataset with variable names whenever I open the dataset in SAS.

2
What SAS client do you use? If you are in SAS EG, SAS DI, etc, there are different ways of doing it. - Vasilij Nevlev

2 Answers

2
votes

It's a simple menu option under "View": enter image description here

If you want to force SAS to ALWAYS default to NAMES, you need to change a SAS Explorer setting. Another menu option, starting with the Explorer window active: enter image description here

And then edit the "members" > "table" > "open" instruction to specify "names" rather than labels: enter image description here

For further details, refer to SAS documentation for the Windowing Environment

0
votes

The fast and dirty way is to submit "options nolabel;", meaning that SAS will generally ignore labels. You can always switch back by submitting "options label;"