Help using Base SAS procedures

how to change the variable name

Frequent Learner
Posts: 1

how to change the variable name

I'm just new to SAS... just two days now ... lol .. I imported a data .txt which have variable names in number range (0-4, 5-10, etc). It resulted to a 0?4, 5?10 etc.. how could I remove the ? symbol?


thanks you

Super User
Posts: 23,683

Re: how to change the variable name

Set the following option and rerun your import. 


Options validvarname=v7;


Then SAS will automatically create names that replace spaces and invalid characters with underscores. 

Also note the difference between SAS variables and labels. 

Run a PROC CONTENTS on the data to see both. 

Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation