Hi,
Most of the time we stuck with the situation where we need to change Numeric values into Alphabetic.
Suppose we want to convert some numeric values like 1 into one, 5 into five, 100 into hundred and any value.... and even 0 into zero.
Here we go :
Data DSN;
input Variable $ Number ;
Alphabetic=put(number,words30.);
cards;
A 0
B 5
C 49
D 100
E 499
F 67
;
run;
Most of the time we stuck with the situation where we need to change Numeric values into Alphabetic.
Suppose we want to convert some numeric values like 1 into one, 5 into five, 100 into hundred and any value.... and even 0 into zero.
Here we go :
Data DSN;
input Variable $ Number ;
Alphabetic=put(number,words30.);
cards;
A 0
B 5
C 49
D 100
E 499
F 67
;
run;
And the output would be as you need :
In case of, if your value is big like 123456789, need not to worry, just increase the length of words argument.
Example : Alphabetic = put (Number,words75.);
No comments:
Post a Comment