157Data Step Functions
been previously assigned a length, that variable is given a length of
200bytes.
In Program 9.6, the NEW_NAME variable is created by changing the
NAME variable to its proper case by using the PROPCASE function. NEW_
COMMENTS is generated by changing each value for COMMENTS to
uppercase with the UPCASE function.
Program 9.6:
data ex9_6;
set ch9.tenant;
new_name = propcase(name);
new_comments = upcase(comments);
run;
title 'Illustrating the use of PROPCASE and UPCASE functions';
proc print data = ex9_6 (obs = 5);
var name new_name comments new_comments;
run;
Output from Program 9.6:
Illustrating the use of PROPCASE and UPCASE functions
Obs name new_name comments
1 DAVID DAVIS David Davis pounding; complains often ...