I am trying to write a zero padded field in a test file that a COBOL 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.
+1
A:
Hi Dan
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
Rob Penridge
2010-08-04 20:03:35