Syntax CALL PUTC(c-source, format <, new-string <, return-code >> ) CALL PUTN(n-source, format <, new-string <, return-code >> ) Arguments c-source specifies a character constant, constant, variable, or expression to which you want to apply the format. n-source specifies a numeric constant, constant, variable, or expression to which you want to apply the format. format contains a string with the SAS format that you want applied to the value that is specified in the source. ... new-string specifies a character variable in which to place the formatted value. return-code specifies a numeric variable for which received a return-code of 0,1 or 2 0 - No error 1 - no-match 2 - format not found (or more) Example: proc format;
value $A
'00' ="00"
'01','04'="foo"
'02' ="bar"
'03' ="sna"
;
data result;
do x = '00', 'AA';
call putc(x, "$A.", y, rc);
if rc ne 0
then call missing (y);
output;
end;
run; result: x y
00 00
AA
... View more