How to Write a Check? Use SAS Format!

This post was kindly contributed by From a Logical Point of View » SAS - go there to comment and to read the full post.

5write_a_check_step5_sign_memo

During my initial stay in US last year, one of the interesting exercises was to write a check. The Arabic numerals (the universal language!) were pretty intuitive while I didn’t feel much comfortable on spelling the face value in words: I never played the game!

But the good side of this story was, as a SAS programmer and I used a WORDFw. Format:

data _null_;
    money=8.15;
    put money wordf100.;
run;

and got:

SAS_Format_Check

Another check with a bigger value:

SAS_Format_Check2

2

I paid specially interested on SAS Format recently because of the introducing Perl Regular Expression into PROC FORMAT invalue statement since SAS 9.3(an old procedure plays a new game!). For example, a labeled TIME8. informat created by

proc format;
    invalue xxx (default=20)
      ‘/(\d+):(\d\d)(?:\.(\d+))?/‘ (REGEXP) = [time8.];
run;

For more, see Rick Langston’s paper, Using the New Features in PROC FORMAT (2012).

This post was kindly contributed by From a Logical Point of View » SAS - go there to comment and to read the full post.