I'm running a variable fit_msr_shldr_wst_sml_b_r_f through PROC MEANS and want it to output the 25th and 75th percentiles as fit_msr_shldr_wst_sml_b_r_f_p25 (31 chars) and fit_msr_shldr_wst_sml_b_r_f_p75. Why is the name being truncated and coming out as fit_msr_shldr_wst_sml_b_r__p25 (30 chars)? I know it's not an ideal variable name, but any help would be appreciated.
data have;
input fit_msr_shldr_wst_sml_b_r_f;
cards;
4
9
9
8
2
4
;
run;
proc means data=have nway noprint;
var fit_msr_shldr_wst_sml_b_r_f;
output out=temp0 P25= P75= / autoname;
run;
Hi @ed_sas_member , If I'm not mistaken, the new variable name I'm trying to make would only be 31 characters, so I'm confused as to why it's being truncated
Hi @bkq32
As highlighted by @Astounding, SAS acts as if it has to put the largest keyword suffix while having less than 32 characters. To avoid this truncation, you can specify the desired name in the "keyword =" option and remove "autoname" (but you will loose the "flexibility" of the program)
proc means data=have nway noprint;
var fit_msr_shldr_wst_sml_b_r_f;
output out=temp0 P25=fit_msr_shldr_wst_sml_b_r_f_p25 P75=fit_msr_shldr_wst_sml_b_r_f_p75;
run;
Best,
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.