put function will return a character representation of a numeric OR character value (variable, constant or expression) using a specified format (which must match with the source type value).
Things to remind:
- put function always returns a character value.
- the format specified must be of the same type of the source value.
data _null_;
X=put('XXXXX',$2.); * char to char;
Y=put(23,Z5.); * num to char;
put _all_;
run;
Check the online documentation here:
http://support.sas.com/documentation/cdl/en/lrdict/62618/HTML/default/a000199354.htm
Cheers from Portugal.
Daniel Santos @
www.cgd.pt