Both of your codes are an example for overcomplicating things, and how that ends with shooting oneself in the foot. The following leads to the exact same result, with a minimum of effort:
data PAY_FILE;
input OUTSTANDING_BAL $15.;
cards;
000000000120584
000000000005073
000000000008371
000000000001000
000000000081000
000000000009000
;
data PAY_FILE_want;
set PAY_FILE;
format OUTSTANDING_BAL_num dollar20.2;
OUTSTANDING_BAL_num = input(OUTSTANDING_BAL,15.2);
run;
See the first quote of Maxim 37.
... View more