Not sure if this what is needed but possibly a picture format can suffice:
Proc format library=work;
picture sign
low -<0 = '0000000009.000' (prefix='-')
0 = '0' (noedit)
0<- high= '0000000009.000' (prefix='+')
;
run;
data work.test;
x = '1234A'; output;
x = '5432M'; output;
x = '0032M'; output;
x = '00000'; output;
run;
data work.result;
set work.test;
y = input(x, zd5.3);
format y sign.;
run;
... View more