开发者

Is there a format for outputing an unsigned zoned decimal field in OpenVMS?

开发者 https://www.devze.com 2023-01-09 08:14 出处:网络
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 b

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号