SAS (Base SAS)+
options validvarname=upcase;
data class;
input name $ sex $ age height weight;
datalines;
Alfred M 14 69 112.5
Alice F 13 56.5 84
;
run;- To force SAS to uppercase every variable name, we set
options validvarname=upcase;before the DATA step. validvarnamecontrols how SAS treats variable names it creates or reads. Theupcasevalue means “if a name arrives in mixed case, store it in upper case”.- After the option is set, any dataset we create (including via
proc importor a DATA step reading external files) has uppercase variable names by default. - The option is global — it stays in force for the rest of the session unless we reset it. For a one-off, wrap it with
options validvarname=v7;at the end to restore default behaviour. - After running, a
proc contentsconfirms every variable name is uppercase.