This is a revised version of the GLOBAL edits table for version 5.0

Changes made 06/04/02

  STATE edit modified to add codes for US possessions

  UNPAREN modified to accept zero and more than 2 decimal places.  

  0RJ name changed to RJFILL0 to correct typographical error in "edits.txt" file. 

Changes made for 5.0 release.

  CHEQUE edit expanded to handle over 99 billion dollars.

  DOLLAR edit added. This edit differs from $ since it adds commas.

  MONTH edit added to accept month values "01" through "12".

  STPROV edit added to handle USA states and Canadian provinces.

  TM24x12 edit added to convert 24 hour (military) to 12 hour clock time.

  UNPAREN edit added which removes parenthesis in a number and prefixes
  with "-". Reverses PARENEG.

  ZIPNA added to handle all ZIPs for North America.

  ORJ added to right justify and "0" fill any field.

N:"0"-"9"
A:^ "A"-"Z"
#:\ { {N} | {"."} | {"-"} | {"/" } | {" "} }
NUM:N | <"0">
$:\<"$"> ["-"] NUM [{N}] <"."> NUM NUM
ZIP:N N N N N <-> N N N N | N N N N N
SSNUM:N N N <-> N N <-> N N N N
ALNUM:{ {A} | {N} | {" "} }
ASCII:{ " "-"~" }
CHR:"!"-"~"
SEX:'\{M} Male   \{F} Female' ^~ "M" | "F"
YESNO:'\{Y} YES    \{N} NO    ' ^~ "Y" | "N"
PHONE:\ <"("> N N N <")"> <" "> N N N <"-"> N N N N | N N N <"-"> N N N N
ALLOW:_ ASCII
ALLUP:~ ASCII
STATE:~ "AA"|"AE"|"AK"|"AL"|"AP"|"AR"|"AS"|"AZ"|"CA"|"CO"|"CT"|"DC"|STATE2
STATE2:~ "DE"|"FL"|"FM"|"GA"|"GU"|"HI"|"IA"|"ID"|"IL"|"IN"|"KS"|"KY"|STATE3
STATE3:~ "LA"|"MA"|"MD"|"ME"|"MH"|"MI"|"MN"|"MO"|"MP"|"MS"|"MT"|"NC"|STATE4
STATE4:~ "ND"|"NE"|"NH"|"NJ"|"NM"|"NV"|"NY"|"OH"|"OK"|"OR"|"PA"|"PR"|STATE5
STATE5:~ "PW"|"RI"|"SC"|"SD"|"ST"|"TN"|"TX"|"UT"|"VA"|"VI"|"VT"|"WA"|STATE6
STATE6:~ "WI"|"WV"|"WY"
CHEQUE:[{!" "!}](zero|<*** > lots cents|<*** zero>cents)
lots:(tr| hb | tb | bil | hm | tm | ml | ht | tt | thou | hun | tens | ones)
tr:N N N N N N N N N N N N N & (!0! | ones< trillion >) hb
hb:N N N N N N N N N N N N & (!000! | chek2 < billion > ) hm
tb:N N N N N N N N N N N & ( !00! | ( (!0! ones | tens) < billion >)) hm
bil:N N N N N N N N N N & (!0!|ones< billion >) hm
hm:N N N N N N N N N & ( !000! | chek2 < million >  ) ml2
ml2:                    ( !000! | chek2 < thousand > ) chek2
tm:N N N N N N N N & ( (!0! ml) | ( tens < million > ml2 ) )
ml:N N N N N N N & (!0! | ones < million >) ml2
ht:N N N N N N & ml2
chek2:( !0! | ones< hundred > )  ( !00! | ( !0! ones | tens ) )
tt:N N N N N & (!00! | ( !0! ones | tens ) < thousand > ) (hun|tens|ones)
thou:N N N N & (!0!| ones < thousand >)(hun | tens | ones)
hun:N N N & (!0!|ones < hundred >) (tens | ones)
ones:!0!|!1!<one>|!2!<two>|!3!<three>|!4!<four>|!5!<five>|!6!<six>|one2
one2:!7!<seven>|!8!<eight>|!9!<nine>
tens:!10!<ten>|!11!<eleven>|!12!<twelve>|!13!<thirteen>|!14!<fourteen>|ten2
ten2:!15!<fifteen>|!16!<sixteen>|!17!<seventeen>|!18!<eighteen>|ten3
ten3:!19!<nineteen>|!20!<twenty>|!30!<thirty>|!40!<forty>|!50!<fifty>|ten4
ten4:!60!<sixty>|!70!<seventy>|!80!<eighty>|!90!<ninety>|ten5
ten5:(!0!|ten6 <"-">) ones
ten6:!2!<twenty>|!3!<thirty>|!4!<forty>|!5!<fifty>|!6!<sixty>|ten7
ten7:!7!<seventy>|!8!<eighty>|!9!<ninety>
cents:< and > [!.!] num num </100 dollars ***>
zero:zer1 <*** zero> !.! cents
zer1:(N N N N N&!00000!)|(N N N N&!0000!)|zer2
zer2:(N N N&!000!)|(N N&!00!)|(N&!0!)
ROMAN:~ (N N N N & rom4) | (N N N & rom3) | (N N & rom2) | (N & rom1)
Rom4:( !0! | !1!<M> | !2!<MM> | !3!<MMM> ) rom3
Rom3:( Rom3a | Rom3b ) rom2
Rom3a:!0! | !1!<C> | !2! <CC> | !3!<CCC> | !4!<CD>
Rom3b:!5!<D> | !6!<DC> | !7!<DCC> | !8!<DCCC> | !9!<CM>
Rom2:( Rom2a | Rom2b ) rom1
Rom2a:!0! | !1!<X> | !2!<XX> | !3!<XXX> | !4!<XL>
Rom2b:!5!<L> | !6!<LX> | !7!<LXX> | !8!<LXXX> | !9!<XC>
Rom1:( Rom1a | Rom1b )
Rom1a:!0! | !1!<I> | !2!<II> | !3!<III> | !4!<IV>
Rom1b:!5!<V> | !6!<VI> | !7!<VII> | !8!<VIII> | !9!<IX>
SOUNDEX:~ A N N N
RJ:\ ascii
RJNUM:\ { # }
RJ0:<-> [{!" "!<0>}] !-!{*} | [{ ( " 0" & !" "!<0><0> ) | !" "!<0> }] [{*}]
RMINUS:!" "! [{" "}] ( ( !"-"!<" "> { * } <"-"> ) | ( { * } ) )
PARENEG:!" "! [{" "}] ( ( !"-"!<"("> { * } <")"> ) | ( { * } ) )
MMM_YY:~ ( mthabrv <" "> N N [ N N ] ) | ( repnum [!/!] delnum delnum [!/!] <" "> N N [ N N ]  )
repnum:( (!01! <JAN>) | (!02! <FEB>) | (!03! <MAR>) | (!04! <APR>) | (!05! <MAY>) | (!06! <JUN>) | (!07! <JUL>) | repnum2 )
repnum2:( (!08! <AUG>) | (!09! <SEP>) | (!10! <OCT>) | (!11! <NOV>) | (!12! <DEC>) )
mthabrv:"JAN"|"FEB"|"MAR"|"APR"|"MAY"|"JUN"|"JUL"|"AUG"|"SEP"|"OCT"|"NOV"|"DEC"
delnum:( !0! | !1! | !2! | !3! | !4! | !5! | !6! | !7! | !8! | !9! )
UNPHONE: { !"("! | !")"! | !" "! | !"-"! | N }
DOLLAR:\dol6 | ["-"]<"$"> [{N}] <"."> NUM NUM
DOLLARC:\dol6 | ["-"] <"$"> (dol1|dol2|dol3|dol4|dol5)
dol1:N N N <,> N N N <,> N N N | dol2
dol2:N N <,> N N N <,> N N N <.> NUM NUM | dol3
dol3:N <,> N N N <,> N N N <.> NUM NUM | N N N <,> N N N <.> NUM NUM | dol4
dol4:N N <,> N N N <.> NUM NUM | N <,> N N N <.> NUM NUM | dol5
dol5:N N N <.> NUM NUM | N N <.> NUM NUM | N <.> NUM NUM | "." NUM NUM
dol6:!"-"!<"$"> ("0" <"."> "00"| <"."> "00")
MONTH:"10"-"12" | <0> N
ONOFF:'\{ON} ON   \{OFF} off' ~"ON"|"OFF"
STPROV:STATE | PROV
PROV:~"AB"|"BC"|"LB"|"MB"|"NF"|"NS"|"NT"|"ON"|"PE"|"PQ"|"SK"|"YT"
TM24x12:~time1 ("AM"|"PM")| (timepm1) <:> ("00"-"59") <PM> | timeam
time1:("10"-"12" | [!0!] "1"-"9") <:> ("00"-"59")
timeam:(timeam1 | time1) <AM>
timeam1:(!00!<12> | !24!<12>) <:> ("00"-"59")
timepm:(timepm1) <":"> ("00"-"59") <PM>
timepm1:"12"|!13!<1>|!14!<2>|!15!<3>|!16!<4>|!17!<5>|!18!<6>|timepm2
timepm2:!19!<7>|!20!<8>|!21!<9>|!22!<10>|!23!<11>
UNPAREN:\[{" "}] (!"("! <"-"> | ["-"] ) ["$"] ({"0"-"9"} "." {"0"-"9"}|"." {"0"-"9"}|{"0"-"9"}) [!")"!]
ZIPNA:ZIP | CANZIP
CANZIP:cza czn cza <" "> czn cza czn
cza:~!0!<O> | !1!<I> | !2!<Z> | !5!<S> | !8!<B> | A
czn:~!B!<8> | !I!<1> | !O!<0> | !S!<5> | !Z!<2> | !l!<1> | N
RJFILL0:\0\{*}
LJ:[{!" "!}] {*}

