Top Navigational Bar

Merge - Primary File To Divide Nine Digit Zip
DocumentID: 651808
Revision Date: 29-Feb-96 8:29:10 PM

The information in this document applies to:
WordPerfect® 5.1 for DOS

Problem

Solutions: Often-times a customer will work with a secondary file that includes nine digit zip codes. Nine digit zip codes generally appear with a hyphen (-) between the fifth and sixth digit. If for some reason the zip codes do not have the hyphen the following primary file can be used to insert them:
      {FIELD}1~
      {FIELD}2~
      {FIELD}3~      
      {ASSIGN}2~{LEN}{VARIABLE}2~~~{COMMENT}
      ~{IF}"{VARIABLE}2~"="5"~-{FIELD}4~{ELSE}{COMMENT}
      ~{MID}{FIELD}4~~0~5~-{MID}{FIELD}4~~5~4~{END IF}

This is an example of a secondary file with a nine digit zip code:
John Doe{END FIELD}
Johns Address{END FIELD}
City, State{END FIELD}
123456789{END FIELD}
{END RECORD}

After merging this file with the above primary file the zip code will appear as 12345-6789.

Answer:

Details:


Product specifications, packaging, technical support and information (*Specifications*) refer to theUnited States retail English version only. Specifications for other versions may vary. All Specifications, claims, features, representations, and/or comparisons provided are correct to the best of our knowledge of the date of publication, but are subject to change without notice.OUR MAXIMUM AGGREGATE LIABILITY TO YOU AND THAT OF OUR DEALERS AND SUPPLIERS IS LIMITED. IT SHALL NOTEXCEED THE AMOUNT YOU PAID TO ACCESS THE INFORMATION. SEE LEGAL DISCLAIMER.