I am attaching the snapshot of Data, Program and Log. Kindly tell me why the propcase is not working.
A picture is useless to us. Post test data in the form of a datastep so we can run something. This works fine:
data want; abc=propcase("hello world"); run;
So the question is what are you running/doing that doesn't work. We cannot tell this from what you post, test data and your code so we can run it would help.
Are you able to run this bit of code or does it give you the same error?
data test;
var = Propcase('hello');
put var;
run;
My Program
data sasdata.charfuntion;
infile "F:\Char function.txt" firstobs=2;
input Fname $ Lname $ Number;
Name1=Upcase(Fname);
Name2=Lowcase(Lname);
Name3=Propcase(Name2);
run;
------------------------------------------------
Attaching the data also.
Works fine for me:
data want; input fname $ lname $ number; name1=upcase(fname); name2=lowcase(lname); name3=propcase(name2); datalines; Amit Singh 4132 Rahul Kumar 9166 Saurabh Sharma 9354 ; run;
Try starting a new session and just running the above. Also, please specify what software you are using, it looks like Version 8 of SAS, and also you don't seem to have activated your Windows - which arouses my suspicions of what software (legal or otherwise) you are using.
That is a consequence of using stone-age software. SAS 9.0 stems from 2004(!), propcase() was introduced in SAS 9.1.
Upgrade to the current version ASAP.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.