Good morning Art!
I am using a Lenovo laptop with Windows 7.
Hi Art and Linlin, I have Sony laptop with Windows Vista.
Afterwards, I was wondering about something like this or a system option that may have a different value.
Rich
Rich,
What do you get if you run:
proc options option= caps;
run;
I ran your code on 9.2 and got the same result as Linlin did.
Art,
Proc options option=caps;
run;
gives NOCAPS in the log.
I was looking at VALIDVARNAME could that have any effect?
Rich
Hi Art and Linlin,
The VALIDVARNAME option may be the key.
The setting for this on my system is UPCASE.
From the documentation validvarname=V7 is the default and UPCASE and V7 essentially do the same things as far
as having variable names be all uppercase in SAS datasets. I changed the value to validvarname=any(from 9.3 documentation) and two things happened.
I got a Warning in the log saying this setting was experimental in 9.1.3 but when I did this then the variable names in the dataset
I tested were the same case as written in the code and no longer all uppercase.
Could ANY now be the default for 9.2 and later or is it still V7? Could you check this setting on your systems?
Rich
9.2: validvarname=v7
Hi Rich,
from my log file:
2806 Proc options option=VALIDVARNAME;
2807 run;
SAS (r) Proprietary Software Release 9.3 TS1M0
VALIDVARNAME=V7 Control the type of SAS variable names that can be created
during a SAS session
NOTE: PROCEDURE OPTIONS used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
Alright, that appears to explain it. When I change my VALIDVARNAME option to V7 then the variable names in the dataset
I tested were the same case as in the code and not uppercase anymore. So, when and if I ever post to the forum
again, I will have to think about changiing that option especially if I quote any variable strings.
Rich
This worked. Thanks a lot.
hi ... another idea ...
data x;
input program col1-col3 @@;
datalines;
10 3 5 1 15 1 2 7 24 6 8 5 21 2 8 1 35 9 4 3 33 3 1 1
;
proc format;
value p
10,15 = 'A'
24,21 = 'B'
35,33 = 'C'
;
run;
proc summary data=x nway;
class program;
var col: ;
output out=stats sum=;
format program p.;
run;
proc transpose data=stats out=want (drop=_name_) prefix=prg;
var col1-col3;
id program;
run;
Obs prgA prgB prgC
1 4 8 12
2 7 16 5
3 8 6 4
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.