01-08-2018 02:28 PM
When I do a PROC PRINT... why do all of the variables print in Upper-Case? How can I ensure that what's printed, is EXACTLY as the data exists? Tnanks.
Variable names? That's because that's how they were created, SAS doesn't really care about the case of variable names.
If you want control over the names, you can use variable labels instead which have less restrictions than SAS names.
data demo; MyVar=1; MYVAR2=2; MyVAr3=3; run; title 'Mixed Case Example'; proc print data=demo label;run; title; proc datasets lib=work nodetails nolist; modify demo; rename MYVAR2=MyVar2 myvar3=MyVar3; run;quit; title 'Camel Case Example'; proc print data=demo ; run; title;
01-08-2018 02:32 PM
01-08-2018 02:40 PM
PROC PRINT shouldn't change the variable values. Is there a format attached to the variables? I believe there is a format that will upcase all the values, but that would have been the explicit choice of someone, not a default state.
01-08-2018 02:53 PM
01-08-2018 03:36 PM
1) Please show the exact code submitted.
2) was the variable that you searched for the text "Last Cycle" the variable printed? (would not have to ask the question if you had shown the Proc print code submitted).
3) Ensure that the set you printed is the one that shows a format of $char175.
01-08-2018 04:03 PM
What happens if you run the following? Does it work as expected?
Also, check your own data with the ANYLOWER function applied to the variable of interest.
data test; input Var_Test $Char20.; cards; ABCDE abcde ABcde This is my test hello world HELLO WORLD ; run; title 'Raw data'; proc print data=test; run; title 'Upcase formatted'; proc print data=test; format var_test $upcase.; run; title 'Only with lowercase'; proc print data=test; where anylower(var_test)>0; run;
If you can't provide a reproducible example or such, you may be better off working with tech support so they can see your confidential data and such.
And verify if you really need NOFMTERR option, if you do, I suspect that could be causing some issues, since it's expecting formats.