I am trying to write a zero padded field in a test file that a COB开发者_Go百科OL program will read using the picture clause 9(5)v999. However I am unable to find the proper format. I've tried z8.3 but SAS inserts the decimal point...ie 99.999 where as I need 00099999 as the result. Any help would be appreciated.
I believe this is what you are after:
proc format ;
picture x low-high = '99999999' (prefix='0' mult=100);
run;
data _null_;
do cnt = 0 to 20 by 0.5;
put cnt x.;
end;
run;
You can find some more examples of custom formats in this PDF:
www2.sas.com/proceedings/sugi29/236-29.pdf
Cheers Rob
精彩评论