pitney bowes 11

Canadian CODE-1 Plus™ Release 3.4.0

User Guide

For IBM i Information in this document is subject to change without notice and does not represent a commitment on the part of the vendor or its representatives. No part of this document may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, without the written permission of Pitney Bowes Software Inc., One Global View, Troy, New York 12180-8399.

© 2008-2019, Pitney Bowes Software, Inc.

All rights reserved. MapInfo, and Group 1 Software are trademarks of Pitney Bowes Software Inc. All other marks and trademarks are property of their respective holders. Prices for Pitney Bowes Business products, options and services are not established, controlled or approved by Post Corporation (CPC) or the Canadian Government. When CPC data is used to determine parcel-shipping costs, the business decision on which parcel delivery company to use is not made by CPC or the Canadian Government. Postal CodeOM is an official mark of Corporation. FSAOM and LDUOM are official marks of Canada Post Corporation. The data that has been used in conjunction with Recognized Software ( Accuracy) is the Postal CodeOM data that Canada Post creates and compiles, along with other data, into the Postal CodeOM Address Database. However, Canada Post has now created an enhanced database known as the Point of Call (range based) Address Database, which is more precise than the Postal CodeOM Address Database and in particular eliminates that either do not exist or are addresses to which there is no mail delivery. As the creator of the Postal CodeOM data, Canada Post is the original source of, and the owner of the copyright in, all such data. As the compiler of the Postal CodeOM Address Database and the Point of Call (range based) Address Database, Canada Post is the original source of, and the owner of the copyright in, each of those database compilations. Canada Post Data is subject to change and the Canada Post Data Files are updated on a monthly basis to incorporate the changes, which changes may include, but are not limited to, changes to update data that is no longer valid.

Tous droits réservés. MapInfo et Group 1 Software sont des marques commerciales de Pitney Bowes Software Inc. Toutes les autres marques et marques commerciales appartiennent à leurs détenteurs respectifs. Les tarifs des produits, options et services de la gamme de Pitney Bowes ne sont ni établis, ni contrlés ni approuvés par la Société canadienne des postes (SCP) ou le gouvernement canadien. Si la SCP est utilisée pour déterminer les cots d'envoi des colis, la décision sur le choix de l'entreprise de livraison à utiliser n'est prise ni par la SCP ni par le gouvernement canadien. Code postalMO est une marque officielle de la Société canadienne des postes. RTAMO et UDLMO sont des marques officielles de la Société canadienne des postes. Les données utilisées en conjonction avec le logiciel reconnu (précision de l'adresse) [Recognized Software (Address Accuracy)] correspondent au données de Code postal MO que Postes Canada crée et compile, avec d'autres données, dans la base de données d'adresses de Code postalMO. En tant que créateur des données de Code postalMO, Postes Canada est la source originale de toutes ces données et en est le détenteur des droits d'auteur. En tant que compilateur de la base de données d'adresses Code postalMO, et en tant que point de remise (en fonction de la gamme) de la base de données d'adresses, Postes Canada est la source originale de toutes ces compilations de bases de données et en est le détenteur des droits d'auteur. Les données de Postes Canada peuvent faire l'objet de changements et les fichiers de données de Postes Canada sont mis à jour sur une base mensuelle pour intégrer ces changements. Ces changements peuvent inclure, mais sans s'y limiter, des changements de mise à jour de données qui ne sont plus valides.

Pitney Bowes 3001 Summer Street Stamford CT 06926-0700 USA https://www.pitneybowes.com/us

Support: +1 (800) 367.6950 Sales: +1 (800) 327.8627 https://www.pitneybowes.com/us/support.html

Canada: Phone: +1 (416) 594.5200 Fax: +1 (416) 594.5201

Technical Support: +1 (518) 285.7283 Technical Support Fax: +1 (518) 285.6080 www.pitneybowes.ca/software/ Table of Contents

Chapter 1: Canadian CODE-1 Plus™ Concepts...... 11 Introducing Canadian CODE-1 Plus™ ...... 12 Understanding a Postal CodeOM ...... 13 What is a ? ...... 14 Anatomy of a Postal Code ...... 15 Canadian Addressing Guidelines ...... 16 Addressing Canadian Mail...... 16 Addressee Information...... 17 Software Evaluation and Recognition Program (SERP) ...... 19 What Is SERP? ...... 19 How Does the Process Work?...... 19 The CPC Postal Code Data Files ...... 20 What Is a “Valid” Address? ...... 20 What Is an Invalid Address? ...... 20 Chapter 2: Getting Started with Canadian CODE-1 Plus™...... 21 Overview ...... 22 Preparing Your Job...... 22 Knowing Your File Descriptions...... 22 Knowing Your Input File Format ...... 22 Steps in a Canadian CODE-1 Plus Job ...... 22 Defining Jobs with Parameters ...... 23 Defining Canadian CODE-1 Plus Reports ...... 24 Using the Database Functions...... 25 Work with Jobs Screen (C6CPMM03) - Views 1 and 2...... 28 View 1 ...... 28 Work with Jobs Screen (C6CPMM03) View 1 - Fields...... 29 Work with Jobs Screen (C6CPMM03) View 1 - Function Keys ...... 29 Work with Jobs Screen (C6CPMM03) View 2 ...... 30 Define/Submit Canadian CODE-1 Plus Job Screen (C6CPDS01) ...... 31 Define/Submit Canadian CODE-1 Plus Job Screen (C6CPDS01) - Fields ...... 31 Define/Submit Canadian CODE-1 Plus Job Screen (C6CPDS01) - Function Keys . . . 32 Create New Job Screen (C6CPNJ01)...... 33 Create New Job Screen (C6CPNJ01) - Fields...... 33 Create New Job Screen (C6CPNJ01) - Function Keys ...... 34 Copy Jobs Screen (C6CPCJ03) ...... 35 Copy Jobs Screen (C6CPCJ03) Fields ...... 35 Rename Jobs Screen (C6CPRJ03) ...... 36 Rename Jobs Screen (C6CPRJ03) Fields ...... 36 Confirm Delete of Job Definition Screen (C6CPMM06) ...... 37 Saving Job Definitions - Screen (C6CPOP10) ...... 38 Saving Job Definitions Screen (C6CPOP10) Fields ...... 38

Release 3.4.0 3 User Guide - IBM® i Table of Contents

Saving Job Definitions - Screen (C6CPOP10) - Function Keys...... 39 Chapter 3: Defining Input...... 41 Overview ...... 42 Address Locations Screen (C6CPID10) ...... 42 Defining Your Input Address ...... 43 Address Locations Screen (C6CPID10) - Fields ...... 43 Address Locations Screen (C6CPID10) - Function Keys ...... 44 Postal Code Locations Screen (CPCID11) ...... 45 Defining Your Input Municipality, Province, and Postal Code ...... 45 Postal Code Locations Screen (CPCID11) - Fields ...... 46 Postal Code Locations Screen (CPCID11) - Function Keys ...... 47 Additional Input File Information Screen (C6CPID12) ...... 48 Defining Your Input List Code ...... 48 Additional Input File Information Screen (C6CPID12) - Fields...... 48 Additional Input File Information Screen (C6CPID12) - Function Keys ...... 49 Confirmation Options Screen (C6CPID13) ...... 50 Confirming Records Without Processing ...... 50 Confirmation Options Screen (C6CPID13) - Fields ...... 51 Confirmation Options Screen (C6CPID13) - Function Keys ...... 51 Additional Input File Information Screen (C6CPID14) ...... 52 Defining Input Large Volume Receiver (LVR) Information...... 52 Additional Input File Information Screen (C6CPID14) - Fields...... 53 Additional Input File Information Screen (C6CPID14) - Function Keys ...... 53 Sequence Check Screen (C6CPID15) ...... 54 Display Database File Field List Screen (@@CPFR04) - Fields...... 54 Display Database File Field List Screen (@@CPFR04) - Function Keys ...... 55 French Parameter Information Screen (C6CPID17) ...... 56 French Parameter Information Screen (C6CPID17) - Function Keys ...... 56 French Parameter Details Screen (C6CPID20) ...... 57 French Parameter Details Screen (C6CPID20) - Fields ...... 57 French Parameter Details Screen (C6CPID20) - Function Keys ...... 58 Display Database File Field List Screen (@@CPFR04) ...... 59 Display Database File Field List Screen (@@CPFR04) - Fields...... 59 Reformat Input Record Screen (C6CPMI13) ...... 60 Reformat Input Record Screen (C6CPMI13) - Fields ...... 60 Chapter 4: Defining Output ...... 63 Overview ...... 64 Overall Correctness Scores...... 64 Disposition Indicator...... 64 Postal Code Storage Options Screen (C6CPOD10)...... 65 Postal Code Storage Options Screen (C6CPOD10) - Fields...... 65 Postal Code Storage Options Screen (C6CPOD10) - Function Keys ...... 66 Postal Code Storage Options Screen (C6CPOD11)...... 67 Postal Code Storage Options Screen (C6CPOD11) - Fields...... 67

Release 3.4.0 4 User Guide - IBM® i Table of Contents

Postal Code Storage Options Screen (C6CPOD11) - Function Keys ...... 68 Result Postal Code Screen (C6CPOD12) ...... 69 Result Postal Code Screen (C6CPOD12) - Fields...... 69 Result Postal Code Screen (C6CPOD12) - Function Keys ...... 69 Standardized Address Storage Screen (C6CPOD16) ...... 70 Standardized Address Storage Screen (C6CPOD16) - Fields ...... 71 Standardized Address Storage Screen (C6CPOD16) - Function Keys ...... 73 Standardized Address Storage Options Screen (C6CPOD17) ...... 74 Standardized Address Storage Options Screen (C6CPOD17) - Fields ...... 74 Standardized Address Storage Options Screen (C6CPOD17) - Function Keys ...... 75 Address Element Storage Screen (C6CPOD18)...... 76 Address Element Storage Screen (C6CPOD18) - Fields ...... 76 Address Element Storage Screen (C6CPOD18) - Function Keys ...... 77 Street Address Information Format Screen (C6CPOD19) ...... 78 Street Address Information Format Screen (C6CPOD19) - Fields ...... 79 Street Address Information Format Screen (C6CPOD19) = Function Keys ...... 81 City and Province Storage Screen (C6CPOD20) ...... 82 City and Province Storage Screen (C6CPOD20) - Fields ...... 83 City and Province Storage Screen (C6CPOD20) - Function Keys ...... 85 City and Province Storage Options Screen (C6CPOD21) ...... 86 City and Province Storage Options Screen (C6CPOD21) - Fields ...... 86 City and Province Storage Options Screen (C6CPOD21) - Function Keys...... 87 Address Match Information Storage Screen (C6CPOD22) ...... 88 Address Match Information Storage Screen (C6CPOD22) - Fields...... 88 Address Match Information Storage Screen (C6CPOD22) - Function Keys ...... 89 Parsed Address Information Storage Screen (C6CPOD24) ...... 90 Parsed Address Information Storage Screen (C6CPOD24) - Fields ...... 90 Parsed Address Information Storage Screen (C6CPOD24) - Function Keys ...... 91 Reformat Output Record Screen (C6CPMO13) ...... 92 Reformat Output Record Screen (@@CPFR04) - Fields ...... 92 Chapter 5: Generating Reports ...... 95 Defining Canadian CODE-1 Plus Reports...... 96 Component Overview ...... 96 Types of Headers and Footers...... 97 Defaults for Print Output Screen (C6CPPX01) ...... 97 Defaults for Print Output Screen (C6CPPX01) - Fields ...... 98 Defaults for Print Output Screen (C6CPPX01) - Function Keys ...... 98 Define Headers and Footers Screen (C6CPPX03) ...... 99 Define Headers and Footers Screen (C6CPPX03) - Fields...... 99 Define Headers and Footers Screen (C6CPPX03) - Function Keys ...... 99 Report Selection Screen (C6CPRP10)...... 101 Report Selection Screen (C6CPRP10) - Fields ...... 101 Report Selection Screen (C6CPRP10) - Function Keys ...... 102 Report Selection Screen (C6CPRP11)...... 103 Report Selection Screen (C6CPRP10) - Fields ...... 103

Release 3.4.0 5 User Guide - IBM® i Table of Contents

Report Selection Screen (C6CPRP10) - Function Keys ...... 104 Define Differences/Uncoded Reports Screen (C6CPUD01) ...... 105 Define Differences/Uncoded Reports Screen (C6CPUD01) - Fields ...... 105 Define Differences/Uncoded Reports Screen (C6CPUD01) - Function Keys ...... 106 Postal Code Differences Screen (C6CPUD21) ...... 107 Postal Code Differences Screen (C6CPUD21) - Fields...... 107 Postal Code Differences Screen (C6CPUD21) - Function Keys ...... 108 Standardized Address Differences Screen (C6CPUD21) ...... 109 Standardized Address Differences Screen (C6CPUD21) - Fields ...... 109 Standardized Address Differences Screen (C6CPUD21) - Function Keys ...... 110 City Name Differences Screen (C6CPUD21)...... 111 City Name Differences Screen (C6CPUD21) - Fields ...... 111 City Name Differences Screen (C6CPUD21) - Function Keys ...... 112 Uncoded/Unmatched Screen (C6CPUD21) ...... 113 Uncoded/Unmatched Screen (C6CPUD21) - Fields ...... 113 Uncoded/Unmatched Screen (C6CPUD21) - Function Keys...... 114 Define Differences/Uncoded Reports (C6CPUD80) Screen ...... 115 Define Differences/Uncoded Reports (C6CPUD80) Screen - Fields ...... 115 Define Differences/Uncoded Reports (C6CPUD80) Screen - Function Keys ...... 115 Analysis of Matched Records Report ...... 116 Processing Summary Reports...... 116 Parameters Listing Report ...... 116 Control Totals Report ...... 116 Execution Log ...... 117 Statement of Address Accuracy ...... 117 Return Code Analysis Reports ...... 118 Chapter 6: Running Jobs ...... 119 Overview ...... 120 Files and File Names...... 120 Exit Routines ...... 120 Submit Canadian CODE-1 Plus Job Screen (C6CPSB01) ...... 123 Submit Canadian CODE-1 Plus Job Screen (C6CPSB01) - Fields ...... 123 Submit Canadian CODE-1 Plus Job Screen (C6CPSB01) - Function Keys ...... 125 Submit Canadian CODE-1 Plus Job Screen (C6CPSB02) ...... 126 Submit Canadian CODE-1 Plus Job Screen (C6CPSB02) - Fields ...... 126 Submit Canadian CODE-1 Plus Job Screen (C6CPSB02) - Function Keys ...... 129 Submit Canadian CODE-1 Plus Job Screen (C6CPSB03) ...... 130 Submit Canadian CODE-1 Plus Job Screen (C6CPSB03) - Fields ...... 130 Submit Canadian CODE-1 Plus Job Screen (C6CPSB03) - Function Keys ...... 131 Limit Processing Screen (C6CPSB90) ...... 132 Limit Processing Screen (C6CPSB90) - Fields ...... 133 Limit Processing Screen (C6CPSB90) - Function Keys ...... 133

Release 3.4.0 6 User Guide - IBM® i Table of Contents

Chapter 7: Using G1G001 ...... 135 What Is G1G001?...... 136 Using G1G001 ...... 136 Input File and Header/Footer Parameters...... 136 FILEDF...... 137 HEADER ...... 137 HEADxx ...... 138 UFTxx ...... 138 UHDxx ...... 139 Report Layout and Content Parameters ...... 139 CONTRL ...... 139 CONSTANT ...... 141 FORMAT ...... 141 MOVE ...... 143 PAGESZ ...... 143 TESTIT...... 144 UNPK...... 144 Record Selection Parameters ...... 145 SELECT...... 145 CHANGE ...... 146 Sample Control Language ...... 146 Chapter 8: Using Callable Routines ...... 147 Introduction to the Callable Routines ...... 148 Address Validation/Correction ...... 148 Database Inquiry Type 1 and 2 Modules ...... 148 Call Areas ...... 148 Canadian CODE-1 Plus Matching Module - C6MATCH ...... 148 How C6MATCH Works ...... 149 The C6MATCH Call Area...... 149 Calling C6MATCH ...... 166 C6DBRLKP...... 167 General Guidelines ...... 167 Working Storage Area LM-PC-REV-LK ...... 168 Calling C6DBRLKP ...... 171 Chapter 9: Using the Interactive System ...... 175 Getting Started with the Interactive System...... 176 Address Matching Function ...... 176 Database Inquiry Function...... 176 Correcting Uncoded Records Function ...... 176 Accessing the Canadian CODE-1 Plus Interactive System ...... 177 Using the Interactive System Screen ...... 178 Online Help ...... 179 Address Matching ...... 179 Scrolling Match Results Screens ...... 180

Release 3.4.0 7 User Guide - IBM® i Table of Contents

Database Inquiry ...... 180 Navigating the Screens ...... 181 Moving to a Specific Line on a Screen...... 181 Displaying Data About a Database Entry...... 181 Example Work Session...... 184 Step 1. Accessing the Interactive System ...... 184 Step 2. Querying the Database ...... 186 Step 3. Matching an Updated Address ...... 188 Correcting Uncoded Records...... 189 Interactive Screen Reference...... 189 Command Field ...... 189 Address Matching Screens ...... 191 Address Match Screen...... 191 Return Codes Screen ...... 192 Parsed Elements Screen ...... 194 Multiple Elements Screen ...... 196 Dropped Info Screen ...... 197 Database Inquiry Screens ...... 198 Details in a Postal Code Screen ...... 198 Houses on a Street Screen ...... 199 Municipality Information Screen...... 200 Streets in a Municipality Screen...... 202 Customizing Screens ...... 203 Administration Sign-on Screen ...... 203 Interactive Customization Screen ...... 205 Chapter 10: Printing Postal Code Data - C6DBPRT...... 209 What is C6DBPRT? ...... 210 Printing Postal Code Data ...... 210 Step 1: Define Postal Code Ranges ...... 210 Step 2: Define Database and Product Installation Libraries ...... 210 Chapter 11: System-Wide Commands ...... 211 Entering Commands at the Command Line ...... 212 Using C6RUNJOB to Run Jobs ...... 213 Using C6SBMJOB to Submit Jobs ...... 215 Using the Job Import Utility ...... 218 Example: Creating a Job that Uses an Existing Library...... 221 Error Messages ...... 221 Chapter 12: Sample Library Member Reference ...... 223 Sample Library Member Reference...... 224 File SOURCE...... 224 File SOURCE92...... 225 Index ...... 227

Release 3.4.0 8 User Guide - IBM® i Canadian CODE-1 Plus™ 1 Concepts

In this chapter

 Understanding a Postal CodeOM ...... 13  Canadian Addressing Guidelines ...... 16  Software Evaluation and Recognition Program (SERP)...... 19 Introducing Canadian CODE-1 Plus™

Canadian CODE-1 Plus is an address validation/correction system that improves the deliverability of your mail and is your first step toward taking advantage of Canada Post discounts. Canadian CODE- 1 Plus matches input addresses to the addresses in the Canadian CODE-1 Plus database, corrects input information, and adds postal information. Processing results are written to one or more output files, depending on your processing needs. This postal information can include: • Postal codes • Standardized address elements (civic numbers; street directionals, names, and types; unit keywords and identifiers; route designators and indicators; lock box/bag identifiers) • Standardized municipality names and province abbreviations Canadian CODE-1 Plus saves you money by helping you to qualify your mail for Canada Post’s accuracy-level discounts. Canadian CODE-1 Plus uses information obtained from the Canada Post masterfiles to ensure that your addresses are correct and standardized according to the Canada Post conventions. In addition, accurate addresses get your mail delivered more quickly. Canadian CODE-1 Plus, when used with other Pitney Bowes products, is the first step to a total postal discount and list management solution. Once you have processed a file with Canadian CODE-1 Plus, you can:

• Use the Canadian CODE-1 Plus reports and return codes to determine the quality of the input file. • Update an in-house database. • Use SortStream Canada to obtain presorting discounts. Canadian CODE-1 Plus is a batch-driven system that also provides interactive address matching and interactive database display functions. Canadian CODE-1 Plus batch job definitions are specified through a series of parameters. Canadian CODE-1 Plus can store the following match results relating to match attempts for each input record: • Postal code • Standardized address elements • Municipality and province information • Address match information (for example, return codes, match statistics) During address validation and correction, address lines are extracted from the input record, separated into components (parsed), and compared to the contents of the Canadian CODE-1 Plus database. If a match is found, the input address is corrected according to the contents of the database.

 If no database match is determined, Canadian CODE-1 Plus provides the option to normalize input addresses. The normalization process attempts to format the address lines according to conventions outlined in the Canada Post publication, Delivery Needs Accuracy: Canadian Addressing Standards. When the normalization option is invoked and no database match is found for a particular address, Canadian CODE-1 Plus attempts to recognize the individual elements and formats them according to Canada Post conventions.

The following terms were discussed in the previous section and will be used throughout this book:

• Standardized Address - The corrected or validated output address (includes the street address, municipality, province, and postal code) • Normalized Address - An uncorrected or non-validated address that has been formatted to conform to CPC standards

Release 3.4.0 12 User Guide - IBM® i Chapter 1: Canadian CODE-1 Plus™ Concepts Understanding a Postal CodeOM

• Extra Address Information - Extra address information is a string of information that is removed from the standardized output because it cannot be found on the Canada Postal Database; extra information string contains CPC-recognized words like “sitea” and “comp” • Address Components - The pieces that make up an entire input or output record (Addressee information, delivery address, municipality, province, postal code) • Address Elements - The individual pieces that make up the delivery address (civic number, street name, street type, street directional, unit keyword, unit identifier, route designator, route identifier, lock box/bag identifier) The following sections of this chapter provide more information about Canada Post addressing guidelines, the Software Evaluation and Recognition Program (SERP), and how Canadian CODE-1 Plus applies these guidelines.

Understanding a Postal CodeOM

Canada Post Corporation (CPC) collects, processes, and delivers mail across the second-largest geographic area in the world (second only to the area covered by the former Soviet Union). To ensure that each piece of mail arrives at its destination promptly, CPC has developed a system of postal codes. Each postal code identifies a specific delivery location within Canada, from an office suite in downtown to a village in the Territory.

Figure 1: Postal Code Map The map above shows the provinces, territories, and largest cities in Canada labeled with the appropriate first letter of the postal code. The Canadian Postal Code System on page 14 corresponds to this map, listing the province or city name, the official Canada Post province/territory symbol, and the first letter of the postal code.

Release 3.4.0 13 User Guide - IBM® i Understanding a Postal CodeOM What is a Postal Code? Canadian Postal Code System

First Character of Postal Province or City Province Symbol Code

Newfoundland and NL A Labrador

Nova Scotia NS B

Prince Edward Island PE C

New Brunswick NB E

Quebec QC G

Metropolitan QC H

Quebec West QC J

Eastern ON K

Central Ontario ON L

Metropolitan Toronto ON M

Southwestern Ontario ON N

Northern Ontario ON P

Manitoba MB R

Saskatchewan SK S

Alberta AB T

British Columbia BC V

Northwest Territories NT X

Nunavut NU X

Yukon Territory YT Y

The postal code appears on the last line of the address, after the city and province. It must be the last piece of data in the address. It consists of six characters with one space in the middle.

Release 3.4.0 14 User Guide - IBM® i Chapter 1: Canadian CODE-1 Plus™ Concepts Understanding a Postal CodeOM

Figure 2: Postal Code Examples (source: www.canadapost.ca)

The first three characters are always letter-number-letter, while the last three are number-letter- number. The postal code identifies the place where you collect your mail, not necessarily where you live.

Anatomy of a Postal Code The first three characters of the postal code are called the Forward Sortation Area (FSA). The first character of the FSA (and of the postal code) is always a letter that identifies the province (or in the case of Montreal and Toronto, the city) where the mail is going. The table on the preceding page lists the letter codes and their related city or province. The second character of the FSA indicates an urban or rural delivery area. Numbers 1-9 indicate that this piece of mail is going to an urban area; 0 indicates a rural area. The third character of an urban FSA describes the exact area in a city or town to which that piece of mail will be delivered. If this is a rural FSA, the third character in the FSA is a letter indicating the Distribution Centre Facility (DCF) that will process the mail for delivery. The second three characters of the postal code are called the Local Delivery Unit (LDU). The LDU designates a specific city, street, block, office building or suite, box, or even department within a company — anywhere mail is received. The LDU is the finest level of delivery designated by CPC.

All of the regulations for presorting Canadian mail are based on an understanding of the postal codes. How the mail is sorted depends on the FSA where it will be delivered. The LDU becomes important after the mail piece reaches the post office of delivery. A single mail carrier may deliver mail to several LDUs.

Release 3.4.0 15 User Guide - IBM® i Canadian Addressing Guidelines Canadian Addressing Guidelines

This section provides an overview of Canada Post’s regulations for addressing mail. Specifically, this chapter covers labeling envelopes and the addressing format mailers ideally use for the most efficient mail processing and timely delivery of their mail pieces.

Addressing Canadian Mail Canada Post Corporation (CPC) has developed address-labeling standards to facilitate modern mail processing and timely delivery. CPC requires that all mail items must contain the following address components for delivery of the mail piece: • Addressee • Delivery address • Community/municipality • Province • Postal code Your mail is most efficiently processed when it follows the optimum address format, which uses symbols, capital letters, and no punctuation (such as commas or periods). The CPC addressing conventions include guidelines for: • Format • Punctuation • Address components Canadian CODE-1 Plus from Pitney Bowes conforms to these CPC addressing guidelines to enhance mail deliverability.

Address Format Canada Post defines a mailing address as the information required to identify a point of call and/or delivery point. The CPC sequence of components of an address block for mail originating in and addressed to a destination within Canada is: • Non-address data and addressee information • Delivery address information • Municipality, province, postal code If the mailer follows the optimum addressing format for the most efficient mail processing and timely delivery, the following rules apply: • The symbol for an address element must be used rather than the full name • Upper-case letters are preferred on all lines of the address block • The number sign (#) or the French equivalent (nº) must not be used in an address • Punctuation, such as a comma, should not be used as a delimiter between address elements or components unless otherwise noted • All lines of the address must be formatted with a flush-left margin

Non-Address Data If there is any data that is extraneous, such as “Attention” or “Address Correction Required,” this type of non-address data must always appear above the top line of the address block, above the delivery address information line. Non-address data includes any additional information a mailer wishes to put on the mail piece. This includes words such as “Attention” and “Confidential” or account numbers and customer identification numbers.

Release 3.4.0 16 User Guide - IBM® i Chapter 1: Canadian CODE-1 Plus™ Concepts Canadian Addressing Guidelines

Addressee Information Addressee information, delivery address information, municipality, province, and postal code must always be the bottom three lines of the address block. Addressee information identifies the intended person(s), firm, or establishment to which the piece of mail is addressed. Addressee information, with multiple lines of information, may include the following elements in the listed order: • Name or in-care-of information • Title • Department or division name • Company or establishment name The above order also applies for Large Volume Receivers (LVRs) and government departments or agencies. For departments with branches, branch names appear above the department name.

Delivery Address Information—Civic Address Civic addressing generally applies to customers who receive door-to-door delivery or who receive their mail at a community mail box or “superbox.” Unless otherwise noted, address components and elements on the same line should be separated from each other by one space. Civic addresses may include the following elements: • Civic Number - The official number that has been assigned to that address by the municipality • Civic Number Suffix - A character or fraction appearing after the civic number that must be included in the address, such as 11D JESSOME ST, or 91 1/2 KING ST • Street Name -The official street name as it is recognized by the municipality, with no translation. If the street name is a number followed by an ordinal such as “ST”, “ND”, “TH”, or “E”, as in “1ST”, “2ND”, “3RD”, “4TH” or “1E”, “2E,” there will be no space between the number and the ordinal. If the street name is alphanumeric, there will be no space between the numeric and the alpha portion (14B ST instead of 14 B ST). • Street Type - When an address is presented in English, the street type always follows the street name. When an address is presented in French, the street type appears before the street name (RUE RENE-LEVESQUE) unless the street name is an ordinal. In this case, the street type follows the street name (2061 36E RUE). The street type is always identified by CPC symbols. • Street Direction - Where required, it should be identified by a one- or two-character symbol (such as N, S, NE, NW, O, NO) and located as the last element of street information • Unit Designator - The unit designator identifies the specific unit as assigned by the building. The value can be alpha, alphanumeric, or numeric. Where the unit identifier is a number, it is presented in numeric format (“2” instead of the word “two”). If the unit designator is not used in the address, the unit designator is placed before the street information separated by a hyphen (317-10228 148 ST). Valid examples for placement of the unit designator include: 1 MAIN ST APT 1 or APT 1 1 MAIN ST or 1-1 MAIN ST.

Delivery Address Information - Non-Civic Address Non-civic addresses are used when the service provided to a customer is a lock box, general delivery, or route service where civic address information is not available.

Mode of Delivery Information Mode of delivery information is placed on the same line as delivery installation information. Mode of delivery information may consist of the following elements: • Mode of Delivery Designator - The official CPC symbol for Postal Box (PO BOX), Rural Route (RR), Suburban Service (SS), Mobile Route (MR), or General Delivery (GD).

Release 3.4.0 17 User Guide - IBM® i Canadian Addressing Guidelines

• Mode of Delivery Identifier - Numeric identifier separated from the mode of delivery designator by one space. Do not use the number sign (#) or the French abbreviation (nº) before the mode of delivery identifier (PO BOX 123, not PO BOX #123).

Delivery Installation Information In areas where there is more than one delivery facility in the municipality, delivery installation information is used with mode of delivery to identify the specific facility servicing the delivery address. When delivery information is required, it is placed after the mode of delivery information, separated by one space. Delivery installation information may consist of these elements: • Delivery Installation Area Name -The area name identifies the general location of the delivery installation and is usually a village, town, community, municipality, or metropolitan area. The delivery installation area name is not required if it is the same as the municipality name.

Use Do Not Use

PO BOX 59 PO BOX 59 BELL ISLAND FRONT BELL ISLAND FRON NF A0A 1H0 BELL ISLAND FRONT NF A0A 1H0

• Delivery Installation Type and Qualifier - The type and qualifier identify the specific delivery installation in urban areas where there is more than one installation (for example, in the delivery address GD SCARBOROUGH STN LCD WEST HILL, the delivery installation area name is SCARBOROUGH, the delivery installation type is STN, and the delivery installation qualifier is LCD WEST HILL).

Municipality Municipality refers to a municipality, town, village, community, or directory area name recognized as a valid mailing destination. The municipality is the first component of the last line of the Canadian address and is required for all address types.

Province The province component is required for all address types. It is the second component of the last line of a Canadian address. It should appear on the same line as the municipality, separated from it by a single space. The province should be identified by the international two-character symbol as listed on “Canadian Postal Code System,” on page 14 of this chapter.

Postal Code The postal code component is required for all address types and is made up of six alphanumeric characters arranged in two sets of three. The first set of three (letter, number, letter) is known as the Forward Sortation Area (FSA). The second set of three characters (number, letter, number) is known as the Local Delivery Unit (LDU). The format of the postal code is always A9A 9A9, where A is a letter and 9 is a number. There should always be one space between the first three and the last three characters of the postal code. The postal code should appear on the same line as the municipality and the province and is separated from the province by at least two spaces.

Country The country name is used only on mail pieces delivered outside Canada. The official English or French language spelling for the country name will appear alone on the last line of the address block for a foreign address. Mail originating in other countries for delivery in Canada will have CANADA appear alone on the last line of the address block.

Release 3.4.0 18 User Guide - IBM® i Chapter 1: Canadian CODE-1 Plus™ Concepts Software Evaluation and Recognition Program (SERP) Software Evaluation and Recognition Program (SERP)

This section briefly explains what the Software Evaluation and Recognition Program (SERP) is and provides examples of the evaluation process based on SERP rules for correction and validation. These actual examples provide a step-by-step analysis with explanations and an evaluation of the results.

What Is SERP? SERP is Canada Post’s acronym for Software Evaluation and Recognition Program, an independent body that is responsible for testing and recognizing software packages that meet or exceed stated standards for address correction and validation. It is important to you, the user, because Canada Post accepts the Address Accuracy Statement only from software packages that have been SERP- recognized.

CPC created SERP to evaluate address correction/validation computer software packages, recognize those programs meeting CPC addressing requirements, and make available a list of officially recognized software Packages. SERP provides CPC customers with the support and tools they need to prepare mail to take advantage of incentive rates according to CPC criteria.

How Does the Process Work? The evaluation and recognition process consists of three steps:

1. Self-Test - This step allows the software vendor to determine the readiness of the software package by testing the software package with a SERP-provided test file of addresses and comparing the results with a SERP-provided Expected Results File.

2. Formal Test - This step allows the software vendor to submit the software package to SERP. SERP tests the software by running a test file of addresses to generate Formal Test Vendor Results. Prior to testing, the vendor signs a Recognition Agreement and a Subscription and License Agreement with CPC. 3. Evaluation - SERP evaluates the test results, determines the performance level of the software package, and provides the vendor with detailed results. If the performance level of the software package meets SERP evaluation requirements, it is added to the list of Officially Recognized Software Packages and recognized for one year.

The software packages must either simply validate an address or validate and correct an address. Address validation requires the software package to properly categorize addresses as either valid or invalid in 98% of the cases. An address is considered valid if it is complete and correct when compared to the CPC Postal Code Data Files. Address validation and correction takes invalid addresses further and attempts to correct the “correctable” address (addresses that result in only one given address, based on the provided information), and to reject those that are deemed “non-correctable” (addresses that could result in more than one address, based on the provided information). When the software attempts to correct correctable addresses, SERP requires it to be successful in 75% of the cases.

Release 3.4.0 19 User Guide - IBM® i Software Evaluation and Recognition Program (SERP) The CPC Postal Code Data Files Canada Post Corporation maintains the CPC Postal Code Data Files. These files assign a postal code to every address in Canada. The information needed to validate or correct address lists is contained in these data files. The CPC Postal Code Data Files include the following four files: • Address Lookup File • Municipality Cross-Reference File • Street Cross-Reference File • Building, Large Volume Receiver (LVR), and Government Names File During the validation and correction procedures, every address in your address file is matched against the data in the CPC Postal Code Data Files. If your address matches an address or address range in the Postal Code Data Files (by meeting the minimum match criteria), then the address in your address file is returned as “valid”; otherwise, the address is “invalid.” Addressing quality — the content, not just the readability — is essential to reduce instances of undeliverable or misdirected mail and to avoid delivery delays.

What Is a “Valid” Address? Canada Post defines a mailing address as the information required to identify a point of call and/or delivery point. CPC has regulations that define a “valid” address: • The address must contain all required components as found in the CPC Postal Code Data Files. • The address must provide an exact match on all components for only one address in the CPC Postal Code Data Files, allowing for acceptable alternate words and names listed in the CPC Postal Code Data Files. • Address components must be presented in a form that allows them to be identifiable without ambiguity. Certain components may require key words or “qualifiers” to identify them. For instance, a Route Service address requires the key words “Rural Route” or “RR” for differentiation from a “Suburban Service” or “SS” address with the same number. There are exceptions to this definition. For further information, you should contact your local CPC representative.

What Is an Invalid Address? An invalid address is one that does not meet CPC requirements for a valid address. Examples of this include address components that are missing, invalid, or inconsistent.

Release 3.4.0 20 User Guide - IBM® i Getting Started with 2 Canadian CODE-1 Plus™

In this chapter

 Overview ...... 22  Preparing Your Job ...... 22  Steps in a Canadian CODE-1 Plus Job...... 22  Defining Jobs with Parameters...... 23  Work with Jobs Screen (C6CPMM03) - Views 1 and 2 ...... 28  Define/Submit Canadian CODE-1 Plus Job Screen (C6CPDS01) 31  Create New Job Screen (C6CPNJ01) ...... 33  Copy Jobs Screen (C6CPCJ03) ...... 35  Rename Jobs Screen (C6CPRJ03) ...... 36  Confirm Delete of Job Definition Screen (C6CPMM06) ...... 37  Saving Job Definitions - Screen (C6CPOP10) ...... 38 Preparing Your Job Overview

The administrative screens are screens that are not specific to one of the five components of Canadian CODE-1 Plus. They allow you to perform job management functions on your jobs, add previously-created data to a newly-created job, and save your job data to external files.

Preparing Your Job

Before you can run a Canadian CODE-1 Plus job, you need to define the locations and formats of the postal code in your input name/address file. To provide Canadian CODE-1 Plus with complete and accurate instructions, you must be familiar with the following: • Your input name/address file layout and job requirements • Your control language

Knowing Your File Descriptions Canadian CODE-1 Plus requires you to define the following input file details: • If the records on the files are fixed- or variable-length • The length of the records (maximum length for non-fixed length files)

Knowing Your Input File Format

 HINT: Sort your input name/ address file into postal code order to save processing time and reduce work file size.

When Canadian CODE-1 Plus reads your input file, it needs to know where it can find essential information on each record. This information includes the address elements and postal code. Canadian CODE-1 Plus requires that you specify the starting positions of these fields, so it does not matter where the information is located, as long as you tell Canadian CODE-1 Plus where to find it. For Canadian CODE-1 Plus to read your input file, it must be in the form of a sequential file. For certain platforms, Canadian CODE-1 Plus allows you to define the label and record types, the number of records in a block, and the length of the records in your input and output files. You can change the layout of the output file by specifying what you have on the input name/address file and what you want on the output file. Your file layout (input and output files) and job requirements are translated into parameters. The parameters describe your processing needs to Canadian CODE-1 Plus.

Steps in a Canadian CODE-1 Plus Job

Canadian CODE-1 Plus for the IBM® i platform builds parameter files through the options you specify in the character-based interface (CHUI).

 Press F1 from any screen to view parameter-level help.

Using the CHUI screens, you define the following job functions: • Defaults for Print Output (PX) – defines the headers, footers and formatting for all reports

Release 3.4.0 22 User Guide - IBM® i Chapter 2: Getting Started with Canadian CODE-1 Plus™ Defining Jobs with Parameters

• Reformat Input Record (MI) - also known as MOVE I, allows you to rearrange input fields to preserve original input prior to processing • Name/Address File Layout (ID) – describes the content and format of your input records. For example, use this step to define the position of the postal code field • Name/Address Record Posting (OD) – allows you to define the layout of your output records by specifying the location of mailing data in the record • Reformat Output Record (MO) – also known as MOVE O, allows you to rearrange output record components before writing records to the output files • Report Selection (RP) – allows you to print selected reports for each job (some reports are required by Canada Post Corporation) You can access all of the system components through the Define/Submit a Canadian CODE-1 Plus Job screen.

Canadian CODE-1 Plus C6CPDS00 C6CPDS01 Job MYJOB Define/Submit Canadian CODE-1 Plus Job

Type options, press Enter. 2=Edit 6=Create ------Last Activity ------Opt Function Date Time User PX Defaults for Print Output 1/23/YYYY HH:MM:SS PBUSER MI Reformat Input Record 1/23/YYYY HH:MM:SS PBUSER ID Name/Address File Layout 1/23/YYYY HH:MM:SS PBUSER OD Name/Address Record Posting 1/23/YYYY HH:MM:SS PBUSER MO Reformat Output Record 1/23/YYYY HH:MM:SS PBUSER RP Report Selection 1/23/YYYY HH:MM:SS PBUSER SB Submit Batch Job 1/23/YYYY HH:MM:SS PBUSER

F3=Exit F12=PrevScrn

Defining Jobs with Parameters

Job parameters and processing requirements are established through parameters. Parameters contain the “switches” and commands that allow you to: • Define the processing requirements • Extract statistics • Perform mailing sequence sort • Update name/address records • Format and print reports

On the IBM® i platform, the character-based UI allows you to define job processing requirements by generating parameters “behind the scenes.” Each time you press F6 to save a screen definition, Canadian CODE-1 Plus builds the appropriate parameter lines, storing them in the correct parameter files.

Release 3.4.0 23 User Guide - IBM® i Defining Jobs with Parameters

Certain parameters are required, while others are optional, depending on the nature of your mailing. See chapter 1 of the Canadian CODE-1 Plus Reference Guide (for all platforms) for a detailed reference of all parameters, including whether each is optional or required.

Defining Canadian CODE-1 Plus Reports

 More information about the Canadian CODE-1 Plus reports appears in Chapter 5 of this user’s guide.

• Define your Canadian CODE-1 Plus reports using the Defaults for Print Output and Report Selection screens. • Use the Defaults for Print Output Screens to define global report formatting options such as the number of lines to print on a page, header lines, and footer lines. • Use the Report Selection Screen (C6CPRP10), to select the following optional reports for batch jobs: • Analysis of Matched Records • Processing Summary by Province • Processing Summary by List Code • Processing Summary by FSA • Return Code Analysis Report — Correctable • Return Code Analysis Report — Valid

Canadian CODE-1 Plus C6CPRP00 Replace with screen heading desired C6CPRP10 Job MYJOB Report Selection Rls [REPORT] Specify the desired reports for printing: Analysis of Matched Records...... Y

Processing Summary by Province . . . . . Y

Summary by List Code. . . . . N Report Order F = Frequency Summary by FSA ...... N C = Code

Analysis Report Correctable...... N Analysis Report Correctable Sequence . . (F or C) (Default is F) Correctable Minimum Reporting Threshold. or Analysis Report Valid...... N Analysis Report Valid Sequence . . . . . (F or C) (Default is F) Invalid Minimum Reporting Threshold. . . or Records Processed Message Threshold. . . More...

Canadian CODE-1 Plus generates these reports for all jobs: • Parameters Listing • Control Totals • Execution Log • Address-Match Execution Statistics • Statement of Accuracy

Release 3.4.0 24 User Guide - IBM® i Chapter 2: Getting Started with Canadian CODE-1 Plus™ Defining Jobs with Parameters

Using the Database Functions Canadian CODE-1 Plus provides screens that allow you to install databases and change the default database library name. These options are available through the database functions screen, which is accessed through the Work with Jobs screen by pressing F20 (Database Functions).

About Database Expiry The data used to correct and code addresses is furnished by Canada Post Corporation (CPC). These databases expire, so we suggest that you install your updates as soon as possible, to produce valid mailings that are acceptable for submitting to CPC.

Accessing the Database Functions Menu To access this screen: Press F20 from on the Work with Jobs screen. You can press F20 to access Database Functions even if you do not see the function key on your screen.

Canadian CODE-1 Plus C6CPDB00 C6CPDB01 Database Functions

Select one of the following: 1. Install Canadian CODE-1 Plus database from Media 2. Install Canadian CODE-1 Plus database from Internet Download

9. Change Default Canadian CODE-1 Plus database library P. Display encrypted administration password

Option

Installing a Canadian CODE-1 Plus Database The database functions allow you to install Canadian CODE-1 Plus databases from internet download. You can perform these functions from the Install Canadian CODE-1 Plus Database screen, which is accessed from the Database Functions menu.

Release 3.4.0 25 User Guide - IBM® i Defining Jobs with Parameters

Installing Databases from Internet Downloads To install a database installation from internet download, you must first access the Install Canadian CODE-1 Plus Database screen from the Database Functions screen. 1. Enter 2 in the Option field of the Database Functions screen to install the database from internet download. 2. Press ENTER to display the Install Canadian CODE-1 Plus Database screen:

Canadian CODE-1 Plus C6INSTDB C6INDB02 Install Canadian CODE-1 Plus Database

Specify database installation parameters:

File Name ...... G1FILE Library Name...... C6PGMS

Install to library...... G1C6FILES

If you haven't already, FTP the file you downloaded into the library/file named above.

F3=Exit F6=Confirm

3. Define the following: • File Name and Library Name - Specify the file into which you will FTP the downloaded database files. • Install to Library - Define the name of the library that will house the installed database.

At the initial display, these fields will be filled with the default file and library into which you will FTP the downloaded file and the current default database library. To load the database to a new library, type over the displayed library name. Canadian CODE-1 Plus will prompt you to verify the library name before beginning the installation process. 4. If you are satisfied with the library name, Press F6 to continue the installation of the database. Canadian CODE-1 Plus will begin copying the database files. 5. Follow the additional prompts to complete installation. When all databases are loaded, Canadian CODE-1 Plus returns to the Database Functions screen. The installation process is complete.

Changing the Default Database Library If you have several Canadian CODE-1 Plus databases, this option can be used to direct Canadian CODE-1 Plus to the database you would like to use as the default. The default database is the one Canadian CODE-1 Plus will use for all address matching, database display, and any other Canadian CODE-1 Plus database functions. To change the default Canadian CODE-1 Plus database library:

Release 3.4.0 26 User Guide - IBM® i Chapter 2: Getting Started with Canadian CODE-1 Plus™ Defining Jobs with Parameters

1. Type a 9 in the Option field of the Database Functions screen.

Canadian CODE-1 Plus C6CPDB00 C6CPDB90 Database Functions

Specify default Canadian CODE-1 Plus Database Library.

Default Canadian CODE-1 Plus Database Library: G1C6FILES

F3=Exit

2. Define a Library Name in the screen entry field. 3. Press Enter to save the new library and return to the Database Functions screen (C6CPDB01). 4. Press F3 to display the Work with Jobs screen.

Release 3.4.0 27 User Guide - IBM® i Defining Jobs with Parameters Work with Jobs Screen (C6CPMM03) - Views 1 and 2

View 1 To access this screen: Start Canadian CODE-1 Plus. This screen allows you to initiate any of the job management functions (such as creating, copying, deleting, renaming, working with, and editing jobs; releasing locked jobs; and printing the job summary). This is the first screen displayed when you access Canadian CODE-1 Plus.

Canadian CODE-1 Plus T C6CPMM00 M C6CPMM03 Work with Jobs B Type options, press Enter. 3=Copy 4=Delete 7=Rename 12=Work with 16=Submit 99=Release job lock Position to job Creation *------Last Activity ------* Work Opt JobID Date Date User Function Library @IVP@ 00/00/0000 07/28/nnnn USER1 Upd: N/A Posting G1IVP COPY 04/09/nnnn 04/13/nnnn USER1 Job Definition G1IVP COPY2 04/09/0000 04/09/nnnn USER12 Upd: Report Selectn G1IVP COPY3 04/09/nnnn 04/09/nnnn USER123 Upd: Report Selectn G1IVP COPY2 04/09/0000 04/09/nnnn USER12 Upd: Report Selectn G1IVP MYJOB 04/05/nnnn 05/27/nnnn USER123 Submit Job 0012 G1IVP

F3=Exit F5=Refresh F6=Create F11=Display Descriptions F12=Cancel F19=Reclaim space F21=Print Summary F24=More keys

Release 3.4.0 28 User Guide - IBM® i Chapter 2: Getting Started with Canadian CODE-1 Plus™ Defining Jobs with Parameters Work with Jobs Screen (C6CPMM03) View 1 - Fields

Field Name Format Description Comments

Position to job 1 to 5 The job ID to which you want the list of jobs Optional; No default alphanumeric positioned. The list will be scrolled so that the job ID characters you enter will be displayed on the screen, with the cursor positioned to that job. You may enter a partial job ID.

Opt 1 to 2 The number of the option you want to perform on a Optional; No default characters specific job (or jobs). When you press ENTER, Canadian CODE-1 Plus will perform the option you specify on the corresponding job. Enter one of the following codes: 3 Copy this job (or jobs) 4 Delete this job (or jobs) 7 Rename this job (or jobs) 12 Proceed to the Define and/or Submit a Job screen to work with this job 16 Proceed to the Submit Batch Job screen to submit this job 99 Release the lock on this job (or jobs)

NOTE: There is one Opt field for every job displayed on the Work with Jobs screen.

Work with Jobs Screen (C6CPMM03) View 1 - Function Keys

Function Key Name Description

F3 Exit Exit from Canadian CODE-1 Plus and return to the Applications menu.

F5 Refresh Restore the data to the state it was in when you accessed the screen.

F6 Create Create a new job.

F11 Display Descriptions Display the header information that was defined for each job through the Defaults for Print Output component of the system.

F12 Cancel Cancel the current operation and return to the Applications menu.

F19 Reclaim Space Perform RGZPFM (Reorganize Physical File) command on the job management files.

F21 Print Summary Print a job summary (a hard copy of the information that is displayed on the screen for each job).

F24 More keys Display the additional function keys that are not currently displayed at the bottom of the screen.

Release 3.4.0 29 User Guide - IBM® i Defining Jobs with Parameters Work with Jobs Screen (C6CPMM03) View 2 To access this screen: Press F6 from the View 1 of the Work with Jobs Screen. Specify a new Job ID in the field provided. Press enter to save, and you will see the new job ID on View 1 of the Work with Jobs Screen. Press F12 to cancel and return to View 1 of the Work with Jobs screen without creating a new job.

Canadian CODE-1 Plus T C6CPMM00 M C6CPMM03 Work with Jobs B New Job ID:

Creation *------Last Activity ------* Work Opt JobID Date Date User Function Library @IVP@ 00/00/0000 07/28/nnnn USER1 Upd: N/A Posting G1IVP COPY 04/09/nnnn 04/13/nnnn USER1 Job Definition G1IVP COPY2 04/09/0000 04/09/nnnn USER12 Upd: Report Selectn G1IVP COPY3 04/09/nnnn 04/09/nnnn USER123 Upd: Report Selectn G1IVP COPY2 04/09/0000 04/09/nnnn USER12 Upd: Report Selectn G1IVP MYJOB 04/05/nnnn 05/27/nnnn USER123 Submit Job 0012 G1IVP

F12=Cancel

Release 3.4.0 30 User Guide - IBM® i Chapter 2: Getting Started with Canadian CODE-1 Plus™ Defining Jobs with Parameters Define/Submit Canadian CODE-1 Plus Job Screen (C6CPDS01)

To access this screen: Select any job on the Work with Jobs screen. This screen allows you to access any of the components of the system.

Canadian CODE-1 Plus C6CPMM00 C6CPDS01 Job COPY Define/Submit Canadian CODE-1 Plus Job

Type options, press Enter. 2=Edit 6=Create ------Last Activity ------Opt Function Date Time User PX Defaults for Print Output 04/09/nnnn 15:08:52 USER1 MI Reformat Input Record 04/13/nnnn 11:20:13 USER1 ID Name/Address File Layout 04/09/nnnn 15:08:52 ZA003ME OD Name/Address Record Posting 04/09/nnnn 15:08:52 ZA003ME MO Reformat Output Record 04/13/nnnn 11:21:39 ZA003ME RP Report Selection 04/09/nnnn 15:08:53 ZA003ME SB Submit Batch Job

F3=Exit F12=PrevScrn

Define/Submit Canadian CODE-1 Plus Job Screen (C6CPDS01) - Fields

Field Name Format Description Comments

Opt 1 character The number of the option you want to perform on a Optional; No default specific component. When you press ENTER, Canadian CODE-1 Plus will perform the option you specify on the corresponding function. Enter one of the following numbers: 2 Edit the information that already exists for this component of this job (if no information has been previously defined, you will be presented with blank or default fields). 6 Enter new data for this component of the job.

NOTE: There is one Opt field for each of the five components. If you enter an option for more than one component, they will be processed in the order in which they appear on the screen.

Release 3.4.0 31 User Guide - IBM® i Defining Jobs with Parameters Define/Submit Canadian CODE-1 Plus Job Screen (C6CPDS01) - Function Keys

Function Key Name Description

F3 Exit Exit from the Define and/or Submit a Job screen and return to the Work with Jobs screen (C6CPMM03).

F12 PrevScrn Return to the screen you were on when you accessed the Define and/or Submit a Batch Job screen.

Release 3.4.0 32 User Guide - IBM® i Chapter 2: Getting Started with Canadian CODE-1 Plus™ Defining Jobs with Parameters Create New Job Screen (C6CPNJ01)

To access this screen: - Press F6 from the Work with Jobs screen to display the Create New Job Screen (C6CPNJ01). On Screen C6CPMM03, specify a New Job ID, then press Enter to display this screen. The Create New Job screen defines the storage location for new job data. Use this screen with the Work with Jobs Screen (C6CPMM03) - Views 1 and 2 to define new jobs.

Canadian CODE-1 Plus C6CPNJ00 C6CPNJ01 Job MYJOB Create New Job

Specify library to hold job objects: Library for Job objects ......

Provide job details as required: Exit Routine Input N/A file ...... Library...... or Member ...... *FIRST Job description...... QDFTJOBD Library...... QGPL

More...

F3=Exit F6=Create job

Create New Job Screen (C6CPNJ01) - Fields

Field Name Format Description Comments

Library for job objects 1 to 10 characters (A-Z, 0-9, Library for objects that make up Required. No $, @, _, or #). First this job. default. Cannot character must not be 0-9 be a production or _. library.

Input N/A file 1 to 10 characters (A-Z, 0-9, File containing your input name/ Required. No $, @, _, or #). First address file. (You will be given default character must not be 0-9 the option of changing this file or _. name when you go to submit the job.)

Library (Input N/A file) 1 to 10 characters (A-Z, 0-9, Library containing the input Required. No $, @, _, or #). First name/address file. default character must not be 0-9 or _.

Member 1 to 10 characters (A-Z, 0-9, Member of the file containing Required. Default $, @, _, or #). First your input names and is *FIRST. character must not be 0-9 addresses. Enter the member or _. name of the file used.

Release 3.4.0 33 User Guide - IBM® i Defining Jobs with Parameters

Field Name Format Description Comments

Job description 1 to 10 characters (A-Z, 0-9, System- or user-defined Required. Default $, @, _, or #). First description that describes how is your user character must not be 0-9 your system should process this profile's default or _. job. job description.

Library (Job description) 1 to 10 characters (A-Z, 0-9, Name of the library containing Required. Default $, @, _, or #). First the job description named above. is your user character must not be 0-9 profile's default or _. job description library.

Create New Job Screen (C6CPNJ01) - Function Keys

Function Key Name Description

F3 Exit Exit from the Create New Job screen and return to the Work with Jobs screen (C6CPMM03) without creating the new job.

F6 Create Job Create the job using the details provided on the screen.

Release 3.4.0 34 User Guide - IBM® i Chapter 2: Getting Started with Canadian CODE-1 Plus™ Defining Jobs with Parameters Copy Jobs Screen (C6CPCJ03)

To access this screen: To access this screen, enter a 3 in the Opt field next to one or more jobs on the Work with Jobs screen, and press ENTER. Enter your new job name by typing over the content of the New JobID field. The Copy Jobs screen duplicates existing jobs, copying their job details so you do not have to create a new job.

Canadian CODE-1 Plus T C6CPCJ00 M C6CPCJ03 Copy Jobs B Specify the work library to receive the copied jobs. Library for Job objects ...... G1IVP Specify a new Job ID for each job to be copied; press Enter. JobID Description (heading for Print Output) New JobID MYJOB IVP TEST JOB MYJOB

F12=Cancel

Copy Jobs Screen (C6CPCJ03) Fields

Field Name Format Description Comments

Library for job objects 1 to 10 characters (A-Z, Library that will contain the objects Required. No 0-9, @ $, _, or #). First that make up the new job or jobs. default character must not be 0-9 or _. NOTE: If you are copying more than one job, all jobs will be stored in this library.

New JobID 1 to 5 characters (A-Z, 0- Job ID you want to assign to the Required. No 9, $, @, _, or #). new job. default. This job ID must not already NOTE: You must enter a new job exist. ID for each of the jobs you are copying.

Release 3.4.0 35 User Guide - IBM® i Rename Jobs Screen (C6CPRJ03) Rename Jobs Screen (C6CPRJ03)

To access this screen: To access this screen, type a 7 in the “Opt” field next to one or more jobs on the Work with Jobs screen, and then press ENTER. Enter an updated job name by typing over the content of the New JobID field The Rename Jobs screen allows you to rename an existing job.

Canadian CODE-1 Plus T C6CPRJ00 M C6CPRJ03 Rename Jobs B Specify a new Job ID for each job to be renamed; press Enter. JobID Description (heading for Print Output) New JobID MYJOB IVP TEST JOB MYJOB

F12=Cancel

Rename Jobs Screen (C6CPRJ03) Fields

Field Name Format Description Comments

JobID 1 to 5 characters (A-Z, 0-9, New job ID Required. No default $, @, _, or #) NOTE: You must enter a new job ID for each of the jobs you are renaming.

Release 3.4.0 36 User Guide - IBM® i Chapter 2: Getting Started with Canadian CODE-1 Plus™ Rename Jobs Screen (C6CPRJ03) Confirm Delete of Job Definition Screen (C6CPMM06)

To access this screen: Press Enter to delete the job or press F12 to return to the Work with Jobs screen. The Confirm Delete of Job Definition screen confirms that you want to delete selected jobs on the Work with Jobs screen. This screen contains display fields only: no fields can be changed.

Canadian CODE-1 Plus T C6CPMM00 M C6CPMM06 Confirm Delete of Job Definition B

Press Enter to confirm your choices for Delete. Press F12=PrevScrn to return to change your choices. Creation *------Last Activity ------* Work JobID Date Date User Function Library MYJOB 11/23/YYYY 11/23/YYYY PBUSER Upd: Report Selectn PBIVP

F12=PrevScrn

Release 3.4.0 37 User Guide - IBM® i Saving Job Definitions - Screen (C6CPOP10) Saving Job Definitions - Screen (C6CPOP10)

To access this screen: After defining any processing definitions, press F6 to update your definitions. Canadian CODE-1 Plus displays screen C6CPOP10. This screen allows you to optionally save the data from your job to an external file so that it may be used in other jobs.

 The last line of the screen heading shows the name of the component from which it was accessed (in this example, the Name/Address Record Posting component).

Canadian CODE-1 Plus C6CPOP00 C6CPOP10 Job MYJOB Name/Address Record Posting

The information you provided has been saved for this Job. If you wish to save it also in an external file for future use by other Jobs, enter the appropriate File, Library and Member names below and press F6. If you do not wish to save this information in any other place, press F12.

External File . . . . Library ...... Member......

F6=Save F12=Cancel

To bypass the “save to external file” option, press F12 to return to the Work with Jobs screen.

Saving Job Definitions Screen (C6CPOP10) Fields

Field Name Format Description Comments

External File 1 to 10 characters (A-Z, 0-9, External file to which to save the Required. No default $, @, or #). First character data. This file must already exist on must not be 0-9. your system.

Library 1 to 10 characters (A-Z, 0-9, Library containing the external file Required. No default $, @, or #). First character must not be 0-9.

Member 1 to 10 characters (A-Z, 0-9, Member of the external file to Required. No default $, @, or #). First character contain the data must not be 0-9.

Release 3.4.0 38 User Guide - IBM® i Chapter 2: Getting Started with Canadian CODE-1 Plus™ Saving Job Definitions - Screen (C6CPOP10) Saving Job Definitions - Screen (C6CPOP10) - Function Keys

Function Key Name Description

F6 Save Save the data to the external file specified on the screen and return to the Define and/or Submit a Job screen (C6CPDS01).

F12 Cancel Cancel the operation without saving your data to an external file, and return to the Define and/or Submit a Job screen (C6CPDS01).

Release 3.4.0 39 User Guide - IBM® i Saving Job Definitions - Screen (C6CPOP10)

Release 3.4.0 40 User Guide - IBM® i Defining Input 3

In this chapter

 Overview ...... 42  Address Locations Screen (C6CPID10) ...... 42  Postal Code Locations Screen (CPCID11) ...... 45  Additional Input File Information Screen (C6CPID12) ...... 48  Confirmation Options Screen (C6CPID13)...... 50  Additional Input File Information Screen (C6CPID14) ...... 52  French Parameter Information Screen (C6CPID17) ...... 56  French Parameter Details Screen (C6CPID20)...... 57  Display Database File Field List Screen (@@CPFR04) ...... 59  Reformat Input Record Screen (C6CPMI13) ...... 60 Address Locations Screen (C6CPID10) Overview

Use the Name/Address File Layout and Reformat Input Record components to define and arrange the content of your input data.

• The Name/Address File Layout component allows you to define the contents of your input files, including: • Address • Municipality, province, and postal code • Large Volume Receiver names • List codes • Confirmation flags • Access the input file layout component starting with the Address Locations Screen (C6CPID10). Once you define your input fields, you can review your definitions using the Display Database File Field List screen (@@CPFR04). • The Reformat Input Record component (Reformat Input Record Screen (C6CPMI13)) allows you to rearrange the components of your input records before those records are processed.

Address Locations Screen (C6CPID10)

To access this screen: Select Name/Address File Layout from the Define/Submit Canadian CODE-1 Plus Job screen.

This screen allows you to define input address information for additional processing, such as MOVE or exit routine processing. This screen also allows you to define the name of the exit routine that is to be called to retrieve the input address for the input record.

Canadian CODE-1 Plus C6CPOD00 C6CPOD10 Name/Address File Layout Address Locations [ADDRDF] Specify input Address location: Position Len Location method ...... L 32 40

M = Move street address from single field F = Format (string) multiple fields together L = Locate address in multiple address lines E = Use Exit routine to retrieve address record Exit Routine ......

More... F3=Exit F6=Update 24=Field Search

Release 3.4.0 42 User Guide - IBM® i Chapter 3: Defining Input Address Locations Screen (C6CPID10)

Defining Your Input Address You will have to specify the location, length, and format of the addresses in the input records. You will indicate that the input address is stored in one of the following formats: • The address is contained in a single field in the input records. • The address is contained in multiple fields (up to 6). • The address is contained in multiple lines (up to 6). • The address will be retrieved from the exit routine. In this context, the term field means any continuous series of characters in the input file. You can define a field to start at any position in the input file, and extend fields for any length you choose. For example, you could specify that positions 100-140 in the input file make up one field.

A line is also a continuous series of characters in the input file. The difference is that Canadian CODE-1 Plus assumes that a line contains all of the information that would appear on one line of an address label.

After you have specified the format of the input address, you will have to specify the location and length of each input address field or line.

 If you specify that your input address is in lines, you should define the lines in the order in which they would appear on a mailing label. Canadian CODE-1 Plus will treat the last line you define (that actually contains data) as the primary address line.

Address Locations Screen (C6CPID10) - Fields

Field Name Format Description Comments

Location Method 1 character One-character code indicating the method that Required. No (Street Address) Canadian CODE-1 Plus should use to locate the default street address in your input records. Enter one of the following codes: M The street address is in a single field. (You must enter a single position and length.) F The street address is in 2 to 6 fields that must be strung together. You must enter 2 to 6 positions and lengths. L The street address is in 1 to 6 lines. You must enter 1 to 6 positions and lengths. E An exit routine will be called to retrieve the address.

Position (Street 1 to 4 digits Starting position of the input street address field or Required. No Address) line. You will enter between 1 and 6 positions, default depending on the Location Method you entered.

Len[gth] (Street 1 to 2 digits Length of the input street address field or line. You Required. No Address) will enter one Len. for each Position you entered. default

Exit Routine 1 to 8 characters Name of the exit routine that retrieves the address Required if “E” is from the input records. entered as the location method.

Release 3.4.0 43 User Guide - IBM® i Address Locations Screen (C6CPID10) Address Locations Screen (C6CPID10) - Function Keys

Function Key Name Description

F3 Exit Exit from the Name/Address File Layout components, without saving the data.

F6 Update Save the data and exit from the Name/Address File Layout component.

F24 Field Search Go to the Display Database File Field List screen (@@CPFR04).

Release 3.4.0 44 User Guide - IBM® i Chapter 3: Defining Input Postal Code Locations Screen (CPCID11) Postal Code Locations Screen (CPCID11)

To access this screen: Page down from the Address Locations Screen (C6CPID10). The Postal Locations screen allows you to specify the locations, lengths, and formats of your input postal codes. You can also define an exit routine to perform additional processing of this information.

Canadian CODE-1 Plus C6CPID00 C6CPID11 Job MYJOB Name/Address File Layout Postal Code Locations [CP PCD] Specify input City/Province/Postal Code location: Position Len Location Method ...... S City or City/Prov: 172 30 Separate Province: 202 25 A = City/Province and Postal Code in above multiple lines C = City/Province in above multiple lines, separate Postal Code M = City/Province in single field, Postal Code in another S = City, Province, and Postal Code in separate fields X = City/Province and Postal Code in a single field E = Use Exit routine to retrieve city and province

Exit Routine ...... Postal Code Position. . . 257 Format . . C C or 7 More... F3=Exit F6=Update F24=Field Search

Defining Your Input Municipality, Province, and Postal Code You must specify the location, length, and format of the municipality, province, and postal code in the input record. You will indicate that the input municipality, province, and postal code are stored in one of the following formats: • The municipality, province, and postal code are somewhere in the lines you defined for the input address. • The municipality and province are somewhere in the lines you defined for the input address, but the postal code is in a separate field. • The municipality and province are together in a single field (different from the address fields or lines), and the postal code is in a separate field. • The municipality, province, and postal code are all stored in separate field, different from the address fields or lines. • The municipality, province, and postal code are stored together in a single field, different from the address fields or lines. • The municipality, province, and postal code will be retrieved from the exit routine. After you have specified the format of the input municipality, province, and postal code, you will have to specify the location and length of each input municipality, province and postal code field (unless they are the same as the input address lines).

Release 3.4.0 45 User Guide - IBM® i Postal Code Locations Screen (CPCID11) Postal Code Locations Screen (CPCID11) - Fields

Field Name Format Description Comments

Location (City/ 1 character One-character code indicating the method that Required. No Province/Postal Canadian CODE-1 Plus should use to locate default Code) the city, province, and postal code in your input records. Enter one of the following codes: A The city, province, and postal code are somewhere in the lines you defined above for your street address. C The city and province are somewhere in the lines you defined for the street address, and the postal code is in a separate field. M The city and province are together in one field (different from the street address fields or lines), and the postal code is in a separate field. S The city, province, and postal code are all in separate fields. X The city, province, and postal code are together in a single field. E City and province to be retrieved by exit routine; postal code separate.

City or City/Prov 1 to 4 digits Starting position in the input record of the city, Required if you Position the city and province, or the city and province entered M, S, or X and postal code (depending on the Location as the Location Method you entered above). Method. No default

City or City/Prov 1 to 2 digits Length of the input city, city and province, or city Required if you Len[gth] and province and postal code entered a City or City/Prov Position. No default

Separate Province 1 to 4 digits Starting position of the field in the input record Required if you Position that contains the separate province entered S as the Location Method. No default

Separate Province 1 to 2 digits Length of the input province name field Required if you Len[gth] entered a Separate Province Position. No default

Exit Routine 1 to 8 characters Name of the exit routine that processes the Required if E is input city and province information entered as the location method.

Postal Code Position 1 to 4 digits Starting position of the input postal code Optional; No default

Postal Code Fmt. 1 character Format of the input postal code: Required if you C The postal code is in the format entered C, M, or S A9A9A9 (with no spaces). as the location. No default 7 The postal code is in the format A9A 9A9 (with a space between the FSA and the LDU).

Release 3.4.0 46 User Guide - IBM® i Chapter 3: Defining Input Postal Code Locations Screen (CPCID11)

Postal Code Locations Screen (CPCID11) - Function Keys

Function Key Name Description

F3 Exit Exit from the Name/Address File Layout components, without saving the data.

F6 Update Save the data and exit from the Name/Address File Layout component.

F24 Field Search Go to the Display Database File Field List screen (@@CPFR04).

Release 3.4.0 47 User Guide - IBM® i Additional Input File Information Screen (C6CPID12) Additional Input File Information Screen (C6CPID12)

To access this screen: Page down from the Postal Code Locations Screen (CPCID11). The Additional Input File Information screen allows you to define the location and length of your postal code, list code, and country name.

Defining Your Input List Code If your input records contain list codes, you will want to define the location and length of the list code in the input record. The term list code comes from the practice of merging several mailing lists together, using a code embedded in the records to identify the source list of each record. You can designate any field of nine bytes or less in the input records. Canadian CODE-1 Plus has a report that lists information about your job, sorted by these list codes. For example, you could designate the bytes that contain the last names of the addressees in your records as a list code. Canadian CODE-1 Plus would then sort the Processing Summary by List Code Report by the addressees’ last names. The most common use of the input list code is still to identify which original list the records came from. You can then use the Processing Summary by List Code Report to analyze the quality of the addresses on each of your original mailing lists.

Canadian CODE-1 Plus C6CPID00 C6CPID12 Job MYJOB Name/Address File Layout Additional Input File Information [CP PCD] Specify storage of original Postal Code, if desired: Position Len Location to store extracted Postal Code ...... 257 6

[L CODE] Specify input file List Code location, if desired: List Code location and length in N/A record ...... 1 4

[CP PCD] Specify input file Country Name location if desired: Country name location and length......

More... F3=Exit F6=Update F24=Field Search

Additional Input File Information Screen (C6CPID12) - Fields

Field Name Format Description Comments

Position (Original 1 to 4 digits Input record location in which the extracted Optional; No default Postal Code) postal code is stored

Len (Original Postal 1 to 2 digits Input postal code length Required if you Code) enter a Position for Original Postal Code

Release 3.4.0 48 User Guide - IBM® i Chapter 3: Defining Input Additional Input File Information Screen (C6CPID12)

Field Name Format Description Comments

Position (List Code) 1 to 4 digits Starting position of the input list code Optional; No default

Len (List Code) 1 to 2 digits Length of the input list code Required if you enter a Position for List Code

Position (Country 1 to 4 digits Starting position of the input country name Optional; No default Name)

Len (Country name) 1 to 2 digits Length of the input country name Required if you enter a Position for Country Name

Additional Input File Information Screen (C6CPID12) - Function Keys

Function Key Name Description

F3 Exit Exit from the Name/Address File Layout component, without saving the data.

F6 Update Save the data and exit from the Name/Address File Layout component.

F24 Field Search Go to the Display Database File Field List screen (@@CPFR04).

Release 3.4.0 49 User Guide - IBM® i Additional Input File Information Screen (C6CPID12) Confirmation Options Screen (C6CPID13)

To access this screen: Page down from the Additional Input File Information Screen (C6CPID12). The Confirmation Options screen provides the option to specify that records containing special “confirmation flag values” should be confirmed without going through the matching process. Using confirmation flags in your records allows you to automatically confirm records you know are correct, even though Canadian CODE-1 Plus does not match them. These records will be automatically written to the C6BMCOK output file. (These records do not contribute to the accuracy level of the name/address file.)

Canadian CODE-1 Plus C6CPID00 C6CPID13 Job MYJOB Name/Address File Layout Confirmation Options [CONFRM] Specify input file confirmation mark location and values, if desired: Confirmation mark location/length in N/A record . 1 6 Comparison Type Values EQ EQ any value A blank field is accepted in the NE all value first position but is treated as a terminator otherwise.

Specify location for confirmation return code, if desired: Location for confirmation return code ...... 1

More... F3=Exit F6=Update F24=Field Search

Confirming Records Without Processing To use confirmation flags in your records, you will define the following information to Canadian CODE-1 Plus: • Location in the output record for a code indicating whether the record was confirmed without processing, and if so, why • Location and length of the confirmation flag in the input records • Code indicating whether the confirmation flag must be equal to or not equal to values you specify on this parameter • Up to four values to be compared to the confirmation flag in the records. As an example, let’s look at an insurance agency that wants to mail solicitations to new homeowners. This agency has a standard mailing list, and has also bought lists of addresses from several builders that have just finished new housing developments. Because the streets in these new developments are so new, they have not yet been put on the CPC database. The insurance agency will merge these new lists with its standard mailing list, but will first insert confirmation flags in the records on the builders’ lists. In their Canadian CODE-1 Plus job, they will include these confirmation flags to have the records confirmed, even though the addresses are not on the Canadian CODE-1 Plus database.

Release 3.4.0 50 User Guide - IBM® i Chapter 3: Defining Input Additional Input File Information Screen (C6CPID12)

You may specify up to four confirmation values to which the confirmation flag in the input records will be compared. If a string of blank spaces is one of the confirmation values, it must be the first value.

Confirmation Options Screen (C6CPID13) - Fields

Field Name Format Description Comments

Confirmation Mark 1 to 4 digits Starting position of the input confirmation flag Optional; No Location (or mark) default

Confirmation Mark 1 digit Length of the input confirmation flag Required if you Length entered a Confirmation Mark Location. No default

Comparison Type 2 characters Two-character code defining comparison value Optional; No processing: default EQ If the confirmation mark in the record is equal to any of the values on this screen, the record is automatically confirmed. NE If the confirmation mark in the record is not equal to all of the values on this screen, the records are automatically confirmed.

Values 1 to 9 characters Value to compare to the confirmation mark in Optional; No the record, which is used to determine default automatic confirmation

NOTE: You may enter up to 4 Values. If you want one of the comparison values to be a string of blanks, you must enter the blanks as the first Value.

Location for 1 to 4 digits Starting position of the output 1-byte Optional; No confirmation return confirmation return code. One of the following default code codes will be stored in your output records: V The record was automatically confirmed. blank The record went through normal processing.

Confirmation Options Screen (C6CPID13) - Function Keys

Function Key Name Description

F3 Exit Exit from the Name/Address File Layout component, without saving the data.

F6 Update Save the data and exit from the Name/Address File Layout component.

F24 Field Search Go to the Display Database File Field List screen (@@CPFR04).

Release 3.4.0 51 User Guide - IBM® i Additional Input File Information Screen (C6CPID14) Additional Input File Information Screen (C6CPID14)

To access this screen: Page down from the Confirmation Options Screen (C6CPID13).

The Additional Input File Information screen defines details for the large volume receiver, addressee, and corrected large volume receiver.

Canadian CODE-1 Plus C6CPID00 C6CPID14 Job MYJOB Name/Address File Layout Additional Input File Information [FIRMNM] Specify input file Large Volume Receiver location: Position Len Large Volume Receiver Name location and length in N/A record. . 7 65

Specify input file Addressee location: Addressee Name location and length in N/A record......

Specify output file Corrected Large Volume Receiver Location: Corrected Large Volume Receiver Name location and length. . . .

More...

F3=Exit F6=Update F10=French Parm F24=Field Search

Defining Input Large Volume Receiver (LVR) Information If your input records contain Large Volume Receiver names, you will want to define the location and length of the name in the input record so that Canadian CODE-1 Plus can return the proper postal code.

If you define the location and length of the large volume receiver, then when Canadian CODE-1 Plus processes a record, it will compare the large volume receiver name in the input record with large volume receiver names that are associated with the matched address. Each large volume receiver name has a postal code associated with it. The postal codes associated with large volume receiver names are more specific than other postal codes. If a large volume receiver name match is found, Canadian CODE-1 Plus will assign that postal code to the record instead of the postal code that would be assigned based on the address alone. For example, let’s consider an office building at 100 Consilium Place in Toronto. The building has the postal code of M1H 3E3. There are three large volume receivers within this building that have been assigned postal codes by the CPC, as follows:

Suite LVR Name Postal Code

102 Quality Assurance Inc M1H 3G9

710 Canadian Dental Service Plans Inc M1H 3G8

800 City of Scarborough Works & Environment M1H 3E7

Release 3.4.0 52 User Guide - IBM® i Chapter 3: Defining Input Additional Input File Information Screen (C6CPID14)

Mail that is addressed to one of these suites, but does not have a large volume mailer name, will be assigned a postal code of M1H 3E3 (the building code). Mail that contains one of these large volume receiver names will be assigned the appropriate postal code for the LVR, regardless of suite number. For instance:

Input Address Postal Code

Quality Assurance Inc M1H 3G9 100 Consilium Place

100 Consilium Place, Ste 102 M1H 3E3

Quality Assurance Ltd M1H 3G9 100 Consilium Place, Ste 102

100 Consilium Place M1H 3E3

Additional Input File Information Screen (C6CPID14) - Fields

Field Name Format Description Comments

Position (Large 1 to 4 digits Starting position of the input large volume Optional; No Volume Receiver) receiver name default

Len (Large Volume 1 to 2 digits Length of the input large volume receiver name Optional; No Receiver) field default

Position (Addressee 1 to 4 digits Starting position of the input addressee name Required if you Name) field don’t enter an LVR position and length. No default

Len (Addressee 1 to 2 digits Length of the input addressee name field Required if you Name) enter a Position for Addressee Name.

Position (Corrected 1 to 4 digits Starting position of the large volume receiver Optional; No Large Volume name default Receiver)

Len 1 to 2 digits Length of the output corrected large volume Required if you (Corrected Large receiver name entered a Volume Receiver) position for Corrected Large Volume Receiver

Additional Input File Information Screen (C6CPID14) - Function Keys

Function Key Name Description

F3 Exit Exit from the Name/Address File Layout component without saving the data.

F6 Update Save the data and exit from the Name/Address File Layout component.

F10 French Parm Go to the French Parameter screen (C6CPID17).

F24 Field Search Go to the Display Database File Field List screen (@@CPFR04).

Release 3.4.0 53 User Guide - IBM® i Additional Input File Information Screen (C6CPID14) Sequence Check Screen (C6CPID15)

To access this screen: Page down from the Additional Input File Information Screen (C6CPID14). The SEQCHK screen allows you to activate sequence checking for your input file and to specify the action to take for sequence errors. You must define a sequence control field that consists of up to nine segments. The sequence check occurs immediately after a record is read, before any EXITIN routine is processed, and before any MOVE I parameters are applied.

Canadian CODE-1 Plus C6CPID00 C6CPID15 Job MYJOB Name/Address File Layout Sequence Check (SEQCHK) [SEQCHK] Specify parameter fields for Sequence Check parameter record: Error treatment option. . . . . E = End process C = Continue process B = Bypass record I = Discontinue process

Posn Len Packed Sequence field 1 ...... 123 3 Sequence field 2 ...... 123 3 Sequence field 3 ...... 123 3 Sequence field 4 ...... 123 3 Sequence field 5 ...... 123 3 Sequence field 6 ...... 123 3 Sequence field 7 ...... 123 3 Sequence field 8 ...... 123 3 Sequence field 9 ...... 123 3

Bottom F3=Exit F6=Update F24=Field Search

Display Database File Field List Screen (@@CPFR04) - Fields

Field Name Format Description Comments

Error Treatment 1 character One-character code indicating how to treat Required. No Option records with errors: default E End the process C Continue the process B Bypass the record I Discontinue the process

Posn [Sequence Field 4 digits Four-character value that indicates the location First sequence Position] of each sequence field. field position is required; all additional are optional; No default

Release 3.4.0 54 User Guide - IBM® i Chapter 3: Defining Input Additional Input File Information Screen (C6CPID14)

Field Name Format Description Comments

[Sequence Field] 4 digits Four-character value that indicates the length Required for Length of each sequence field. each segment for which you entered a value. No default

[Sequence Field] 1 digit P The segment is packed and must be Optional; Default Packed unpacked prior to use. is blank blank The segment is unpacked.

Display Database File Field List Screen (@@CPFR04) - Function Keys

Function Keys Name Description

F3 Exit Return to the Define/Submit Canadian CODE-1 Plus Job screen without submitting this job.

F6 Update Save the data and exit from the Name/Address File Layout component.

F24 Field Search Go to the Display Database File Field List screen (@@CPFR04).

Release 3.4.0 55 User Guide - IBM® i Additional Input File Information Screen (C6CPID14) French Parameter Information Screen (C6CPID17)

To access this screen: Press F10 while on the Additional Input File Information Screen (C6CPID14). Note that this screen displays the definitions that you make on screen C6CPID20.

 There are no entry fields on this screen Press F10 to define details for this parameter.

The optional FRENCH parameter allows you to enter selection criteria that, when met, force the matcher to format the output information in French. This determination uses equal to/not equal to comparisons.

Canadian CODE-1 Plus C6CPID00 C6CPID17 Job MYJOB Name/Address File Layout French Parameter Information [FRENCH] Specify French parameter Record details. French Mark Comparison Loc Len Type Value 1 Value 2 Value 3 Value 4 Value 5

Bottom F3=Exit F4=Prompt at cursor F6=Save F10=Add F11=Delete at cursor F13=Delete all F17=Top F18=Bottom

French Parameter Information Screen (C6CPID17) - Function Keys

Function Key Name Description

F3 Exit Return to the Additional Input Information File screen (C6CPID14) without submitting this job.

F4 Prompt at Cursor Position your cursor on one of the filled fields, Press F4, and go to the French Parameter Details screen to change the field content.

F6 Save Save the data and exit from the Name/Address File Layout component.

F10 Add Go to the French Parameter Details screen to enter information for this parameter (C6CPID20).

F11 Delete at cursor Position your cursor at a field and press F11 to delete the field content.

F13 Delete all Delete all French parameters.

F17 Top Go to the top of the list of details.

F18 Bottom Go to the bottom of the list of details.

Release 3.4.0 56 User Guide - IBM® i Chapter 3: Defining Input French Parameter Details Screen (C6CPID20) French Parameter Details Screen (C6CPID20)

To access this screen: Press F10 while on the French Parameter Information Screen (C6CPID17). The definitions on this screen will display in list format on screen C6CPID19. This screen allows you to define the comparisons that will create French output. The optional FRENCH parameter allows you to enter selection criteria that, when met, force the matcher to format the output information in French. This determination uses equal to/not equal to/not equal to comparisons.

Canadian CODE-1 Plus C6CPID00 C6CPID20 Job MYJOB Name/Address File Layout French Parameter Details

[FRENCH] Specify French Parameter Details: French comparison Mark, Location . . . . . 101 French comparison Mark, Length ...... 6 Comparison type...... EQ (EQ or NE) Comparison Value 1 ...... QUEBEC Comparison Value 2 ...... Comparison Value 3 ...... Comparison Value 4 ...... Comparison Value 5 ......

Bottom F5=Refresh F6=Save F12=PrevScrn

French Parameter Details Screen (C6CPID20) - Fields

Field Name Format Description Comments

French Comparison 1 to 4 digits Location of the input French comparison mark Optional; No Mark, Location default

French Comparison 1 to 2 digits Length of the French comparison mark field Required if you Mark, Length entered a location.

Comparison Type 2 characters The type of comparison to perform: Required. No EQ If the data in the input record matches default any of the values on this FRENCH parameter, consider the record French NE If the data in the input record matches none of the values on this FRENCH parameter, consider the record French.

Comparison Values 1- 9 characters Define up to 4 values to compare to the data in Required. No 4 the input Comparison Mark field default

Release 3.4.0 57 User Guide - IBM® i French Parameter Details Screen (C6CPID20) French Parameter Details Screen (C6CPID20) - Function Keys

Function Key Name Description

F5 Refresh Clear the screen of all data.

F6 Save Save the data on the C6CPID20 French Parameter Details screen.

F12 PrevScrn Return to the C6CPID17 French Parameter screen.

Release 3.4.0 58 User Guide - IBM® i Chapter 3: Defining Input French Parameter Details Screen (C6CPID20) Display Database File Field List Screen (@@CPFR04)

To access this screen: Press F24 from any of the Name/Address File Layout component screens. The screen shows you the fields defined for a file you created.

Canadian CODE-1 Plus @@CPFR00 @@CPFR04 Job MYJOB Display Database File Field List File: G1IVPC6 Library: G1IVP Field Pos Len Dc T Description SAMPLE 1 470 A

F12=PrevScrn

Display Database File Field List Screen (@@CPFR04) - Fields

Field Name Format Description Comments

File 1 to 10 Name of the file to display Optional; No default characters

Library 1 to 10 Library containing the file to display Required if you entered characters a File. No default

Field n/a Displays the field name(s) defined for the current Display field - cannot be input file changed

Pos[ition] n/a Starting position of the field(s) shown Display field - cannot be changed

Len[gth] n/a Length of the field(s) shown Display field - cannot be changed

DC n/a Decimal places: the number of digits after the Display field - cannot be decimal point changed

T n/a Type: Indicates the format of this field. In this Display field - cannot be example, the field is Alphanumeric. changed

Description n/a Description, if any of the field(s) shown Display field - cannot be changed

Release 3.4.0 59 User Guide - IBM® i French Parameter Details Screen (C6CPID20) Reformat Input Record Screen (C6CPMI13)

To access this screen: Select Reformat Input Record, using options 2 or 6, from the Define/Submit Canadian CODE-1 Plus Job screen. This screen facilitates the MOVE I (move input) feature that rearranges the components of your input records before processing. The information you identify is copied — not removed — from its original location in the input record, preserving the original content and format. This feature is useful for saving data that might be overwritten by data returned by Canadian CODE-1 Plus processing. Define up to 100 MOVE I operations (using F10/Insert) for one job. MOVE I definitions are processed in the order that they are defined, from top to bottom, so keep this in mind when defining your MOVEs.

Canadian CODE-1 Plus T C6CPMI00 Replace with screen heading desired M C6CPMI13 Job MYJOB Reformat Input Record B Rls

[MOVE I] Specify move operations to be executed in the order presented: Source Field Length Target Field Source Field may contain a location in the work area of the information to be copied, or one of the following codes:

SPC: Spaces X00: Binary zeros ZRO: Character zeros

Length must contain the length of the information to be copied.

Target Field must contain a location in the work area to copy to.

______F3=Exit F6=Update F10=Insert F24=Field Search

Reformat Input Record Screen (C6CPMI13) - Fields

Field Name Format Description Comments

Source Field 3 to 4 Define the starting location of the information to Required; No default alphanumeri copy, or define one of the following codes to copy c characters generic information to the target location: SPC Spaces X00 Binary zeros ZRO Character zeros

Length 3-digit Define the length of the information to copy to the Required; No default number target location.

Target Field 4-digit Define the location to place the copied (moved) Required; No default number information.

Release 3.4.0 60 User Guide - IBM® i Chapter 3: Defining Input French Parameter Details Screen (C6CPID20)

Reformat Input Record Screen (C6CPMI13) - Function Keys

Function Keys Name Description

F3 Exit Return to the Define/Submit Canadian CODE-1 Plus Job without saving changes.

F6 Update Save the data and exit from the Name/Address File Layout component.

F10 Insert Insert another entry field above the current (where the cursor is placed) field.

F24 Field Search Go to the Display Database File Field List screen (@@CPFR04).

Release 3.4.0 61 User Guide - IBM® i French Parameter Details Screen (C6CPID20)

Release 3.4.0 62 User Guide - IBM® i Defining Output 4

In this chapter

 Overview ...... 64  Postal Code Storage Options Screen (C6CPOD10) ...... 65  Postal Code Storage Options Screen (C6CPOD11)...... 67  Result Postal Code Screen (C6CPOD12) ...... 69  Standardized Address Storage Screen (C6CPOD16) ...... 70  Standardized Address Storage Options Screen (C6CPOD17) . . .74  Address Element Storage Screen (C6CPOD18) ...... 76  Street Address Information Format Screen (C6CPOD19) ...... 78  City and Province Storage Screen (C6CPOD20) ...... 82  City and Province Storage Options Screen (C6CPOD21)...... 86  Address Match Information Storage Screen (C6CPOD22) ...... 88  Parsed Address Information Storage Screen (C6CPOD24) . . . . .90  Reformat Output Record Screen (C6CPMO13) ...... 92 Overview

Use the Name/Address Record Posting and Reformat Output Record component to define and rearrange the content of your output data. • The Name/Address Record Posting component allows you to define the layout of your output records and storage locations and lengths (and in some cases, options) for: • Postal code • Standardized address • Individual address elements • City and province • Address match return codes • Parsed address information • Access the output record formatting and posting options starting with the Postal Code Storage Options Screen (C6CPOD10) screen. • The Reformat Output Record component (Reformat Output Record Screen (C6CPMO13)) allows you to arrange the content of your output records before writing them to the output files.

Overall Correctness Scores Canadian CODE-1 Plus assigns an overall probable correctness value to the matched record. The overall correctness takes into account not just the address, but also the firm name match. This overall correctness value grades the match by Canadian CODE-1 Plus. A probable correctness value of 9 means that the returned information has the highest probability of being correct; a probable correctness value of 0 means that the record has what Canadian CODE-1 Plus considers to be the lowest probability of being correct. However, records with a probable overall correctness value of 0 are still likely to be correct. You cannot determine whether one match is “better” than another based on the overall probable correctness codes. However, if you had 100 records with overall probable correctness codes of 9, and 100 records with overall probable overall correctness codes of 0, a greater percentage of the records in the first group would be correct. The Submit Canadian CODE-1 Plus Job screen (C6CPSB01) gives you the option of specifying a minimum acceptable overall correctness value. If you put a value in this field, then Canadian CODE- 1 Plus will store the output information for a specific record only when the record's probable overall correctness value is equal to or greater than your specified minimum value. There is no default. As an example, if you enter a minimum overall correctness value of 6 on the Standardized Address Storage Options screen, Canadian CODE-1 Plus will store standardized addresses for records with probable overall correctness values of 6 and higher, but will not store standardized addresses for records with probable correctness values lower than 6.

Disposition Indicator All of the storage options screens contain a field called the disposition indicator. A disposition indicator is a code telling Canadian CODE-1 Plus what to store in the storage location on the output record when you have specified that, under certain conditions, you do not want the returned information stored. These conditions include cases such as when multiple matches were found, probable correctness codes were too high. On each screen, you will have some or all of the following choices for what to store when you choose not to store the returned information: • Store blanks • Store nothing • Store information from the input record

Release 3.4.0 64 User Guide - IBM® i Chapter 4: Defining Output Postal Code Storage Options Screen (C6CPOD10) Postal Code Storage Options Screen (C6CPOD10)

To access this screen: Enter 6 or 2 in front of the Name/Address Record Posting option on the Define/Submit Canadian CODE-1 Plus Job screen. Use this screen to define the posting of output postal code information.

Canadian CODE-1 Plus C6CPOD00 C6CPOD10 Job MYJOB Name/Address Record Posting Postal Code Storage Options

[PC OUT] Specify Postal Code storage, if desired. Posn Len Return Code for Postal Code Storage ...... 1 Corrected or confirmed Postal Code ...... 657 6/7 Format for Postal Code . . . . C C 7 (default C)

Specify Statement of Accuracy count type indicator storage, if desired. Count Type Indicator ...... 1

More... F3=Exit F6=Update F10=Storage Options F24=Field Search

Postal Code Storage Options Screen (C6CPOD10) - Fields

Field Name Format Description Comments

Return Code for 1 to 4 digits A one-character code indicating the success or Optional. No default Postal Code reason for failure of the postal code correction Storage attempt: blank The match attempt was successful. A Apartment number missing or not found in database, and an apartment- level match was required B Insufficient (or blank) address match information H House/Box number not found on street M Found postal code matches of equal quality S Street name not found in postal code Z Postal code not found in database

Corrected or 1 to 4 digits The starting location in the output record where Optional. No default confirmed Postal you want the corrected or confirmed postal Code code stored.

Release 3.4.0 65 User Guide - IBM® i Postal Code Storage Options Screen (C6CPOD10)

Field Name Format Description Comments

Format for Postal 1 character The format for the corrected or confirmed postal Required. No default Code code. Enter one of the following codes: C The postal code is in 6 bytes. 7 The postal code is in 7 bytes (with a space between the FSA and the LDU)

Count Type 1 to 4 digits Location on the output record of the one-byte Optional. No default Indicator code indicating how the record was counted to determine the accuracy of your file: U Record counted as urban R Record counted as rural F Record counted as foreign (outside of Canada)

Postal Code Storage Options Screen (C6CPOD10) - Function Keys

Function Key Name Description

F3 Exit Exit from the Name/Address Record Posting component, without saving the data.

F6 Update Save the data and exit from the Name/Address Record Posting component.

F10 Storage Options Go to the Postal Code Storage Options screen (C6CPOD11).

F24 Field Search Go to the Display Database File Field List screen (@@CPFR04).

Release 3.4.0 66 User Guide - IBM® i Chapter 4: Defining Output Postal Code Storage Options Screen (C6CPOD11) Postal Code Storage Options Screen (C6CPOD11)

To access this screen: Press F10 from the Postal Code Storage screen. The Postal Code Storage Options screen allows you to specify that, under certain conditions, the corrected postal code should not be stored. You also have the option to specify what should be stored when the postal code is not stored.

Canadian CODE-1 Plus C6CPOD00 C6CPOD11 Job MYJOB Name/Address Record Posting Postal Code Storage Options [PC OUT] Specify Postal Code storage options if desired. Store if multiple Postal Code Matches...... M Blank (default blank)

Disposition for non-stored Postal Code ...... B I X (default B) B = store blanks I = store from input X = do not store anything

More... F3=Exit F6=Update F24=Field Search

Postal Code Storage Options Screen (C6CPOD11) - Fields

Field Name Format Description Comments

Store if multiple 1 alphabetic A 1-character code indicating whether to store Optional. Default is Postal Code character the corrected postal code if multiple postal blank. Matches codes matched the input record. Enter one of the following codes: M Store the postal code blank Do not store the postal code

Disposition for non- 1 alphabetic A 1-character code indicating what should be Optional. Default is stored Postal Code character stored in the output record in the postal code blank. location when the postal code is not stored because of one of the fields listed above. Enter one of the following codes: B Store blanks I Store the input postal code X Store nothing

Release 3.4.0 67 User Guide - IBM® i Postal Code Storage Options Screen (C6CPOD11) Postal Code Storage Options Screen (C6CPOD11) - Function Keys

Function Key Name Description

F3 Exit Exit from the Name/Address Record Posting component, without saving the data.

F6 Update Save the data and exit from the Name/Address Record Posting component.

F24 Field Search Go to the Display Database File Field List screen (@@CPFR04).

Release 3.4.0 68 User Guide - IBM® i Chapter 4: Defining Output Postal Code Storage Options Screen (C6CPOD11) Result Postal Code Screen (C6CPOD12)

To access this screen: Page down from the Postal Code Storage Options Screen (C6CPOD10). Use this screen to define the output location for multiple matching Postal Codes.

 In some cases, a civic address may have separate Postal Codes for the house number/suite combination, building, and building block face.

Canadian CODE-1 Plus C6CPOD00 C6CPOD12 Job MYJOB Name/Address Record Posting Result Postal Code

[M PCDS] Specify Position For Result Postal Code. Posn First Result Postal Code ......

Second Result Postal Code...... Third Result Postal Code ...... Fourth Result Postal Code......

More... F3=Exit F6=Update F24=Field Search

Result Postal Code Screen (C6CPOD12) - Fields

Field Name Format Description Comments

Result Postal Code 1 to 4 digits Define the output posting location of the output Optional. No Posn first result postal code is located. default

Result Postal Code Screen (C6CPOD12) - Function Keys

Function Key Name Description

F3 Exit Exit from the Name/Address Record Posting component, without saving the data.

F6 Update Save the data and exit from the Name/Address Record Posting component.

F24 Field Search Go to the Display Database File Field List screen (@@CPFR04).

Release 3.4.0 69 User Guide - IBM® i Postal Code Storage Options Screen (C6CPOD11) Standardized Address Storage Screen (C6CPOD16)

To access this screen: Page down from the Result Postal Code Screen (C6CPOD12). The Standardized Address Storage screen allows you to specify positions and lengths in the output record for the storage of the: • Standardized address return code • Standardized address with and without unit information • Unit information • Code reflecting the source of the matched address • Code reflecting the type of any information that was dropped.

Canadian CODE-1 Plus C6CPOD00 C6CPOD16 Job MYJOB Name/Address Record Posting Standardized Address Storage [SA OUT] Specify Standardized Address storage, if desired. Posn Len Return Code for Standardized Address storage ...... 469 1 Std Address with Unit...... Replace Input? Y N or New location . . . . Store input if no match? Y Y N 472 99 Location For Truncation Flag ...... Standardized Address without Unit...... Store if Std-Addr-w/Unit stored? Y if yes Location For Truncation Flag ...... Unit String ...... Store if Std-Addr-w/Unit stored? Y if yes Code reflecting Source of Matched Address...... 1 More... F3=Exit F6=Update F10=Storage Options F24=Field Search

Release 3.4.0 70 User Guide - IBM® i Chapter 4: Defining Output Postal Code Storage Options Screen (C6CPOD11)

Standardized Address Storage Screen (C6CPOD16) - Fields

Field Name Format Description Comments

Return Code for 1 to 4 digits Location on the output record for the 1-byte Optional. No Standardized address return code. One of the following default Address Storage codes will be stored: Posn blank Address match attempt was successful A Unit number missing or not found in database, and a unit-level match was required B Insufficient (or blank) address information for a match D Information was dropped during the address match attempt H Civic/Box number not found on this street L The returned address was too long to be stored M Multiple matches were found P PO Box number not found R Route number not found S Street name not found in postal code Z Postal code was not found on database

Std Address with Unit 1 alphabetic A Y or N indicating whether or not you want the Optional. No - Replace Input? character standardized address to replace the input default address. Enter one of the following: Y Yes, replace the input address with the standardized address, including unit information. N No, do not replace the input address.

New Location - Store 1 alphabetic A Y or N indicating whether the input address Optional. No input if no match? character should be stored in the standardized address default location in the output record if no standardized address was found. Enter one of the following: Y Yes, store the input address in the output record when no standardized address was found. N No, do not store the input address in the output record when no standardized address was found.

New Location - Posn 1 to 4 digits The location in the output record for the Optional. No standardized address with unit information. default

New Location - Len 1 to 2 digits The length of the standardized address with Required if you unit information in the output record. entered a New Location - Posn. No default

Release 3.4.0 71 User Guide - IBM® i Postal Code Storage Options Screen (C6CPOD11)

Field Name Format Description Comments

Truncation Flag 1 alphabetic May contain the location in the output records at Optional. No character which to place the standardized address line 1 default flag, which will contain the following: blank Standardized address line 1 fit X Truncation has occurred S Address was too long and was split onto the standardized address line 2 This flag will appear only if the overflow option was chosen on the FORMAT parameter, column 18.

Standardized 1 to 4 digits The location in the output record for the Optional. No Address without unit - standardized address without unit information. default Posn

Standardized 1 to 2 digits The length of the standardized address without Required if you Address without unit - unit information in the output record. entered a Len Standardized Address without Unit; Posn. No default

Store if Std-Addr- 1 alphabetic Enter a Y in this field only if you want the Optional. Default w/Unit stored character standardized address without unit information is not to store the to be stored in the output record, even if the standardized standardized address with unit information has address without already been stored. unit information if the standardized address with unit information has already been stored.

Truncation Flag 1 alphabetic May contain the location in the output records at Optional. No character which to place the standardized address line 1 default flag, which will contain the following: blank Standardized address line 1 fit X Truncation has occurred This flag will appear only if the overflow option was chosen on the FORMAT parameter, column 18.

Unit String - Posn 1 to 4 digits The location in the output record for the unit Optional. No information. default

Unit String - Len 1 to 2 digits The length of the unit information in the output Required if you record. entered a Unit String — Posn. No default

Store if Std-Addr- 1 alphabetic Enter a Y in this field only if you want the unit Optional. Default w/Unit stored character information to be stored in the output record, is not to store the even if the standardized address with unit unit information if information has already been stored. the standardized address with unit information has already been stored.

Code reflecting 1 to 4 digits The location in the output record for the 1- Optional. No Source of Matched character source of matched address code. default Address — Posn P Primary address line only S Secondary address line only M Both address lines

Release 3.4.0 72 User Guide - IBM® i Chapter 4: Defining Output Postal Code Storage Options Screen (C6CPOD11)

Standardized Address Storage Screen (C6CPOD16) - Function Keys

Function Key Name Description

F3 Exit Exit from the Name/Address Record Posting component, without saving the data.

F6 Update Save the data and exit from the Name/Address Record Posting component.

F10 Storage Options Go to the Standardized Address Storage Options screen (C6CPOD17).

F24 Field Search Go to the Display Database File Field List screen (@@CPFR04).

Release 3.4.0 73 User Guide - IBM® i Postal Code Storage Options Screen (C6CPOD11) Standardized Address Storage Options Screen (C6CPOD17)

To access this screen: Press F10 while on the Standardized Address Storage Screen (C6CPOD16). The Standardized Address Storage Options screen allows you to specify the conditions under which the standardized (corrected) address should not be stored. You also have the option to specify what to store in place of the standardized address.

Canadian CODE-1 Plus C6CPOD00 C6CPOD17 Job MYJOB Name/Address Record Posting Standardized Address Storage Options [SA OUT] Specify Standardized Address storage options, if desired. Store if multiple Standardized Address matches . . Y N (default N) Store if multiple Postal Code Matches...... Y N (default N) Disposition for non-stored Std Address ...... B X (default B) B=Store blanks, X=Do not store anything Location for Line Indicator String ......

More... F3=Exit F6=Update F24=Field Search

Standardized Address Storage Options Screen (C6CPOD17) - Fields

Field Name Format Description Comments

Store if multiple 1 alphabetic A 1-character code indicating whether or not you want Optional. Standardized character the corrected standardized address stored if there were Default is N. Address multiple standardized addresses found that matched the Matches input record. Enter one of the following codes: Y Yes, store the standardized address anyway. N No, do not store the standardized address.

Store if multiple 1 alphabetic A 1-character code indicating whether or not you want Optional. Postal Code character the corrected standardized address stored if there were Default is N. Matches multiple postal codes found that matched the input record. Enter one of the following codes: Y Yes, store the standardized address anyway. N No, do not store the standardized address.

Release 3.4.0 74 User Guide - IBM® i Chapter 4: Defining Output Postal Code Storage Options Screen (C6CPOD11)

Field Name Format Description Comments

Disposition for 1 alphabetic One-character code indicating what should be stored in Optional. non-stored Std character the output record in the standardized address location Default is B. Address when the standardized address is not stored because of one of the Storage Conditions fields. Enter one of the following codes: B Store blanks X Store nothing

Location for Up to 6 Location on the output storage location for the 6-byte Optional. Line Indicators alphabetic line indicators string. The line indicator string shows Associated character which lines in the input record were used to match the w/Standard CPC data. The first byte corresponds to the first input Address address line (as defined on the ADDRDF parameter), the second byte corresponds to the second input address line, etc. The codes that will be stored in each byte are as follows: blank Field not defined on ADDRDF Y Line used to match CPC data N Line was not used to match CPC data L Line was used to match CPC LVR data B Line was blank in the input record

Standardized Address Storage Options Screen (C6CPOD17) - Function Keys

Function Key Name Description

F3 Exit Exit from the Name/Address Record Posting component, without saving the data.

F6 Update Save the data and exit from the Name/Address Record Posting component.

F24 Field Search Go to the Display Database File Field List screen (@@CPFR04).

Release 3.4.0 75 User Guide - IBM® i Postal Code Storage Options Screen (C6CPOD11) Address Element Storage Screen (C6CPOD18)

To access this screen: Page down from Standardized Address Storage Screen (C6CPOD16). The Address Element Storage screen allows you to specify locations and lengths in the output record for individual standardized address elements. You also have the option to specify what should be stored when the standardized address is not available (because no match was found).

Canadian CODE-1 Plus C6CPOD00 C6CPOD18 Job MYJOB Name/Address Record Posting Address Element Storage [AE OUT] Specify storage of individual Address Elements, if desired. Posn Len Civic Number ...... 10 Street Directional ...... 2 Street Name...... Street Type...... 6 Unit Keyword ...... 6 Unit Identifier ...... 8 Route Designator ...... 2 Route Identifier ...... 4 Lockbox/Bag Identifier ...... 10 Delivery Installation Type ...... 5 Delivery Installation Qualifier...... 15 Delivery Installation Name ...... 30 Treatment when Standardized Address not Available...... B = Store Blanks (default) N = Store Elements Normalized from Primary Address X = Do not Store anything More...

Address Element Storage Screen (C6CPOD18) - Fields

Field Name Format Description Comments

Civic Number Posn 1 to 4 digits Starting position of the output 10-byte civic Optional. No default number

Street Directional 1 to 4 digits Starting position of the output 2-byte street Optional. No default Posn directional

Street Name Posn 1 to 4 digits Starting position of the output street name Optional. No default

Street Name Len Up to 30 digits Length of the output street name field Optional.

Street Type Posn 1 to 4 digits Starting position of the output 6-byte street type Optional. No default

Unit Keyword Posn 1 to 4 digits Starting position of the output 6-byte unit Optional. No default keyword

Unit Identifier Posn 1 to 4 digits Starting position of the output 8-byte unit Optional. No default identifier

Route Designator 1 to 4 digits Starting position of the 2-byte output route Optional. No default Posn designator

Route Identifier 1 to 4 digits Starting position of the 4-byte output route Optional. No default Posn identifier

Release 3.4.0 76 User Guide - IBM® i Chapter 4: Defining Output Postal Code Storage Options Screen (C6CPOD11)

Field Name Format Description Comments

Lockbox/Bag 1 to 4 digits Starting position of the 10-byte output lock Optional. No default Identifier Posn box/bag identifier.

Delivery Installation 1 to 4 digits Starting position of the 5-byte output delivery Optional. No default Type Posn installation type

Delivery Installation 1 to 4 digits Starting position of the 15-byte output delivery Optional. No default Qualifier Posn installation qualifier

Delivery Installation 1 to 4 digits Starting position of the 30-byte output delivery Optional. No default Name Posn installation name

Treatment when 1 alphabetic One-character code indicating the data to store Optional. Default is Standardized character in the output record in the locations you have B. Address Not identified for the individual address elements Available when the standardized address is not available. Enter one of the following codes: B Store blanks. N Store elements normalized from the primary address. X Store nothing.

Address Element Storage Screen (C6CPOD18) - Function Keys

Function Key Name Description

F3 Exit Exit from the Name/Address Record Posting component, without saving the data.

F6 Update Save the data and exit from the Name/Address Record Posting component.

F10 Address Format Go to the Street Address Information Format screen (C6CPOD19) and specify formats for street address information.

F24 Field Search Go to the Display Database File Field List screen (@@CPFR04).

Release 3.4.0 77 User Guide - IBM® i Postal Code Storage Options Screen (C6CPOD11) Street Address Information Format Screen (C6CPOD19)

To access this screen: Press F1 while on the Address Element Storage Screen (C6CPOD18). The Street Address Information Format screen allows you to specify formats for street address elements.

Canadian CODE-1 Plus C6CPOD00 C6CPOD19 Name/Address Record Posting Street Address Information Format

[FORMAT] Specify Formats For Street Address Information. Apartment Format Option. . . . . (D F B E S) (default D) Associated Route Delivery. . . . (D A S) (default D) Non-Civic Keyword Option . . . . (A F) (default A) Associated Delivery Office . . . (A S D) (default D) French Address Format...... (D T C S) (default D) Overflow Treatment Option. . . . (O Blank) (default blank) Control accented data...... (Y N) (default N) Extra Information Location (A or Blank) (default blank) Apt ID For English Format. . . . (APARTMENT, APT, SUITE, UNIT) App ID For French Format . . . . (APPARTEMENT, APP, BUREAU, UNITE SUITE)

More...

Release 3.4.0 78 User Guide - IBM® i Chapter 4: Defining Output Postal Code Storage Options Screen (C6CPOD11)

Street Address Information Format Screen (C6CPOD19) - Fields

Field Name Format Description Comments

Apartment Format 1 character Code indicating the placement of the apartment Optional. Default is Option information in relation to the other address D. elements. Enter one of the following: D The output information will be formatted like the input information whenever possible to preserve the original format. F The apartment number (with no identifier will be in front of the address followed by a hyphen and the rest of the address (example: 2-100 MAIN ST) B The apartment identifier and number will be on the back of the address string (example: 100 MAIN ST SUITE 2). E The apartment identifier and number will be at the front of the address string (example: SUITE 2 100 MAIN ST). S The apartment identifier and number will be stored in the secondary standardized address line as in this example:

SUITE 2 100 MAIN ST

Associated Route 1 character Code indicating the format of the associated Optional. Default is Delivery delivery office information in the output records. D. Enter one of the following codes: A The associated delivery office information will be formatted after the address. (example: PO BOX 100 WILLOWDALE STN MAIN) D The output address information will be formatted like the input whenever possible, to preserve the original format. S The associated delivery office information will be formatted in the secondary standardized address line (example: WILLOWDALE STN MAIN PO BOX 100).

Non-Civic Keyword 1 character Code indicating the format of the keyword in the Optional. Default is Option output records. Enter one of the following A for box, rural codes: route, mobile A The abbreviation for the keyword will route, and be used. suburban service records; F for F The full keyword will be used. general delivery.

Release 3.4.0 79 User Guide - IBM® i Postal Code Storage Options Screen (C6CPOD11)

Field Name Format Description Comments

Associated Delivery 1 character Code indicating the format of the associated Optional. Default is Office delivery office information in the output records. S. Enter one of the following codes: A The associated delivery office information will be formatted after the address (example: PO BOX 100 WILLOWDALE STN MAIN). S The associated delivery office information will be formatted in the secondary standardized address line (example: WILLOWDALE STN MAIN PO BOX 100 X The associated delivery office information will not be formatted with the standardized address.

French Format 1 character Code indicating the format of French output Optional. Default is Address Format records (see description of the FRENCH D. parameter). Enter one of the following codes): D (Default) The output address will be formatted like the input whenever possible to preserve the original format T The output address will be formatted in French order C The output address will be formatted based on the language of the street type on the CPC database. If the street type is ambiguous, the output will be formatted like the input. The following street types will result in French-order output addresses: ALLEE AUT AV BOUL CAR CARREF C CERCLE CH COTE COUR COURS CROIS ECH HEATH ILE IMP INLET MONTEE PARC POINTE QUAI RAMP RANG RDPT RLE RTE RUE SENT TSSE VILLAS VOIE The following street types are ambiguous: CONC CDS PARADE PLACE PLAT PLAZA POINT PROM SQ VILLGE S Standard CPC format.

Release 3.4.0 80 User Guide - IBM® i Chapter 4: Defining Output Postal Code Storage Options Screen (C6CPOD11)

Field Name Format Description Comments

Overflow Treatment 1 digit Code indicating what to do in situations where Optional. Default is Option the output standardized address is too long to fit blank in the output location specified on the SA OUT parameter. Enter one of the following codes: O Attempt to split the output address so that the majority of the street addresses stored in the primary standardized address line, and the apartment, associated route delivery information, and/or associated delivery office information is stored in the secondary standardized address line. blank Truncate the output standardized address and store the result in the primary standardized address line.

Control Accented 1character The control for accented data: Optional. Default is Data Y Accented data will be returned in the N. standardized data field. N No accented data will be returned. 1 Read and write data in an 8859-1 code page with multinationals will be returned.

Extra Information 1 character The control for the location of extra information: Optional. Default is Location Option A Extra information will be appended to blank. the contents of the primary standardized address line, as well as placed in the separate extra information field. blank Extra information will be placed in the separate extra information field only.

App ID for English 3 to 9 The apartment identifier that should be written Optional. Default is Format characters to English-format output records for which no SUITE. apartment identifier was returned from the matcher. Choices are: APARTMENT, APT, SUITE, UNIT.

App ID for French 3 to 11 The apartment identifier that should be written Optional. Default is Format characters to French-format output records for which no SUITE. apartment identifier was returned from the matcher. Choices are: APPARTEMENT, APP, BUREAU, SUITE, UNITE.

Street Address Information Format Screen (C6CPOD19) = Function Keys

Function Key Name Description

F3 Exit Exit from the Name/Address Record Posting component, without saving the data.

F6 Update Save the data and exit from the Name/Address Record Posting component.

F24 Field Search Go to the Display Database File Field List screen (@@CPFR04).

Release 3.4.0 81 User Guide - IBM® i City and Province Storage Screen (C6CPOD20) City and Province Storage Screen (C6CPOD20)

To access this screen: Page down from the Address Element Storage Screen (C6CPOD18). The City and Province Storage screen allows you to specify positions and lengths in the output record for the storage of the: • City and province return code • Formatted city and province • Long city name (up to 30 characters) • Short city name (up to 13 characters) • Province code

Canadian CODE-1 Plus C6CPOD00 C6CPOD20 Job MYJOB Name/Address Record Posting City and Province Storage [CP OUT] Specify City and Province storage, if desired. Posn Len City/Province Return Code ...... 1 Formatted City/Province. . . . Replace Input? Y N - Or - Format of City/Province...... P S P=City, Province, and Postal Code, S=City and Province City Name (30-characters maximum) ...... 572 30 Store Input City Name if No Match . . . . . Y Y N If Len=18, Location for CPC-Approved City Name ...... Return Alias City? ...... Y N Short City Name ...... 13 Province Abbreviation ...... 602 2 Store Input Province if No Match ...... Y Y N More... F3=Exit F6=Update F10=Storage Options F24=Field Search

Release 3.4.0 82 User Guide - IBM® i Chapter 4: Defining Output City and Province Storage Screen (C6CPOD20)

City and Province Storage Screen (C6CPOD20) - Fields

Field Name Format Description Comments

Return Code for City 1 to 4 digits Location of the 1-byte output city/province Optional. No and Province Storage return code. One of the following codes will be default Posn stored to indicate the reason the output city and province were or were not stored: blank An output city/province was stored. A Unit number missing or not found in database, and a unit-level match was required B Insufficient (or blank) address match information C The probable correctness was lower than the specified maximum D Information was dropped during the match H Civic/box number not found on street M Multiple matches of equal quality were found P PO Box number not found R Route service number not found S Street name not found in postal code X The only match was the default record Z Postal code not found in database.

Formatted 1 character Y or N indicating whether or not you want the Optional. No City/Province - formatted (matched) city and province to default Replace input? replace the input city and province. Enter one of the following: Y Yes, replace the input city and province with the matched city and province N No, do not replace the input city and province.

Formatted 1 to 4 digits Starting location of the output matched city and Optional. No City/Province - Posn province default

Formatted 1 to 2 digits Length of the output matched city and province Required if you City/Province - Len entered a Formatted City/Province - Posn. No default

Format of 1 character One-character code indicating whether the Required if you City/Province matched formatted city and province should entered data for include the postal code. Enter one of the any of the fields following codes: listed above. S Canadian CODE-1 Plus will store the Default is S. city and province in the location you specified for the formatted city/ province. P Canadian CODE-1 Plus will store the city, province, and postal code in the location you specified for the formatted city/province.

City Name (30 1 to 4 digits Starting location of the output city name (up to Optional. No characters maximum) 30 characters) default - Posn

Release 3.4.0 83 User Guide - IBM® i City and Province Storage Screen (C6CPOD20)

Field Name Format Description Comments

City Name (30 1 to 2 digits Length of the output long city name Required if you characters maximum) entered a City - Len Name — Posn. No default

Store input if no 1 character Y or N indicating whether the input city name Optional. No match? should be stored in the city name location in the default output record if no address match was found. Enter one of the following: Y Yes, store the input city in the output record when no address match was found. N No, do not store the input city in the output record when no address match was found.

City Name (short 1 to 4 digits Starting position of the output short city name Optional. No form) - Posn (up to 13 characters) default

Province code (CPC 1 to 4 digits Starting position of the 2-character output CPC- Optional. No Standard) - Posn standard province code default

Store input if no 1 character Y or N indicating whether the input city name Optional. No match? should be stored in the province code location default in the output record if no address match was found. Enter one of the following: Y Yes, store the input city in the output record when no address match was found. N No, do not store the input city in the output record when no address match was found.

Release 3.4.0 84 User Guide - IBM® i Chapter 4: Defining Output City and Province Storage Screen (C6CPOD20)

City and Province Storage Screen (C6CPOD20) - Function Keys

Function Key Name Description

F3 Exit Exit from the Name/Address Record Posting component, without saving the data.

F6 Update Save the data and exit from the Name/Address Record Posting component.

F10 Storage Options Go to the City and Province Storage Options screen (C6CPOD21).

F24 Field Search Go to the Display Database File Field List screen (@@CPFR04).

Release 3.4.0 85 User Guide - IBM® i City and Province Storage Screen (C6CPOD20) City and Province Storage Options Screen (C6CPOD21)

To access this screen: Press F10 from the City and Province Storage Screen (C6CPOD20). The City and Province Storage Options screen allows you to specify that, under certain conditions, the corrected city and province should not be stored. You also have the option to specify what should be stored when the corrected city and province are not stored.

Canadian CODE-1 Plus C6CPOD00 C6CPOD21 Job MYJOB Name/Address Record Posting City and Province Storage Options [CP OUT] Specify City and Province storage options, if desired. Store Default City if City Not Matched ...... Y N (Dft=Y) Disposition for Non-Stored City/Province . . . . . B X (Dft=B) B=Store blanks, X=Store nothing

More... F3=Exit F6=Update F24=Field Search

City and Province Storage Options Screen (C6CPOD21) - Fields

Field Name Format Description Comments

Store default City if 1 character One-character code indicating whether to store Optional. Default is City not matched the default city for the postal code if there is no Y. city match found: Y Yes, store the default city. N No, do not store the default city.

Disposition for non- 1 character One-character code indicating what to store in Optional. Default is stored city/province the output record in the city and province B. location when the corrected city and province are not stored because of one of the fields listed above. Enter one of the following: B Store blanks. X Store nothing.

Release 3.4.0 86 User Guide - IBM® i Chapter 4: Defining Output City and Province Storage Screen (C6CPOD20)

City and Province Storage Options Screen (C6CPOD21) - Function Keys

Function Key Name Description

F3 Exit Exit from the Name/Address Record Posting component, without saving the data.

F6 Update Save the data and exit from the Name/Address Record Posting component.

F24 Field Search Go to the Display Database File Field List screen (@@CPFR04).

Release 3.4.0 87 User Guide - IBM® i City and Province Storage Screen (C6CPOD20) Address Match Information Storage Screen (C6CPOD22)

To access this screen: Page down from the City and Province Storage Screen (C6CPOD20). The Address Match Information Storage screen allows you to specify locations in the output record for return codes, match scores, and probable correctness codes.

Canadian CODE-1 Plus C6CPOD00 C6CPOD22 Job MYJOB Name/Address Record Posting Address Match Information Storage

[AM OUT] Specify storage of Address Match result information: Posn Len CPC Record Type ...... 2 General Return Code...... 468 1 Street Direction Return Code ...... 1 Street Type Return Code...... 1 Unit Return Code ...... 1 Large Volume Receiver name Return Code ...... 1 Overall Probable Correctness ...... 1 Questionable Rural Return Code ...... 1 Correction/Validation Return Code...... 467 1 Address Analysis Code...... 50 City Match Return Code ...... 1

More... F3=Exit F6=Update F24=Field Search

Address Match Information Storage Screen (C6CPOD22) - Fields

Field Name Format Description Comments

CPC Record Type Posn 1 to 4 digits Starting position of the output 2-byte CPC Optional. No record type code default

General Return Code 1 to 4 digits Starting position of the output 1-byte general Optional. No Posn return code default

Street Direction Return 1 to 4 digits Starting position of the output 1-byte street Optional. No Code Posn direction return code default

Street Type Return Code 1 to 4 digits Starting position of the output 1-byte street type Optional. No Posn return code default

Unit Return Code Posn 1 to 4 digits Starting position of the output 1-byte unit return Optional. No code default

Large Volume Receiver 1 to 4 digits Starting position of the output 1-byte large Optional. No Name Return Code Posn volume receiver name return code default

Overall Probable 1 to 4 digits Starting position of the output 1-byte overall Optional. No Correctness Posn probable correctness code default

Release 3.4.0 88 User Guide - IBM® i Chapter 4: Defining Output City and Province Storage Screen (C6CPOD20)

Field Name Format Description Comments

Questionable Rural Location 1- byte output questionable return Return Code Position code: blank Address is not questionable Q Questionable address records have inconsistent address components that may hinder the ability to delivery the mail piece. X Indicates a "Managed Rural Postal Code" address. "Managed Rural Postal Code" addresses are addresses that Canada Post Corporation (CPC) has converted to civic addresses. These addresses are no longer associated with a rural route.

Correction/Validation 1 to 4 digits Starting position of the output 1-byte Optional. No Return Code Posn correction/validation return code default

Address Analysis Code 1 to 4 digits Starting location of the output record for the 50- Optional. No Posn byte analysis code area that applies to the default standardized address

City Match Return Code 1 to 4 digits. Location of the output 1-byte city match return Optional. No code, which will be one of the following: default N No locality attempt was made. B No input city could be found. C No match could be found for the input city/province. blank Match successful.

Address Match Information Storage Screen (C6CPOD22) - Function Keys

Function Key Name Description

F3 Exit Exit from the Name/Address Record Posting component, without saving the data.

F6 Update Save the data and exit from the Name/Address Record Posting component.

F24 Field Search Go to the Display Database File Field List screen (@@CPFR04).

Release 3.4.0 89 User Guide - IBM® i City and Province Storage Screen (C6CPOD20) Parsed Address Information Storage Screen (C6CPOD24)

To access this screen: Page down from the Address Match Information Storage Screen (C6CPOD22). The Parsed Address Information Storage screen allows you to specify storage locations for the parsed address lines, the normalized address lines, and any information that was dropped from the input address during the matching process.

Canadian CODE-1 Plus C6CPOD00 C6CPOD24 Job MYJOB Name/Address Record Posting Parsed Address Information Storage [AP OUT] Specify storage of Parsed Address information, if desired. Posn Len Normalized Address Line 1. . Condition ...... Conditions for storage of normalized addresses: A = All records X = Only records for which a Standardized (validated or corrected) Address was not stored

Extra Information...... Truncation Flag...... 1

More... F3=Exit F6=Update F24=Field Search

Parsed Address Information Storage Screen (C6CPOD24) - Fields

Field Name Format Description Comments

Normalized Address 1 character One-byte code indicating under which Required if you 1 Condition conditions the primary normalized address line entered a Normalized will be stored in the output record. Enter one of Address 1 Posn. the following codes: Default is X. A Store the normalized primary address line for all records. X Store the normalized primary address line only for those records for which no standardized address was stored (either because no match was found or because your specified storage criteria were not met.)

Normalized Address 1 to 4 digits Starting position of the output normalized Optional. No default 1 Posn primary address line

Normalized Address 1 to 2 digits Length of the normalized primary address line Required if you 1 Len in the output record entered a Normalized Address 1 position. No default

Extra Information 1 to 4 digits Location of the output record for any extra Optional. No default Posn information

Release 3.4.0 90 User Guide - IBM® i Chapter 4: Defining Output City and Province Storage Screen (C6CPOD20)

Field Name Format Description Comments

Extra Information 1 to 2 digits Length of any extra information Optional. No default Len

Truncation Flag 1 to 4 digits Location for the output record location for the Optional. No default Posn truncation flag

Parsed Address Information Storage Screen (C6CPOD24) - Function Keys

Function Key Name Description

F3 Exit Exit from the Name/Address Record Posting component, without saving the data.

F6 Update Save the data and exit from the Name/Address Record Posting component.

F24 Field Search Go to the Display Database File Field List screen (@@CPFR04).

Release 3.4.0 91 User Guide - IBM® i City and Province Storage Screen (C6CPOD20) Reformat Output Record Screen (C6CPMO13)

To access this screen: Select Reformat Output Record (options 2 or 6) from the Define/Submit Canadian CODE-1 Plus Job. This screen facilitates the MOVE O (move output) feature that rearranges the content of your output records before writing them to their respective output files. 1. Canadian CODE-1 Plus processes a record and copies that record into an output record array. 2. Next, Canadian CODE-1 Plus copies the entire record to a temporary work area, if requested. 3. The next step is to copy data from a specific location in the work area back to a defined location in the output record array.

4. Finally, Canadian CODE-1 Plus writes the information in the array to your output file, or passes the information to an output exit routine for additional processing.

Define up to 100 MOVE O operations (using F10/Insert) for one job. MOVE O definitions are processed in the order that they are defined, from top to bottom, so keep this in mind when defining your MOVEs.

Canadian CODE-1 Plus T C6CPMI00 Replace with screen heading desired M C6CPMO13 Job MYJOB Reformat Input Record B

[MOVE O] Specify move operations to be executed in the order presented: Source Field Length Target Field Source Field may contain a location in the work area of the information to be copied, or one of the following codes:

SPC: Spaces X00: Binary zeros ZRO: Character zeros

Length must contain the length of the information to be copied.

Target Field must contain a location in the output record to copy to.

______F3=Exit F6=Update F10=Insert F24=Field Search

Reformat Output Record Screen (@@CPFR04) - Fields

Field Name Format Description Comments

Source Field 3 to 4 Define the starting location of the information to copy, Required; No default alphanumeric or define one of the following codes to copy generic characters information to the target location: SPC Spaces X00 Binary zeros ZRO Character zeros

Release 3.4.0 92 User Guide - IBM® i Chapter 4: Defining Output City and Province Storage Screen (C6CPOD20)

Field Name Format Description Comments

Length 3-digit Define the length of the information to copy to the Required; No default number target location.

Target Field 4-digit Define the location to place the copied (moved) Required; No default number information.

Release 3.4.0 93 User Guide - IBM® i City and Province Storage Screen (C6CPOD20)

Release 3.4.0 94 User Guide - IBM® i Generating Reports 5

In this chapter

 Defining Canadian CODE-1 Plus Reports ...... 96  Component Overview ...... 96  Types of Headers and Footers ...... 97  Defaults for Print Output Screen (C6CPPX01)...... 97  Define Headers and Footers Screen (C6CPPX03)...... 99  Report Selection Screen (C6CPRP10) ...... 101  Report Selection Screen (C6CPRP11) ...... 103  Define Differences/Uncoded Reports Screen (C6CPUD01) . . . .105  Postal Code Differences Screen (C6CPUD21)...... 107  City Name Differences Screen (C6CPUD21) ...... 111  Standardized Address Differences Screen (C6CPUD21) ...... 109  Uncoded/Unmatched Screen (C6CPUD21) ...... 113  Define Differences/Uncoded Reports (C6CPUD80) Screen . . . .115  Analysis of Matched Records Report...... 116  Processing Summary Reports ...... 116  Parameters Listing Report ...... 116  Control Totals Report...... 116  Execution Log...... 117  Statement of Address Accuracy ...... 117  Return Code Analysis Reports ...... 118 Component Overview Defining Canadian CODE-1 Plus Reports

To select a report, type a “1" in the ”Opt” column next to that report on the Report Selection Screen (C6CPRP10). When you press Enter, the screen for the individual report you have selected will be displayed. If you select more than one report to print, each of the individual report screens will be displayed for you in screen list sequence. Define your Canadian CODE-1 Plus reports using the Defaults for Print Output and Report Selection screens. • Use the Defaults for Print Output Screens to define global report formatting options such as the number of lines to print on a page, header lines, and footer lines. • Use the Report Selection Screen (C6CPRP10), to select the following optional reports for batch jobs: – Analysis of Matched Records – Processing Summary by Province – Processing Summary by List Code – Processing Summary by FSA – Return Code Analysis Report — Correctable – Return Code Analysis Report — Valid Canadian CODE-1 Plus generates these reports for all jobs: • Parameters Listing • Control Totals • Execution Log • Address-Match Execution Statistics • Statement of Accuracy.

Component Overview

The Defaults for Print Output component is one of the least complex components of Canadian CODE-1 Plus. This component allows you to define four items: • Textual main header to be printed on all reports • Date to be printed with the main header • Lines per page for the Execution Log and for all other reports • Additional headers and footers to be printed on all reports. You will define all of these items from two screens: • Defaults for Print Output (C6CPPX01) • Defaults for Print Output — Define headers and footers (C6CPPX03).

Release 3.4.0 96 User Guide - IBM® i Chapter 5: Generating Reports Component Overview Types of Headers and Footers

The Defaults for Print Output component has five types of headers and footers: • The system header always consists of a blank line, followed by the phrase “C6BM00-Canadian CODE-1 Plus” and the name of the report. You cannot control the text of this header, nor can you suppress it from being printed at the top of each page of your reports. • The single line main header, defined on the first Defaults for Print Output screen, is printed under the system header.

 The date prints on the far left side of the main header line.

• The additional header, which can be up to four lines long, is printed as the first line(s) above the blank line that follows the main header. • The system footer is identical to the system header, except that it is printed at the bottom of the report page, instead of the top. Like the system header, you cannot control the text, nor can you suppress it from being printed at the bottom of each page of each report. • The additional footer, which can be up to four lines long, is printed as the line(s), below the blank line just before the system footer. Defaults for Print Output Screen (C6CPPX01)

To access this screen: Enter 2 or 6 to select the Defaults for Print Output component from the Define/Submit Canadian CODE-1 Plus Job screen. This screen allows you to define headings, dates, and special user-defined header and footer contents for reports. You can also override the default page sizes for reports and the execution log.

Canadian CODE-1 Plus C6CPPX00 C6CPPX01 Job MYJOB Defaults for Print Output

[HEADER] Specify appearance for all reports: Heading for all Reports...... IVP TEST JOB Date for all Reports ...... *CURRENT

[PAGESZ] Override print file page size if required: Reports (file PRNTRPT) ...... 25-255 Execution Log (file PRNTXLG) . . . 25-255

Specify user-defined Headers/Footers, press F11.

Bottom F3=Exit F6=Update F11=Headers/Footers

Release 3.4.0 97 User Guide - IBM® i Component Overview Defaults for Print Output Screen (C6CPPX01) - Fields

Field Name Format Description Comments

Heading for all Up to 40 The main header that you want to be printed Optional. No Reports characters along with the date at the top of your default. reports. You may enter any text you wish.

Date for all Reports 1 to 8 The date that you want printed, along with Optional. Default is alphanumeric the main header, at the top of your reports. *CURRENT. characters Enter either a date, or *CURRENT to print the system date.

Report (file 2 to 3 digits. The number of lines you want to be printed Optional. Default is PRNTRPT) Minimum is 25, on each page of all of the reports except the 66. maximum is 255 Execution Log.

Execution Log 2 to 3 digits. The number of lines you want to be printed Optional. Default is (file PRNTXLG) Minimum is 25, on each page of the Execution Log. 66. maximum is 255

Defaults for Print Output Screen (C6CPPX01) - Function Keys

Function Key Name Description

F3 Exit Exit from the Defaults for Print Output component, without saving the data.

F6 Update Save the data and quit from the Defaults for Print Output component.

F11 Headers/Footers Go to the Defaults for Print Output — Define Headers and Footers screen (C6CPPX03).

Release 3.4.0 98 User Guide - IBM® i Chapter 5: Generating Reports Component Overview Define Headers and Footers Screen (C6CPPX03)

To access this screen: Press F11 on the Defaults for Print Output Screen (C6CPPX01). This screen allows you to define custom header and footer text for all reports.

Canadian CODE-1 Plus C6CPPX00 C6CPPX03 Job MYJOB Defaults for Print Output Define Headers and Footers

Specify lines to surround all reports: [UHDxx] Header Lines: 1...5...10...15...20...25...30...35...40...45...50...55...60...65...70...75....

[UFTxx] Footer Lines:

1...5...10...15...20...25...30...35...40...45...50...55...60...65...70...75....

F12=PrevScrn F13=Remove all F20=Scroll right

Define Headers and Footers Screen (C6CPPX03) - Fields

Field Name Format Description Comments

Header Lines Up to 4 lines of Enter the additional header lines that you want Optional. No default. up to 132 to be printed at the top of your reports. alphanumeric characters each

Footer Lines Up to 4 lines of Enter the additional footer lines that you want to Optional. No default. up to 132 be printed at the bottom of your reports. alphanumeric characters each

Define Headers and Footers Screen (C6CPPX03) - Function Keys

Function Key Name Description

F12 PrevScrn Save the additional headers and footers and go to the Defaults for Print Output screen (C6CPPX01).

F13 Remove All Remove all of the data in the Header Lines and Footer Lines fields.

Release 3.4.0 99 User Guide - IBM® i Component Overview

Function Key Name Description

F19 Scroll Left Move to the left on the screen to display columns 1-79 of the header and footer lines. This function key is only valid when columns 54-135 are displayed. NOTE: This function key is available only after pressing F20 to scroll left.

F20 Scroll Right Move to the right on the screen to display columns 54-135 of the header and footer lines. This function key is only valid when columns 1-79 are displayed. NOTE: This function key is available only from this screen and not after pressing F20 to scroll right.

Release 3.4.0 100 User Guide - IBM® i Chapter 5: Generating Reports Component Overview Report Selection Screen (C6CPRP10)

To access this screen: Enter 2 or 6 in front of the Report Selection Component on the Define/Submit Canadian CODE-1 Plus Job screen. The Report Selection screen allows you to generate reports for any job. In addition, you can specify the sequencing of the Return Code Analysis reports, as well as their minimum reporting threshold. Finally, the REPORT parameter allows you to specify the records-processed message threshold, which determines the frequency with which Canadian CODE-1 Plus sends a status message to the console.

Four reports are printed automatically for all jobs: the Parameter List, Execution Log, Statement of Address Accuracy, and Control Totals.

.

Canadian CODE-1 Plus C6CPRP10 Replace with screen heading desired C6CPRP10 Report Selection

[REPORT] Specify the desired reports for printing: Analysis of Matched Records...... Y

Processing Summary by Province . . . . . Y

Summary by List Code . . . . . Y Report Order F = Frequency Summary by FSA ...... Y C = Code

Analysis Report Correctable ...... Y Analysis Report Correctable Sequence . . F (F or C) (Default is F) Correctable Minimum Reporting Threshold or Analysis Report Valid ...... Y Analysis Report Valid Sequence . . . . . F (F or C) (Default is F) Invalid Minimum Reporting Threshold . . or Records Processed Message Threshold . . More... F3=Exit F6=Update F8=Define Difference Reports

Report Selection Screen (C6CPRP10) - Fields

Field Name Format Description Comments

Analysis of Matched 1 alphabetic A code indicating whether or not you want the Optional. Default is Records character Analysis of Matched Records Report to be Y. printed. Enter Y to print the report, N to suppress the report.

Processing 1 alphabetic A code indicating whether or not you want the Optional. Default is Summary by character Processing Summary by Province Report to Y. Province be printed. Enter Y to print the report, N to suppress the report.

Processing 1 alphabetic A code indicating whether or not you want the Optional. Default is Summary by List character Processing Summary by List Code Report to Y. Code be printed. Enter Y to print the report, N to suppress the report.

Processing 1 alphabetic A code indicating whether or not you want the Optional. Default is Summary by FSA character Processing Summary by FSA Report to be Y. printed. Enter Y to print the report, N to suppress the report.

Release 3.4.0 101 User Guide - IBM® i Component Overview

Field Name Format Description Comments

Analysis Report 1 character A code indicating whether or not you want the Optional. Default is Correctable Analysis Report Correctable to be printed. Y. Enter Y to print the report, N to suppress the report.

Analysis Report 1 character The order in which you want the Analysis Required if you Correctable Report Correctable printed: entered Y in Sequence F Frequency Analysis Report Correctable. Default C Code is F.

Correctable 7 digits The minimum number of records (or Optional. No default. Minimum Reporting percentage) for a single return code Threshold combination for which this report should provide data. (In other words, if you only want to see data for return code combinations for which there were 100 or more records, you would enter 0000100 here). You could also specify a minimum percentage of total records processed instead of a specific quantity. If you enter a percentage, it must be left-justified with the period in position 22.

Analysis Report 1 character A code indicating whether or not you want the Optional. Default is Valid Analysis Report Valid to be printed. Enter Y Y. to print the report, N to suppress the report.

Analysis Report 1 character The order in which you want the Analysis Required if you Valid Sequence Report Valid printed: answered Y in F Frequency Analysis Report Valid. Default is F. C Code

Invalid Minimum 7 digits The minimum number of records (or Optional. No default. Reporting Threshold percentage) for a single return code combination for which this report should provide data. (For an example, see columns 20-26.)

Records Processed 7 digits The interval, expressed as a number of Optional. No default. Message Threshold records, at which Canadian CODE-1 Plus should print a status message on the console. For example, if you want a status message printed for every 2000 records processed, you would enter 0002000.

Report Selection Screen (C6CPRP10) - Function Keys

Function Key Name Description

F3 Exit Return to the Define/Submit Canadian CODE-1 Plus Job screen (C6CPDS01) without saving your report selections.

F6 Update Save your report selections, and return to the Define/Submit Canadian CODE-1 Plus Job screen (C6CPDS01).

F8 Define Differences Go to the Define Differences/Uncoded Reports screen (C6CPUD01). Reports

Release 3.4.0 102 User Guide - IBM® i Chapter 5: Generating Reports Component Overview Report Selection Screen (C6CPRP11)

To access this screen: Page down from the initial Report Selection Screen (C6CPRP10). This screen allows you to specify the content of the Statement of Accuracy Report.

Canadian CODE-1 Plus C6CPRP00 C6CPRP11 Job MYJOB Report Selection Rls

Specify the desired reports for printing: [FILENM] Mailing File Name. .

[CUSTID] Customer ID option...... W X = ID required (Def) W = ID not required CPC Customer ID ......

[CUSAD1] Customer Name ...... First Line Of Street Address. . . [CUSAD2] Second line Of Street Address . . City/Province/Postal Code . . . .

Bottom

F3=Exit F6=Update F8=Define Difference Reports

Report Selection Screen (C6CPRP10) - Fields

Field Name Format Description Comments

Mailing File Name Up to 50 Data to appear in the mailing file name on the Required. No characters Statement of Accuracy default.

Customer ID Option 1 character Specify one of the following: X Software will halt processing if no Customer ID is defined. W If no Customer ID is defined, the job runs and Canadian CODE-1 Plus issues a warning in the Execution Log.

CPC Customer ID Up to 10 Customer ID to appear on the Statement of Optional. No characters Accuracy default.

NOTE: If the Customer ID is not entered here, it will not be printed on the Statement of Accuracy. You will have to write it in by hand. In this case, a warning message will also be printed in the Execution Log.

Customer Name Up to 25 Customer name to appear on the Statement of Required. No characters Accuracy default.

First Line of Street Up to 25 First line of the customer’s street address to Required. No Address characters print on the Statement of Accuracy default.

Release 3.4.0 103 User Guide - IBM® i Component Overview

Field Name Format Description Comments

Second Line of Up to 25 Second line of the customer’s street address to Required. No Street Address characters appear on the Statement of Accuracy. default.

City/Province/Posta Up to 25 City, province, and postal code of the Required. No l Code characters customer’s street address to appear on the default. Statement of Accuracy

Report Selection Screen (C6CPRP10) - Function Keys

Function Key Name Description

F3 Exit Return to the Report Selection screen (C6CPRP10) without saving your report definitions.

F6 Update Save your report definition, and return to the Report Selection screen (C6CPRP10).

F8 Define Difference Go to the Define Differences/Uncoded Reports screen (C6CPUD01). Reports

Release 3.4.0 104 User Guide - IBM® i Chapter 5: Generating Reports Component Overview Define Differences/Uncoded Reports Screen (C6CPUD01)

To access this screen: Select F8 from the Report Selection Screen (C6CPRP10). This screen allows you to select the Differences or Uncoded/Unmatched reports that you want to print for your job.

Canadian CODE-1 Plus C6CPUD00 Replace with screen heading desired C6CPUD01 Define Differences/Uncoded Reports

Specify input file to process for all reports. File . . . . . C6NAMCBAD Library . . . C6PPARM Member . . . CODED

Type options, press Enter. 1=Select Opt Reports Postal Code Differences Standardized Address Differences City Name Differences Uncoded/Unmatched * = defined

F3=Exit F6=Update

Define Differences/Uncoded Reports Screen (C6CPUD01) - Fields

Field Name Format Description Comments

File 1 to 10 The name of the file containing your input Required. No default. characters (A-Z, name/address file. (You will be given the option 0-9, $, @, _, or of changing this file name when you go to #). First submit the job.) character must not be 0-9 or _.

Library 1 to 10 The name of the library that holds the input Required. No default. characters (A-Z, name/address file. 0-9, $, @, _, or #). First character must not be 0-9 or _.

Member 1 to 10 The member of the file containing your input Required. No default. characters (A-Z, names and addresses. Enter the member 0-9, $, @, _, or name of the file #). First character must not be 0-9 or _.

Opt 1 character Field indicating whether you want to define Optional. No default. each report for printing. To define a report, enter a “1" in the Opt field next to the report.

Release 3.4.0 105 User Guide - IBM® i Component Overview

Field Name Format Description Comments

Postal Code 1 character A code indicating whether or not you want the Optional. Default is N. Differences Postal Code Differences Report to be printed. Enter Y to print the report, N to suppress the report.

Standardized 1 character A code indicating whether or not you want the Optional. Default is N. Address Standardized Address Differences Report to be Differences printed. Enter Y to print the report, N to suppress the report.

City Name 1 character A code indicating whether or not you want the Optional. Default is N. Differences City Name Differences Report to be printed. Enter Y to print the report, N to suppress the report.

Uncoded/Un 1 character A code indicating whether or not you want the Optional. Default is N. matched Uncoded/Unmatched Records Report to be Records printed. Enter Y to print the report, N to suppress the report.

Define Differences/Uncoded Reports Screen (C6CPUD01) - Function Keys

Function Key Name Description

F3 Exit Return to the Report Selection screen (C6CPRP10) without saving your report definitions.

F6 Print Report Print the report(s) selected.

Release 3.4.0 106 User Guide - IBM® i Chapter 5: Generating Reports Component Overview Postal Code Differences Screen (C6CPUD21)

To access this screen: Enter a 1 in front of the Postal Code Differences Report on the Define Differences/Uncoded Reports Screen (C6CPUD01). This screen allows you to define the input and output locations of the various elements that you want printed on the Postal Code Differences Report, as well as print positions and column headings for those elements on the report. Canadian CODE-1 Plus will automatically fill in the input and output positions and lengths of the postal code, first address line, city name, and province abbreviation. You will have to supply input and output positions and lengths for any additional elements you want to be printed on the report.

Canadian CODE-1 Plus C6CPUD00 Replace with screen heading desired C6CPUD21 Define Differences/Uncoded Reports Postal Code Differences

Specify field record positions and print positions.

Input Output Print Field Content Pos Len Pos Len Pos Column Heading POSTAL CODE POSTAL CODE ADDRESS LINE 1 INPUT ADDRESS LINE 1 ADDRESS LINE 2 INPUT ADDRESS LINE 2 CITY NAME CITY PROV. ABBREVIATION PROVINCE

Bottom F3=Exit F6=Update F10=Add lines F12=Cancel F15=Limit Input

Postal Code Differences Screen (C6CPUD21) - Fields

Field Name Format Description Comments

Input Pos 1 to 4 digits Input file location for the element to print on the Required. No report default.

Input Len 1 to 2 digits Length of the input file element Required. No default.

Output Pos 1 to 4 digits Position of element in the output file Required. No default.

Output Len 1 to 2 digits Length of the element in the output file Required. No default.

Print Pos 1 to 3 digits Position in which to print this element on the Required. No report line default.

Column Heading 1 to 25 Column heading that should appear over this Optional. No characters element on the report default.

Release 3.4.0 107 User Guide - IBM® i Component Overview Postal Code Differences Screen (C6CPUD21) - Function Keys

Function Key Name Description

F3 Exit Return to the Report Selection screen (C6CPRP10) without saving your report definitions.

F6 Update Save your report definition, and return to the Report Selection screen (C6CPRP10).

F10 Add lines Add additional blank lines.

F12 Cancel Return to the Define Differences/Uncoded Reports screen (C6CPUD01) without saving your report definitions.

F15 Limit Input Go to the Define Difference Uncoded Reports screen (C6CPUD80).

Release 3.4.0 108 User Guide - IBM® i Chapter 5: Generating Reports Component Overview Standardized Address Differences Screen (C6CPUD21)

To access this screen: Enter a 1 in front of the Standardized Address Differences Screen (C6CPUD21) on the Define Differences/Uncoded Reports Screen (C6CPUD01) This screen allows you to define the input and output locations of the various elements that you want printed on the Standardized Address Differences Report, as well as print positions and column headings for those elements on the report. Canadian CODE-1 Plus will automatically fill in the input positions and lengths of the first address line and the postal code, and the output positions and lengths of the standardized address and the postal code. You will have to supply input and output positions and lengths for any additional elements you want to be printed on the report.

Canadian CODE-1 Plus C6CPUD00 C6CPUD21 Define Differences/Uncoded Reports Standardized Address Differences

Specify field record positions and print positions.

Input Output Print Field Content Pos Len Pos Len Pos Column Heading ADDRESS LINE 1 INPUT ADDRESS LINE 1 ADDRESS LINE 2 INPUT ADDRESS LINE 2 STANDARDIZED ADDRESS CITY POSTAL CODE PROVINCE

Bottom F3=Exit F6=Update F10=Add lines F12=Cancel F15=Limit Input

Standardized Address Differences Screen (C6CPUD21) - Fields

Field Name Format Description Comments

Input Pos 1 to 4 digits Input file position for the element to print Required. No default.

Input Len 1 to 2 digits Input file length of the element to print Required. No default.

Output Pos 1 to 4 digits Output position of the element Required. No default.

Output Len 1 to 2 digits Length of the output file element Required. No default.

Print Pos 1 to 3 digits Report line position for this element Required. No default.

Column 1 to 25 Report column heading that should appear over Optional. No default. Heading characters this element

Release 3.4.0 109 User Guide - IBM® i Component Overview Standardized Address Differences Screen (C6CPUD21) - Function Keys

Function Key Name Description

F3 Exit Return to the Report Selection screen (C6CPRP10) without saving your report definitions.

F6 Update Save your report definition, and return to the Report Selection screen (C6CPRP10).

F10 Add lines Add additional blank lines.

F12 Cancel Return to the Define Differences/Uncoded Reports screen (C6CPUD01) without saving your report definitions.

F15 Limit Input Go to the Define Difference Uncoded Reports screen (C6CPUD80).

Release 3.4.0 110 User Guide - IBM® i Chapter 5: Generating Reports Component Overview City Name Differences Screen (C6CPUD21)

To access this screen: Enter a 1 in front of the City Name Differences Report on the Define Differences/Uncoded Reports Screen (C6CPUD01). This screen allows you to define the input and output locations of the various elements that you want printed on the City Name Differences report, as well as print positions and column headings for those elements on the report. Canadian CODE-1 Plus will automatically fill in the input and output positions and lengths of the city name, province abbreviation, postal code, and first address line. You will have to supply input and output positions and lengths for any additional elements you want to be printed on the report.

Canadian CODE-1 Plus C6CPUD00 Replace with screen heading desired C6CPUD21 Define Differences/Uncoded Reports City Name Differences

Specify field record positions and print positions.

Input Output Print Field Content Pos Len Pos Len Pos Column Heading POSTAL CODE POSTAL CODE ADDRESS LINE 1 INPUT ADDRESS LINE 1 ADDRESS LINE 2 INPUT ADDRESS LINE 2 CITY NAME CITY PROV. ABBREVIATION PROVINCE

Bottom F3=Exit F6=Update F10=Add lines F12=Cancel F15=Limit Input

City Name Differences Screen (C6CPUD21) - Fields

Field Name Format Description Comments

Input Pos 1 to 4 digits Input file position of the element you want to Required. No print on the report default.

Input Len 1 to 2 digits Length of the input file element Required. No default.

Output Pos 1 to 4 digits Position of the element in the output file Required. No default.

Output Len 1 to 2 digits Length of the element in the output file Required. No default.

Print Pos 1 to 3 digits Position to print this element on the report line Required. No default.

Column Heading 1 to 25 Column heading to print over this element on Optional. No characters the report default.

Release 3.4.0 111 User Guide - IBM® i Component Overview City Name Differences Screen (C6CPUD21) - Function Keys

Function Key Name Description

F3 Exit Return to the Report Selection screen (C6CPRP10) without saving your report definitions.

F6 Update Save your report definition, and return to the Report Selection screen (C6CPRP10).

F10 Add lines Add additional blank lines.

F12 Cancel Return to the Define Differences/Uncoded Reports screen (C6CPUD01) without saving your report definitions.

F15 Limit Input Go to the Define Difference Uncoded Reports screen (C6CPUD80).

Release 3.4.0 112 User Guide - IBM® i Chapter 5: Generating Reports Component Overview Uncoded/Unmatched Screen (C6CPUD21)

To access this screen: Select the Uncoded/Unmatched report (option 1) on screen C6CPUD01. This screen allows you to define the input and output locations of the various elements that you want printed on the Standardized Address Differences Report, as well as print positions and column headings for those elements on the report. Canadian CODE-1 Plus will automatically fill in the input and/or output positions and lengths of the general return code, first address line, city name, province, and postal code. You will have to supply input and output positions and lengths for any additional elements you want to be printed on the report.

Canadian CODE-1 Plus C6CPUD00 Replace with screen heading desired C6CPUD21 Define Differences/Uncoded Reports Uncoded/Unmatched

Specify field record positions and print positions.

Input Output Print Field Content Pos Len Pos Len Pos Column Heading GENERAL RETURN CODE RETURN CODE/EXPLANATION ADDRESS LINE 1 ADDRESS LINE 1 ADDRESS LINE 2 ADDRESS LINE 2 CITY NAME CITY PROV. ABBREVIATION PROVINCE POSTAL CODE POSTAL CODE

Bottom F3=Exit F6=Update F10=Add lines F12=PrevScrn F15=Limit Input

Uncoded/Unmatched Screen (C6CPUD21) - Fields

Field Name Format Description Comments

Input Pos 1 to 4 digits Input file position for the element you want to Required. No default. print on the report

Input Len 1 to 2 digits Input file length of the element Required. No default.

Output Pos 1 to 4 digits Position of the element in the output file. Required. No default.

Output Len 1 to 2 digits Length of the element in the output file Required. No default.

Print Pos 1 to 3 digits Starting position to print this element on the Required. No default. report line

Column 1 to 25 Column heading to appear over this element on Optional. No default. Heading characters the report

Release 3.4.0 113 User Guide - IBM® i Component Overview Uncoded/Unmatched Screen (C6CPUD21) - Function Keys

Function Key Name Description

F3 Exit Return to the Report Selection screen (C6CPRP10) without saving your report definitions.

F6 Update Save your report definition, and return to the Report Selection screen (C6CPRP10).

F10 Add lines Add additional blank lines.

F12 PrevScrn Return to the Define Differences/Uncoded Reports screen (C6CPUD01) without saving your report definitions.

F15 Limit Input Go to the Define Difference Uncoded Reports screen (C6CPUD80).

Release 3.4.0 114 User Guide - IBM® i Chapter 5: Generating Reports Component Overview Define Differences/Uncoded Reports (C6CPUD80) Screen

To access this screen: Select F15 from any of the C6CPUD21 screens. This screen allows you to specify how many records to skip, a fraction to which the processing should be limited, the number of records to process, and the maximum number of pages to print.

Canadian CODE-1 Plus C6CPUD00 Replace with screen heading desired C6CPUD80 Define Differences/Uncoded Reports

Skip records at beginning of file, if desired.

Records to skip . . .

Limit processing to a fraction of the input records, if desired.

Decimal fraction. . Stop processing after a number of records, if desired. Record Limit . . . . OR Stop processing after a number of pages, if desired. Page Print Limit . .

F3=Exit F12=Cancel

Define Differences/Uncoded Reports (C6CPUD80) Screen - Fields

Field Name Format Description Comments

Records to skip Up to 7 Number of records Canadian CODE-1 Plus Optional. No default. characters will skip before selecting the first record.

Decimal fraction Up to 8 digits Number indicating the portion of the records Optional. No default. in the file that will be processed. Canadian CODE-1 Plus assumes a decimal point before the first digit.

Record Limit Up to 7 digits Maximum number of records Canadian Optional. No default. CODE-1 Plus will read from the input file.

Page Print Limit Up to 7 digits Maximum number of pages Canadian Optional. No default. CODE-1 Plus will print.

Define Differences/Uncoded Reports (C6CPUD80) Screen - Function Keys

Function Key Name Description

F3 Exit Return to the Report Selection screen (C6CPRP10) without saving your report definitions.

F12 Cancel Return to the screen from which you accessed C6CPUD80 without saving your report definitions.

Release 3.4.0 115 User Guide - IBM® i Processing Summary Reports Analysis of Matched Records Report

The Analysis of Matched Records Report shows the total number of records that were processed and the number of processed records successfully matched. The report also provides match details on input directionals, suffixes, and apartment numbers. The report indicates the quality of the input file using “Probable Correctness” values. Probable correctness reflects the amount of change between the input addresses and the output addresses as a result of Canadian CODE-1 Plus processing. Probable correctness is measured on a relative scale of 0-9. A value of 0 means that no change occurred during the match process; a value of 9 means that substantial changes occurred. The last field on the report contains a combined probable correctness percentage for the entire input file. If any report field has a value of 0, the field will not appear in the report; therefore, not all fields will appear on every report.

Processing Summary Reports

The Processing Summary reports show — by province, list code, or FSA Code — totals for the following categories:

• Records Processed — Number of records processed for this job • Address Mismatches — Number of records for which no address could be determined • Multiple Matches — Number of records for which multiple matches were found • Unique Matches — Number of records for which there was only a single, unique match determined • Number of Postal Codes Stored — Number of records that were stored with postal codes • Percentage of Postal Codes Stored — Percentage of total number of records stored that were stored with postal codes • Number of Records Stored With Standardized Addresses — Number of records stored with standardized addresses • Percentage of Records Stored with Standardized Addresses — Percentage of total number of records stored that were stored with standardized addresses • Number of Records Stored With City and Province — Number of records stored with matched municipality and province information • Percentage of Records Stored With City and Province — Percentage of total number of records stored that were stored with matched municipality and province.

Parameters Listing Report

This report shows all of the parameters that are used to define a particular job. This report is printed automatically when a job is run. If you need to call Pitney Bowes Technical Support about a problem with any of your jobs, please have this report available for reference.

Control Totals Report

The Control Totals Report shows statistics about processed, matched, and unmatched records for a job. Three copies of this report are printed for each job: Total Record Counts, Urban Record Counts Only, and Rural Record Counts Only. These reports are printed automatically; you cannot turn this feature off. If you need to call Pitney Bowes Technical Support about a problem, please have this report handy for reference. Numbers and percentages are listed for the following:

Release 3.4.0 116 User Guide - IBM® i Chapter 5: Generating Reports Execution Log

• Name/Address Records Processed—The number of records that were processed from your input file. This category is further broken down into statistics about the way in which the output postal code was determined. • Total Unmatched Records—Statistics for the mismatches found when comparing your input records with the Canadian CODE-1 Plus database. • Total Records Successfully Matched—The total number of records that were successfully matched and stored on the output file. • Standard Address not stored, multiple matches—The number of records that were not stored because there were multiple address matches. • Standard Address Stored Successfully—The number of records stored with valid standardized addresses. • Records Matching CPC Record Types—The number of records matched, broken down by the Canada Post Corporation Record Types. • Records Receiving RRnn (Rural Route) Route Service ID—The number of records that were assigned route service ID codes based on the route. • Total Records Written, File C6BMCOK—The number of records written to the output file C6BMCOK (records that were validated). • Total Records Written, File C6BMCOR—The number of records written to the output file C6BMCOR (records that were corrected). • Total Records Written, File C6BMIPC—The number of records written to the output file C6BMIPC (records that had invalid input postal codes). • Total Records Written, File C6BMNCO—The number of records written to the output file C6BMNCO (records that could not be coded for some reason other than an invalid input postal code).

Execution Log

The Execution Log shows you the steps that Canadian CODE-1 Plus executes when processing your name/address file. This report is generated automatically while your job is running; you cannot turn this feature off. The Execution Log Report is helpful if your job abends, because it tells you how far the job got before it terminated. If you need to call Pitney Bowes Technical Support about a problem with any of your jobs, please have this report handy for reference.

Statement of Address Accuracy

The Statement of Address Accuracy is the form Canada Post Corporation requires for you to receive discounts on your mailing. This report lists the software version number and the database date that were used to process the file. In addition, if you have included the CUSADx and FILENM parameters in your job, this report will print the customer name and address, as well as the address file name, on the report. If you did not include these parameters in your job, these fields are left blank on the Statement of Address Accuracy, but you can fill in those fields by hand before submitting the report to the CPC. This report also includes the following: • Number of records processed • Date on which the file was processed • Address Accuracy level The following process is used to calculate the Address Accuracy Level percentage: 1. Determine the numerator, which is the total number of records validated/corrected successfully. These numbers are available from the Total Record Counts report section.

Release 3.4.0 117 User Guide - IBM® i Return Code Analysis Reports

2. Determine the denominator, which is the number of name-and-address records processed minus those processed from foreign records (if there were foreign records in your input file). 3. Divide the numerator by the denominator. 4. Multiply that number by 100.

Return Code Analysis Reports

The Return Code Analysis Report shows you counts for each combination of return codes in the fixed-fielded analysis codes. For each return code combination, this report shows: • Total Records • Urban Records • Rural Records • Percentage of Processed Note that this report can be sorted either by frequency of the return code combinations, or alphabetically by the return code combinations, depending on the options you specify on the REPORT parameter. In addition, you can use the REPORT parameter to specify a minimum reporting threshold for this report. Including a minimum reporting threshold will ensure that analysis code combinations for which there were very few records will not be included in this report. This threshold can be expressed as either a quantity or a percentage. This report is broken down by correctable and valid records.

 Only the first 23 bytes of the analysis return codes are included on these reports. No data is printed for the numeric counters at the end of the analysis return codes string.

Release 3.4.0 118 User Guide - IBM® i Running Jobs 6

In this chapter

 Overview ...... 120  Files and File Names ...... 120  Exit Routines ...... 120  Submit Canadian CODE-1 Plus Job Screen (C6CPSB01) . . . . .123  Submit Canadian CODE-1 Plus Job Screen (C6CPSB02) . . . . .126  Submit Canadian CODE-1 Plus Job Screen (C6CPSB03) . . . . .130  Limit Processing Screen (C6CPSB90) ...... 132 Files and File Names Overview

The Submit Batch Job component allows you to: • Limit the number of records processed • Specify input file details • Identify an input exit routine • Specify output file details • Identify output file exit routines • Test the parameters • Submit the job to run.

Files and File Names

Canadian CODE-1 Plus has four files that you can identify for your job: one input file and three output files. The program has internal names for each of these files, and these internal names will be printed on the reports and on the FILEDF parameter, regardless of the actual file, library, and member names of these files. Through the Submit Batch Job component, you will identify file, library, and member names for some or all of the following files: • C6BMNAM - This required file is your input name/address file. • C6BMCOK - This required file is the output file to which Canadian CODE-1 Plus will write all of the records that were verified or corrected. • C6BMNCO - This optional file is the output file to which Canadian CODE-1 Plus will write all of the records that had valid input Postal Codes (for example, the Postal Codes were valid somewhere in Canada) but were not matched for some reason. If you do not identify this file, these records will be written to the C6BMCOK file along with the records that were successfully matched. • C6BMIPC - This optional file is the output file to which Canadian CODE-1 Plus will write all of the records that had invalid input Postal Codes. An invalid input Postal Code is one that is not valid anywhere in Canada. If you do not identify this file, these records will be written to the C6BMNCO file (if it is identified) or the C6BMCOK file (if the C6BMNCO file is not identified).

Exit Routines

The Submit Batch Job component gives you the option of specifying an input exit routine that Canadian CODE-1 Plus should call each time it is ready to read a record from your input name/address file, and an output exit routines that Canadian CODE-1 Plus should call each time it is ready to write a record to one of your output files. If you are using an input exit routine, instead of reading the record, Canadian CODE-1 Plus will call your exit routine and wait for the exit routine to pass a record back. If you are using an output exit routine, instead of writing the record to the file, Canadian CODE-1 Plus will pass the record to the output exit routine. For example, you might have an input exit routine named CODEIT that adds a special code to a record. If you want to add that code to each record before the record is passed to Canadian CODE- 1 Plus, you would specify CODEIT as the name of the exit routine. Then, every time Canadian CODE-1 Plus is ready to accept a record, it passes control to CODEIT, which reads the record, adds the code to the record, and then passes the record to Canadian CODE-1 Plus so that Canadian CODE-1 Plus may process that record. The flow charts on the following page show how Canadian CODE-1 Plus processes with or without exit routines.

Release 3.4.0 120 User Guide - IBM® i Chapter 6: Running Jobs Files and File Names

Figure 1: Canadian CODE-1 Plus Processing Methods

Release 3.4.0 121 User Guide - IBM® i Files and File Names

When you indicate that Canadian CODE-1 Plus should call an exit routine, it will call that exit routine with the following four parameters in the linkage section at each I/O request. • PARM1 (EXITP1): This parameter is a total of 9 bytes, and has two components, as follows: • Bytes 1-8 (EXITFN): The internal program file name (C6BMNAM, C6BMCOK, C6BMNCO, or C6BMIZP) • Byte 9 (EXITFC): Function indicator. This byte will contain one of the following codes to tell your program what type of processing to perform: – O Open the input or output file. – R Read a record from the input file. – W Write a record to the output file. – C Close the input or output file. • PARM2 (EXITP2): This parameter is a total of 10 bytes, and has two components, as follows: – Bytes 1-3 (EXITRL): The record length (4-digit length packed into a 3-byte field) that must be set according to the value of EXITFC as follows:

EXITFC EXITRL

O Maximum record length

R Current record length for each read

W n/a

C n/a

– Bytes 4-10 (EXTRSV): Reserved area • PARM3 (EXITP3): This parameter contains the output record to be passed from Canadian CODE-1 Plus to your program (when EXITFC is W), or the input record to be passed from your program to Canadian CODE-1 Plus (when EXITFC is R). The length of this parameter will be the length specified by EXITRL above (maximum of 9999). • PARM4 (EXITP4): This parameter contains the card image of your FILEDF parameter, and is 80 bytes in length.

Release 3.4.0 122 User Guide - IBM® i Chapter 6: Running Jobs Files and File Names Submit Canadian CODE-1 Plus Job Screen (C6CPSB01)

To access this screen: Choose the Submit Batch Job function from the Define/Submit Canadian CODE-1 Plus Job screen (C6CPDS01), or position your cursor on the job to submit, then press F14 from the Work with Jobs screen (C6CPMM03).

The Submit Canadian CODE-1 Plus Job screens allow you to change the input file details. You must page down to see the second Work with Jobs screen.

Canadian CODE-1 Plus C6CPSB00 C6CPSB01 Job MYJOB Submit Canadian CODE-1 Plus Job

Input N/A file ...... G1IVPC6 Exit Routine Library...... G1IVP - OR - Member ...... *FIRST Job description...... QDFTJOBD Library...... QGPL Job name ...... @MYJOB0013 Database Library ...... G1C6FILES Override output file reclen. 662 [CONFIG] Address type matching option . N=Match street (D) Y=Match PO Box Inp addr line matching option. S=Street address first (D) P=PO Box/RR first Return inp data w/valid recs . N=CPC database (D) Y=Input address Minimum Overall Correctness . 0-9 Basic address correction . . . C=Perform correction (D) V=Validation only Force correction ...... N=Do not change (D) Y=Change to match LVR or single-single record More...

F3=Exit F6=Submit F7=Parm Test F15=Limit Input

Submit Canadian CODE-1 Plus Job Screen (C6CPSB01) - Fields

Field Name Format Description Comments

Input N/A file 1 to 10 characters The name of the file that contains your Required if you don't use an (A-Z, 0-9, $, @, or input name/address file. exit routine Default is the file #). First character name you specified on the must not be 0-9. Create New Job screen (C6CPNJ01).

Library (Input 1 to 10 characters The name of the library that holds the Required if you don't use an N/A file) (A-Z, 0-9, $, @, or input name/address file. exit routine. Default is the #). First character library name you specified on must not be 0-9. the Create New Job screen (C6CPNJ01).

Member 1 to 10 characters The member of the file that holds your Required if you don't use an (A-Z, 0-9, $, @, or input name/addresses. exit routine. Default is the #). First character member name you specified must not be 0-9. on the Create New Job screen (C6CPNJ01).

Exit Routine 1 to 10 characters The name of the input exit routine that Required if you don't enter an (A-Z, 0-9, $, @, or should be used to pass records to Input N/A File. #). First character Canadian CODE-1 Plus. must not be 0-9.

Job description 1 to 10 characters The name of the object that contains Required. Default is the job (A-Z, 0-9, $, @, or job processing details that should be description you specified on #). First character used for this job. the Create New Job screen must not be 0-9. (C6CPNJ01).

Release 3.4.0 123 User Guide - IBM® i Files and File Names

Field Name Format Description Comments

Library (Job 1 to 10 characters The name of the library that holds the Required. Default is the description) (A-Z, 0-9, $, @, or job description named above. library name you specified on #). First character the Create New Job screen must not be 0-9. (C6CPNJ01).

Job name 1 to 10 characters The unique name of this job as it is Required. Default is a (A-Z, 0-9, $, @, or defined in the system. combination of the job ID and #). First character the sequence number based must not be 0-9. on the number of times the job has been submitted.

Database 1 to 10 characters Library containing the Canadian Required. No default. Library (A-Z, 0-9, $, @, or CODE-1 Plus postal database against #). First character which the records are matched must not be 0-9.

Override Output Numeric value Specify whether to override the Default is the calculated File Reclen from 1-9999 calculated output file record length as output file record length calculated by the MOVEO definition.

Address Type 1 character Define the processing of input Optional. Default is N. Matching Option addresses containing both street address information and PO Box information. N Try to match the street information first. If no match is found, try to match using the PO Box information. Y If Canadian CODE-1 Plus cannot match the PO Box information, the software will match to street address information, if it exists and is matchable. blank Default is N. This field is optional.

Inp addr line 1 character Define the processing of input This field is optional. Default matching option addresses that contain both a civic and is S. non-civic component (for example, a street address and either a rural route or PO Box). This code indicates the component to use for the initial match attempt. Enter one of the following: P Use the PO Box or rural route component first S Use the street address component first blank Default is S. Position 8 of the ADDRDF parameter must contain L to use this function. This position is ignored if you enter Y in position 26.

Return inp[ut] 1 character Define posting options for addresses This field is optional. If data w/valid that are considered valid as entered posting the correction/ rec[ord]s (as input). validation code, these N Perform standardization to the addresses will have a return CPC database code of "V." Y Write input to output when address is valid blank Default is N.

Release 3.4.0 124 User Guide - IBM® i Chapter 6: Running Jobs Files and File Names

Field Name Format Description Comments

Minimum Overall 1 digit Define the minimum acceptable overall Optional. No default. Correctness probability of correctness score. Enter a value between 0 and 9, where 0 indicates the worst case and 9 indicates the best case. If this field is blank, this value is overridden by other parameter definitions.

[Perform] Basic 1 character Define an address matching validation Optional. Default is C. Address option. This field is optional Correction C Perform address validation and correction V Perform validation only blank Default is C.

Force correction 1 character Define the processing of input data Optional. Default is N. [based on LVR identified as an LVR record (Large or Single-Single Volume Receiver) or a single-single CPC data record (only one record for that Postal record] Code/street name/street type). This definition indicates whether to adjust the civic and/or the suite information to match the street record in the CPC data. Y Change the civic and/or suite information to match the LVR or single-single record. If you enter Y in this field, Canadian CODE-1 Plus suppresses the Statement of Address Accuracy, because this is not a SERP-recognized setting. N (default) Do not change the civic and/or suite information to match the LVR or single- single record. Canadian CODE-1 Plus will mark the LVR record as a valid but non- correctable record (VN). The single-single record will be corrected, if possible, or processed as a non- correctable record. blank Default is N.

Submit Canadian CODE-1 Plus Job Screen (C6CPSB01) - Function Keys

Function Key Name Description

F3 Exit Return to the Define and/or Submit a Batch Job screen (C6CPDS01) without submitting this job.

F6 Submit Submit this job and return to the Define and/or Submit a Batch Job screen.

F7 Parm test Without submitting this job, test the parameters that have been generated for this job.

F15 Limit Input Proceed to the Limit the Input for a Labels Job screen (C6CPSB90).

Release 3.4.0 125 User Guide - IBM® i Files and File Names Submit Canadian CODE-1 Plus Job Screen (C6CPSB02)

To access this screen: Select Submit batch Job (option 2 or option 6) from the Define/Submit Canadian CODE-1 Plus Job screen. Page down from screen C6CPSB01. Screen C6CPBS02 allows you to enter the file names, libraries, and member names of your output file(s).

Canadian CODE-1 Plus C6CPSB00 C6CPSB02 Job MYJOB Submit Canadian CODE-1 Plus Job

Select Address Matching output files. Validated coded output file...... C6NAMMYJOB Exit Routine Library...... G1IVP Member ...... CODED or Req'd Reclen: 662 Existing File Reclen: 662 Delete Existing File? Correctable coded output file. . N . . C6NAMMYJOB Library...... G1IVP Member ...... CORRECTED or Req'd Reclen: 662 Existing File Reclen: 662 Delete Existing File? Invalid postal code file . . . . N . . C6NAMMYJOB Library...... G1IVP Member ...... INVPCD or Req'd Reclen: 662 Existing File Reclen: 662 Delete Existing File? Uncoded records file ...... Y . . C6NAMMYJOB Library...... G1IVP Member ...... UNCODED or Req'd Reclen: 662 Existing File Reclen: 662 Delete Existing File? Bottom F3=Exit F6=Submit F7=Parm Test F15=Limit Input

Submit Canadian CODE-1 Plus Job Screen (C6CPSB02) - Fields

Field Name Format Description Comments

Validated coded 1 to 10 characters Name of the output file to which Required if you don't use output file (A-Z, 0-9, $, @, or successfully matched records are written an exit routine. No default. #). First character must not be 0-9.

Library 1 to 10 characters Library that contains the Successfully Required if you don't use (Validated (A-Z, 0-9, $, @, or Coded output file an exit routine. No default. coded output #). First character file) must not be 0-9.

Member 1 to 10 characters File member containing the Successfully Required if you don't use (Validated (A-Z, 0-9, $, @, or Coded output file an exit routine. No default. coded output #). First character file) must not be 0-9.

Exit Routine 1 to 10 characters Output exit routine to which your Required if you don't enter (Validated (A-Z, 0-9, $, @, or successfully coded records are passed a Successfully coded coded output #). First character output file. file) must not be 0-9.

Req’d Reclen 1 to 10 characters Display field that shows the required Display field; cannot be (Validated (A-Z, 0-9, $, @, or length of output files or files passed to changed except through coded output #). First character output exit routines. This value is based parameter definitions file) must not be 0-9. on the required output record length (reclen) you defined for this job.

Release 3.4.0 126 User Guide - IBM® i Chapter 6: Running Jobs Files and File Names

Field Name Format Description Comments

Existing File Numeric Display field that shows the actual length Display field; cannot be Reclen of output files or files passed to output changed (Validated exit routines. Compare this field to the coded output Req’d Reclen field to determine if the file) length is valid.

Delete Existing Character: Y or N You have the option to delete the File? (Validated validated coded output file if its length coded output does not match the required record file) length (reclen). Compare the "Req'd reclen" to the "Existing file reclen" to make your decision. Y Delete this file: This is the default if the required record length is not equal to the existing file reclen. N (Default) Do not delete this file.

NOTE: If you specify "N," ("do not delete this file") and the Req'd Reclen of the validated coded output file length does not match the existing reclen, the job will fail.

[Produce] Character: Y or N Y Create this file. Correctable N Do not create this file. coded output file

Correctable 1 to 10 characters File name to which correctable records Required if you don't use coded output file (A-Z, 0-9, $, @, or are written. an exit routine. No default. #). First character must not be 0-9.

Library 1 to 10 characters Library containing the correctable output Required if you don't use (Correctable (A-Z, 0-9, $, @, or file an exit routine. No default. coded output #). First character file) must not be 0-9.

Member 1 to 10 characters Output file containing the correctable Required if you don't use (Correctable (A-Z, 0-9, $, @, or records output file an exit routine. No default. coded output #). First character file) must not be 0-9.

Exit Routine 1 to 10 characters Output exit routine to which your Required if you don't enter (Correctable (A-Z, 0-9, $, @, or correctable/coded records are passed a correctable/coded coded output #). First character output file. file) must not be 0-9.

Req’d Reclen 1 to 10 characters Display field; cannot be changed except (Correctable (A-Z, 0-9, $, @, or through parameter definitions coded output #). First character file) must not be 0-9.

Existing File Display field that Display field; cannot be changed Display field that shows Reclen shows the actual the actual length of output (Correctable length of output files or files passed to coded output files or files passed output exit routines. file) to output exit Compare this field to the routines. Compare Req’d Reclen field to this field to the determine if the length is Req’d Reclen field valid. to determine if the length is valid.

Release 3.4.0 127 User Guide - IBM® i Files and File Names

Field Name Format Description Comments

Delete Existing Character: Y or N You have the option to delete the Display field; cannot be File? correctable coded output file if its length changed except through (Correctable does not match the required record parameter definitions coded output length (reclen). Compare the "Req'd file) reclen" to the "Existing file reclen" to make your decision. Y Delete this file: This is the default if the required record length is not equal to the existing file reclen. N (Default) Do not delete this file.

[Produce] Character: Y or N Y Create this file. Invalid Postal N Do not create this file. Code File

Invalid Postal 1 to 10 characters Output file to which records with invalid Required if you defined Code File (A-Z, 0-9, $, @, or input postal codes should be written this file and you don't use (name) #). First character an exit routine. No default. must not be 0-9.

Library (Invalid 1 to 10 characters Library that contains the Invalid Postal Required if you defined Postal Code (A-Z, 0-9, $, @, or Code File this file and you don't use File) #). First character an exit routine. No default. must not be 0-9.

Member (Invalid 1 to 10 characters Member of the file containing the Required if you defined Postal Code (A-Z, 0-9, $, @, or Successfully Coded output file this file and you don't use File) #). First character an exit routine. No default. must not be 0-9.

Exit Routine 1 to 10 characters Output exit routine to which your Required if you don't enter (Invalid Postal (A-Z, 0-9, $, @, or valid/coded output records are passed a Validated/coded output Code File) #). First character file name. must not be 0-9.

Req’d Reclen 1 to 10 characters Display field that shows the required Display field; cannot be (Invalid postal (A-Z, 0-9, $, @, or length of output files or files passed to changed except through code output file) #). First character output exit routines. This value is based parameter definitions must not be 0-9. on the required output record length (reclen) you defined for this job.

Existing File Numeric Display field that shows the actual length Display field; cannot be Reclen (Invalid of output files or files passed to output changed postal code exit routines. Compare this field to the output file) Req’d Reclen field to determine if the length is valid.

Delete Existing Character: Y or N You have the option to delete the File? (Validated validated coded output file if its length coded output does not match the required record file) length (reclen). Compare the "Req'd reclen" to the "Existing file reclen" to make your decision. Y Delete this file: This is the default if the required record length is not equal to the existing file reclen. N (Default) Do not delete this file.

[Produce] Character: Y or N Y Create this file. Required. Default is Y. Uncoded N Do not create this file. Records File (indicator)

Release 3.4.0 128 User Guide - IBM® i Chapter 6: Running Jobs Files and File Names

Field Name Format Description Comments

Uncoded 1 to 10 characters Output file to which the records that could Required if you don't use Records File (A-Z, 0-9, $, @, or not be matched should be written an exit routine. No default. (name) #). First character must not be 0-9.

Library 1 to 10 characters Library that holds the Uncoded Records Required if you don't use (Uncoded (A-Z, 0-9, $, @, or output file an exit routine. No default. Records File) #). First character must not be 0-9.

Member 1 to 10 characters Member of the file containing the Required if you don't use (Uncoded (A-Z, 0-9, $, @, or Uncoded Records output file an exit routine. No default. Records File) #). First character must not be 0-9.

Exit Routine 1 to 10 characters Output exit routine to which your Required if you don't enter (Uncoded (A-Z, 0-9, $, @, or successfully coded records should be a Successfully Coded Records File) #). First character passed output file must not be 0-9.

Req’d Reclen 1 to 10 characters Display field that shows the required Display field; cannot be (Uncoded (A-Z, 0-9, $, @, or length of output files or files passed to changed except through Records file) #). First character output exit routines. This value is based parameter definitions must not be 0-9. on the required output record length (reclen) you defined for this job.

Existing File Numeric Display field that shows the actual length Display field; cannot be Reclen of output files or files passed to output changed (Uncoded exit routines. Compare this field to the Records file) Req’d Reclen field to determine if the length is valid.

Delete Existing Character: Y or N You have the option to delete the File? (Uncoded uncoded records file if its length does not Records file) match the required record length (reclen). Compare the "Req'd reclen" to the "Existing file reclen" to make your decision. Y Delete this file: This is the default if the required record length is not equal to the existing file reclen. N (Default) Do not delete this file.

Submit Canadian CODE-1 Plus Job Screen (C6CPSB02) - Function Keys

Function Key Name Description

F3 Exit Return to the Define/Submit Canadian CODE-1 Plus Job screen (C6CPDS01) without submitting this job.

F6 Submit Submit this job and return to the Define/Submit Canadian CODE-1 Plus Job screen.

F7 Parm test Without submitting this job, test the parameters that have been generated for this job.

F15 Limit Input Proceed to the next Submit Canadian CODE-1 Plus Job screen (C6CPSB90).

Release 3.4.0 129 User Guide - IBM® i Files and File Names Submit Canadian CODE-1 Plus Job Screen (C6CPSB03)

To access this screen: Select Submit Batch Job (option 2 or option 6) from the Define/Submit Canadian CODE-1 Plus Job screen. Page down from screen C6CPSB02.

Use screen C6CPSB03 to specify a user-defined output exit routine (EXITOP) that Canadian CODE-1 Plus will call to process coded records before writing each record to the output file. Use this screen to define the exit routine name, optional processing flag, and user data to pass to the exit routine for processing.

Canadian CODE-1 Plus C6CPSB00 C6CPSB03 Job MYJOB Submit Canadian CODE-1 Plus Job

[EXITOP] Specify operating exit routine, if desired:

Exit routine name . . C6SMCOP Identifier . . P Blank, P

User-defined data:

1 1 2 2 3 3 4 4 5 5 6 1...5....0....5....0....5....0....5....0....5....0....5....0... EXITOP INFORMATION FOR ROUTINE 123

Bottom

F3=Exit F6=Submit F7=Parm Test F15=Limit Input

Submit Canadian CODE-1 Plus Job Screen (C6CPSB03) - Fields

Field Name Format Description Comments

Exit routine 1 to 8 characters Exit routine to which your successfully Required; no default name (A-Z, 0-9, $, @, or coded records are passed #). First character must not be 0-9.

Identifier blank or "P" Specify "P" to use this program with the Optional Pitney Bowes Barcoding Option or the Geographic Coding System, and use the 2-byte file identifier as parameter 2.

User-defined Up to 64 Enter information that Canadian CODE-1 Required; no default data alphanumeric Plus will pass to your exit routine. characters

Release 3.4.0 130 User Guide - IBM® i Chapter 6: Running Jobs Files and File Names Submit Canadian CODE-1 Plus Job Screen (C6CPSB03) - Function Keys

Function Key Name Description

F3 Exit Return to the Define/Submit Canadian CODE-1 Plus Job screen (C6CPDS01) without submitting this job.

F6 Submit Submit this job and return to the Define/Submit Canadian CODE-1 Plus Job screen.

F7 Parm test Without submitting this job, test the parameters that have been generated for this job.

F15 Limit Input Proceed to the next Submit Canadian CODE-1 Plus Job screen (C6CPSB90).

Release 3.4.0 131 User Guide - IBM® i Files and File Names Limit Processing Screen (C6CPSB90)

To access this screen: Press F15 from the Work with Jobs screen. Use this screen to: • Restrict input to Range of Postal Codes • Skip records at beginning of file • Limit processing to a fraction of the input records • Stop processing after a number of records

Canadian CODE-1 Plus C6CPSB00 C6CPSB90 Job MYJOB Submit Canadian CODE-1 Plus Job

[HEADER] Restrict input to Range of Postal Codes, if desired. Low Postal Code. . . (records with lower codes will be bypassed) High Postal Code . . (record with higher code will be treated as EOF)

[FILEDF] Skip records at beginning of file, if desired. Records to skip. . .

[FILEDF] Limit processing to a fraction of the input records, if desired.

Decimal fraction . .

[FILEDF] Stop processing after a number of records, if desired.

Record Limit . . . .

F3=Exit F6=Submit F7=Parm Test F12=PrevScrn

Limiting the Number of Records Processed There are four ways to limit the number of records Canadian CODE-1 Plus processes. First, you can restrict processing to records with postal codes that fall in a particular range. Second, you can skip a portion of the file before any records are selected. Third, you can enter a cross sectional sampling number to select a portion of the records, evenly spaced throughout the file. Finally, you can specify a maximum number of records that should be processed; in this case Canadian CODE-1 Plus will start at the beginning of the file and process every record until the maximum number is reached. You may use these fields in conjunction with each other. For example, you can enter a number of records to skip, and a maximum number of records to read if you want to process the middle of the file, but not the beginning or the end.

Restricting the Postal Code Range If you choose to restrict processing to only those records within a given postal code range, you will enter a low postal code and a high postal code. Note that Canadian CODE-1 Plus assumes that your input file is sorted by postal code. For this reason, if Canadian CODE-1 Plus encounters a record with a postal code that falls below the low postal code you entered, that record will not be processed, and processing proceeds to the next record. If, however, Canadian CODE-1 Plus encounters a record with a postal code that is higher than your specified high postal code, it will assume that all remaining records have higher postal codes, and Canadian CODE-1 Plus treats record as the end of the file.

Release 3.4.0 132 User Guide - IBM® i Chapter 6: Running Jobs Files and File Names

Decimal Fraction Sampling The Decimal Fraction feature allows you to sample records throughout the file, from beginning to end, without processing sequential records. To determine the number to enter in this 7-byte field, divide the number of records you want to process by the number of records in the file. This will give you a decimal number. Drop the decimal, and enter the first 7 digits of the number. For example, you have a file with 102986 records, and you want to process 2000 records. You would divide 2000 by 102986 and get “.0194201153.” Dropping the decimal, you would enter 0194201 in the Decimal Fraction field. This will ensure that the 2000 records processed are evenly distributed throughout the file.

Limit Processing Screen (C6CPSB90) - Fields

Field Name Format Description Comments

Restrict input 6 characters Start with this postal code, and do not No default to...Low Postal process any lower postal codes. Code

Restrict input 6 characters Start with this postal code, and process No default to...High Postal backward to the lowest postal code. Code

[Number of] Number, 0000001 Start processing with the record number No default Records to skip to 9999999 specified.

[Limit to] Decimal Number, 0000001 Limit the number of records to process to A number greater fraction to 5000000 a cross-sectional sampling of the input file than 5000000 selects (fraction). Canadian CODE-1 Plus the entire file; no assumes a decimal point before the first default digit.

[Limit to] Record Number, 0000001 Read this maximum number of records No default limit to 9999999 from the input file.

Limit Processing Screen (C6CPSB90) - Function Keys

Function Key Name Description

F3 Exit Return to the Define/Submit Canadian CODE-1 Plus Job screen (C6CPDS01) without submitting this job.

F6 Submit Submit this job and return to the Define/Submit Canadian CODE-1 Plus Job screen.

F7 Parm test Without submitting this job, test the parameters that have been generated for this job.

F12 PrevScrn Return to the previous screen.

Release 3.4.0 133 User Guide - IBM® i Files and File Names

Release 3.4.0 134 User Guide - IBM® i Using G1G001 7

In this chapter

 What Is G1G001? ...... 136  Using G1G001...... 136  Input File and Header/Footer Parameters ...... 136  Report Layout and Content Parameters ...... 139  Record Selection Parameters ...... 145  Sample Control Language...... 146 Using G1G001 What Is G1G001?

G1G001 is a program that you can use to print customized reports on records from the Canadian CODE-1 Plus output files (the Canadian CODE-1 Plus output file becomes the G1G001 input file). You can: • Define which record elements to print on the report • Format those input elements with constant data • Print multiple 132-character lines per input record • Print a main header and a date on your reports • Print up to three lines of additional header • Select or reject records to print based on a list code or a mismatch reason code. If you use a mismatch reason code, you also have the option of printing a 20-character reason (derived from the reason code) • Select records by comparing pairs of fields in a single record: if the value of the first field is different from the value of the second field, the record will print • Include or exclude a specific number of records • Limit the report to a specific number of pages.

Using G1G001

To use G1G001, you must define parameters to perform the following functions:

 TIP: When printing multiple lines for each input record, the order of the parameters makes a difference. Parameters that affect a print line should be grouped together.

• Identify your input file • Print header information on your report • Identify the content and layout of your print lines • Select or reject records for processing. • Once you have defined your parameters, you will write control language and submit the job.

Input File and Header/Footer Parameters

The following parameters are used to define your input file and the header and footer lines that are to be printed on your reports: • FILEDF • HEADER • HEADxx • UFTxx • UHDxx

Release 3.4.0 136 User Guide - IBM® i Chapter 7: Using G1G001 Using G1G001

FILEDF The required FILEDF parameter is used to define the input file for the G1G001 program.

Position Field Name Description Comments

1-6 Keyword FILEDF is the only acceptable entry. Required.

8-15 File Name Name of the input file. Enter G1GNAM as Required. No default. the Input file

17 Record Format Code indicating whether the records in the Required. Default is file are fixed-length. F. F Records are fixed-length.

19-22 Record Length Length, in bytes, of the records in the file. Required. No default.

24-28 Block Size Size, in bytes, of the blocks in the file. Required. No default.

39-46 Exit Routine Name Name of the input exit routine that should be Optional. No default. called when G1G001 is ready to read a Name must be record from this file, or the name of the entered left-justified. output exit routine that should be called when G1G001 is ready to write a record to the file.

50-56 Number of Records to Number of records G1G001 should skip Optional. No default. Skip before selecting the first record.

58-64 Cross-sectional Number indicating the portion of the records Optional. No default. Sampling in the file that should be processed. G1G001 assumes a decimal point before the first digit.

66-72 Maximum Number Of Maximum number of records G1G001 Optional. No default. Records should read from or write to this file.

HEADER The required HEADER parameter enables you to enter a date and header text that identifies the report.

Position Field Name Description Comments

1-6 Keyword HEADER is the only acceptable entry. Required.

8-17 Date Date that G1G001 was executed - If you Optional. Default leave this field blank, the current system is current system date is printed on your report. date.

19-58 Header Text Any text that identifies the report. Optional. No default.

Release 3.4.0 137 User Guide - IBM® i Using G1G001 HEADxx The optional HEADxx parameter enables you to define up to three additional header lines to print at the top of the report. You can define up to six HEADxx parameters (two for each line).

Position Field Name Description Comments

1-4 Keyword HEAD is the only acceptable entry. Required.

5-6 Heading Line Enter one of the following codes to determine the line Required. Designator number and side on which this header text should be No default. printed: 1A Left side, line 1 1B Right side, line 1 2A Left side, line 2 2B Right side, line 2 3A Left side, line 3 3B Right side, line 3 The left side refers to positions 1-66, and the right side refers to positions 67-132.

7 Space Before Enter one of the following codes to tell G1G001 how Optional. Header (For This many blank lines should be printed before this header Default is S. Heading Print line: Line) S Single space (no blank lines) D Double space (one blank line) T Triple space (two blank lines)

8-73 Header Text Enter any text that you want printed on the top of your Optional. report. If you include the string “MM/DD/YY” or No default. “MM/DD/YYYY” in this field, G1G001 will print the date specified in columns 8-17 of the HEADER parameter in your header text. If columns 8-17 on the HEADER record are blank, the current system date will be used.

UFTxx The optional UFTxx parameter enables you to specify any text to print at the bottom of every page of each report. You can specify up to four footer lines.

Position Field Name Description Comments

1-3 Keyword UFT is the only acceptable entry. Required.

4 Line Number Footer line number. Enter 1, 2, 3, or 4. Required. No default.

5 Line Side Side of the footer line on which this text Required. should appear. Enter one of the following No default. codes: A Left side of the line B Right side of the line.

7-72 Footer Text Text to appear at the bottom all report pages Required. No default.

Release 3.4.0 138 User Guide - IBM® i Chapter 7: Using G1G001 Report Layout and Content Parameters

UHDxx The optional UHDxx parameter enables you to specify any additional text to print at the top of each page of each report. You can specify up to four additional header lines.

Position Field Name Description Comments

1-3 Keyword UHD is the only acceptable entry. Required.

4 Line Number Header line number. Enter 1, 2, 3, or 4. Required. No default.

5 Line Side Side of the header line on which this text Required. should appear. Enter one of the following No default. codes: A Left side of the line B Right side of the line

7-72 Header Text Text to appear at the top of all report pages Required. No Default.

Report Layout and Content Parameters

The following parameters define how the report lines look and what data prints on them: • CONTRL • CONSTANT • FORMAT • MOVE • PAGESZ • TESTIT • UNPK

 G1G001 does not generate the Execution Log.

This section describes these parameters in detail.

CONTRL The required CONTRL parameter enables you to define the following information:

• Location and length of the key code in the input records (this key code will be compared to the value entered on the SELECT parameter, explained later in this chapter, to determine whether to print the record). • Number of pages that are to be printed. • Whether or not page numbers are to be printed on the report. • Location of the mismatch reason code in the input record, and the location on the print line for the mismatch reason. • Whether to print the report in mixed case or upper case.

Release 3.4.0 139 User Guide - IBM® i Report Layout and Content Parameters

The following table lists the mismatch reason codes for G1G001. These are codes that Canadian CODE-1 Plus stores as General Return Codes. You can identify the mismatch reason code location in your input record as the location where Canadian CODE-1 Plus stored the General Return Code.

A Apartment match required M Multiple matches

B Insufficient address P Unmatched postal code

C Unmatched city name R Rte Srvc not found

D Out of sequence S Unmatched street

E External File Match U Not attempted

F Unmatched FSA V Non-deliverable ZIP + 4

H Unmatched house/box X Out of sequence

I Unmatched initial Z Unmatched ZIP Code

L Locality failure

 All input record position fields can be extended one column to the left to accommodate 4-byte values, if necessary.

Position Field Name Description Comments

1-6 Keyword CONTRL is the only acceptable entry. Required.

8-10 Key Code Location Starting position of the input key code Required. No default.

12 Length Of Key Code Length of the input key code Required. No default.

14-16 Number Of Pages Maximum number of pages of the report that Optional. are to be printed. Default is to print the entire file.

18 Page Numbers Enter a P in this column if you want page Optional. numbers printed on your report. These page No default. numbers will be printed in positions 125-132 of the first header line.

20-22 Mismatch Reason Starting input record position of the 1- Optional. Code Location character mismatch reason code. Only No default. records with a non-blank character in this position will be eligible for printing. If you do not enter a location, all records will be eligible for printing.

24-26 Mismatch Reason Print Print line position for the 20-character Optional. Position mismatch reason (derived from the No default. mismatch reason code).

28 Print Upper/lower Case Enter one of the following codes to specify Optional. whether your report is formatted in upper Default is Y. case or in mixed case lettering N Print in mixed case Y Print in all upper case

Release 3.4.0 140 User Guide - IBM® i Chapter 7: Using G1G001 Report Layout and Content Parameters

CONSTANT The optional CONSTANT parameter enables you to define constants to print on the reports. With the CONSTANT parameter, you can define the constant, but not where to print that constant . You can use MOVE and FORMAT parameters to specify where to print the constants on the report line. There are up to eight CONSTANT parameters available, each specifying a single constant.

Position Field Name Description Comments

1-8 Keyword CONSTANT is the only acceptable entry. Required.

9-10 Constant Id Number Number that identifies this constant: 01-08. Required. The constant will later be referenced by No default. C01-C08.

12-21 Constant Data Data string associated with this CONSTANT Required. ID NUMBER: Use leading and trailing No default. blanks. However, depending on the length you specify for printing the constant on the MOVE or FORMAT parameters, trailing blanks can be truncated.

FORMAT The optional FORMAT parameter specifies print line locations for several elements of your input file and/or constants. G1G001 will concatenate these fields and constants according to the following rules:

• FORMAT parameters are executed in the order in which they are defined. • The first field to be formatted must not be a constant. • There must be at least two fields to be formatted. • Two consecutive non-constant fields (for example, input record elements) automatically have a space between them. • All leading blanks of non-constant fields (for example, input record elements) are suppressed and are not printed on the print line. • No spaces print between constants and input record elements unless enabled for in the length of the constant. (In other words, if there is a 2-byte constant and you want to print a space between the constant and the input record element that follows it, define a length of 3 for the constant.) The following table is an overview of each field on the FORMAT parameter.

 All input record position fields can be extended one column to the left to accommodate 4-byte positions, if necessary.

Position Field Name Description Comments

1-6 Keyword FORMAT is the only acceptable entry. Required.

7-8 Comment You can enter any value you wish here to Optional. No identify this format operation; G1G001 will default. ignore this field.

10-12 Print Location Print line location for input record elements Required. No or constants moved. default.

14-15 Total Length Print line length the data concatenated with Required. No this format; enter a number between 1 and default. 99

Release 3.4.0 141 User Guide - IBM® i Report Layout and Content Parameters

Position Field Name Description Comments

17-19 Location of Fields to Be Starting position of the input record for the Required. No 25-27 Formatted data to print, or the constant ID number. You default. 33-35 can enter an input position or C01–C08 for 41-43 each of these LOCATION fields. You must 49-51 enter at least 2 fields and no more than 8. 57-59 The first blank field will terminate the 65-67 processing of this line. 73-75

20, 28, 36, 44, Constant Treatment Code controlling the formatting of the Required. No 52, 60, 68, 76 constant (this is only valid if the default. corresponding LOCATION field is a constant): * Do not print this constant if the preceding field contains only blanks. blank Do not print this constant if the succeeding field contains only blanks.

21-22 Length of Fields to Be Length of each of the input record elements Required. No 29-30 Formatted or constants defined in the LOCATION fields default. 37-38 45-46 53-54 61-62 69-70 77-78

23, 31, 39, 47, Zero Suppression Code indicating whether to suppress leading Optional. Default 55, 63, 71, 79 zeros on the corresponding input record is to not print element or constant. Enter a Z if leading leading zeros. zeros should be suppressed.

80 Force Print of Current Enter one of the following codes to indicate Optional. Default Line whether or not you want to force the current is to not print the line to be printed: current line. P Print the current line. blank Do not print the current line

Release 3.4.0 142 User Guide - IBM® i Chapter 7: Using G1G001 Report Layout and Content Parameters

MOVE The optional MOVE parameter enables you to specify locations on the print line for input file elements or constants defined with the CONSTANT parameter. You can define up to 100 MOVE parameters.

 All input record position fields can be extended one column to the left to accommodate 4-byte values, if necessary.

Position Field Name Description Comments

1-4 Keyword MOVE is the only acceptable entry. Required.

5-6 Comment You can enter any value you wish here to Optional. No identify this move operation; G1G001 will default. ignore this field.

8-10 Destination The location on the print line to which you Required. No want the input record element or constant default. moved.

12-13 Length Length this data occupies on the print line. Required. No You can enter a number between 1 and 99. default.

15-17 Source Starting position of the input data for the Required. No print line, or the constant ID number. You default. can enter an input position or C01–C08.

19 Force Print of Current Enter one of the following codes to force or Optional. Default Line suppress the current: is to not print the blank Do not print the current line current line. P Print the current line.

PAGESZ The optional PAGESZ parameter enables you to specify how many lines to print on each page of the report.

Position Field Name Description Comments

1-6 Keyword PAGESZ is the only acceptable entry. Required.

8-10 Lines-per-page Number of lines you want printed on all Required. Default report pages is 60. Minimum is 25; maximum is 225.

12-14 Report Code indicating whether the specified Required. Default number of lines applies to the Execution Log is RPT. or other reports. Enter the following code: RPT G1G001 report.

Release 3.4.0 143 User Guide - IBM® i Report Layout and Content Parameters TESTIT The optional TESTIT parameter enables you to check the syntax of the parameters before running the entire job. This parameter has no fields.

If you have this parameter in your job, Canadian CODE-1 Plus will check the syntax of your parameters and print a parameter report so that you can check that the information stored on the parameters is really what you intended to store. Then, if all looks good and there are no errors, you can remove this parameter and submit the job to run.

Position Field Name Description Comments

1-6 Keyword TESTIT is the only acceptable entry. Required.

UNPK The optional UNPK parameter enables you to print, in an unpacked format, data that is in the input record in packed format. You can enter up to 100 UNPK parameters.

 All input record position fields can be extended one column to the left to accommodate 4-byte positions, if necessary.

Position Field Name Description Comments

1-4 Keyword UNPK is the only acceptable entry. Required.

5-6 Comment Enter any value to identify this unpack Optional. No operation; G1G001 will ignore this field. default.

8-10 Destination Location for the print line containing Required. No unpacked data default.

12-13 Destination Length Length of the unpacked data on the print Required. No line. This number cannot exceed 18. default.

15-17 Source Starting position of the input packed data to Required. No unpack and print default.

19-20 Source Length Length of the input packed data; cannot Required. No exceed 10. default.

Release 3.4.0 144 User Guide - IBM® i Chapter 7: Using G1G001 Report Layout and Content Parameters Record Selection Parameters

Use the SELECT or CHANGE parameters to select or reject records for printing, or limit the number of records that are to be printed: • SELECT • CHANGE

SELECT The required SELECT parameter enables you to specify a value in the input record key code field that used to select records for printing. If the value in the input record matches the value you specify on the SELECT parameter, the record will be selected for printing. If the value in the record is different than the value on the SELECT parameter, the record will not be selected. You can also choose to select all records, regardless of the value in the key code field, or you can choose to select all records that do not contain blanks in the key code field.

 The key code location and length are specified on the CONTRL parameter.

You can define up to 200 SELECT parameters.

Position Field Name Description Comments

1-6 Keyword SELECT is the only acceptable entry. Required.

8-16 Key Code Comparison Value to compare to the input key code. Or, Required. No Value you can enter one of the following special default. values: • ALLKEYS - Select every record, regardless of the input key code. • NON BLANK - Select only records with non-blank key codes

NOTE: If you enter one of these special values, you can define only one SELECT parameter.

Release 3.4.0 145 User Guide - IBM® i Sample Control Language CHANGE The optional CHANGE parameter enables you to specify a pair of fields used to select records for printing. For each record, the data in the first field will be compared to the data in the second field. If the data in the two fields is different, the record will be selected for printing. If the data is identical, the record will not be selected for printing. You can enter up to 10 CHANGE parameters.

 All input record position fields can be extended one column to the left to accommodate 4-byte values, if necessary.

Position Field Name Description Comments

1-6 Keyword CHANGE is the only acceptable entry. Required.

8-10 First Comparison Starting location of the first input comparison Required. No Field field default.

12-13 Length Length of the two comparison fields Required. No default.

15-17 Second Comparison Starting location of the second input Required. No Field comparison field default.

Sample Control Language

This section shows the control language you need to run the G1G001 program. The source control language and sample parameters are located in the source file SOURCE: • File name @G1G001 — Sample G1G001 control language • File name G1G001.DAT — Sample G1G001 parameters ....+....1....+....3....+....4....+....5....+....6....+....7....+. PGM ADDLIBLE G1C1PGMS MONMSG MSGID(CPF2103) OVRDBF FILE(G1GPRM) T0FILE(G1C1PGMS/SOURCE) + MBR(G1G001.DAT) SEQONLY(*YES 100) OVRDBF FILE(C1BMNAM) TOFILE(G1DATA/C1NAMTEST) + MBR(CODED) SEQONLY(*YES 500) CALL PGM(G1G001) DLTOVR FILE(*ALL) ENDPGM

Release 3.4.0 146 User Guide - IBM® i Using Callable Routines 8

In this chapter

 Introduction to the Callable Routines ...... 148  Canadian CODE-1 Plus Matching Module - C6MATCH ...... 148  C6DBRLKP ...... 167 Canadian CODE-1 Plus Matching Module - C6MATCH Introduction to the Callable Routines

Callable modules are subroutines that provide the functionality of the Canadian CODE-1 Plus system. You can call these modules from your own applications, allowing you to tailor processing to meet your specific needs. Canadian CODE-1 Plus has callable programs for three functions: • Address validation/correction/reporting • Database inquiry type 1 • Database inquiry type 2

Address Validation/Correction C6MATCH processes an input record, comparing it to the Canadian CODE-1 Plus database, and stores the match results (standardized addresses and return codes) and processing statistics. You can also request a report from this module.

Database Inquiry Type 1 and 2 Modules C6DBRLKP is a routine that processes a specific postal code and returns the information stored in the Canadian CODE-1 Plus database for that postal code. This information includes street types, directionals, house numbers, apartment ranges, and LVR and city information.

Call Areas Use parameters to call modules and pass the names of pre-defined call areas to the processing routines. These call areas are blocks of memory containing data used by both your driver program and the callable module.

Each call area has a map associated with it. The map describes the data that is stored in each byte of the call area. Because these maps are specific, both the callable module and the driver program “know” where every piece of data is located. Therefore, instead of passing all of the data between the driver and the callable module, the only parameter that is passed between the two programs is the name of the call area.

Canadian CODE-1 Plus Matching Module - C6MATCH

C6MATCH is the Canadian CODE-1 Plus matching module. It takes input address information and the processing instructions you specify, matches the input data against the Canadian Postal Database, and stores the results. This routine can produce reports reflecting run-time statistics, including the Analysis of Matched Records Report, Summary by Province Report, Summary by List Code Report, and the Summary by FSA Code Report. This chapter contains a description of the call area for the C6MATCH routine. Review this section to understand the information that you will be asked to supply and the information that will be returned to your calling program. Please also review the parameter discussions in Chapter 1 of the Reference Guide for field-specific information. Following the description of the call area is a discussion of how the calls to the subroutine should be coded for the IBM® i platform. We have also supplied sample programs in source form for you to use as examples of how to call the C6MATCH subroutine.

Release 3.4.0 148 User Guide - IBM® i Chapter 8: Using Callable Routines Canadian CODE-1 Plus Matching Module - C6MATCH

How C6MATCH Works The C6MATCH module takes, as parameters, the name of the C6MATCH call area. C6MATCH has a 6157-character call area, which contains the input address information, processing requirements, address match results, and return codes.

There are two types of calls for C6MATCH. Both use the 6157-byte call area mentioned above, which matches against the database for Canadian addresses, and a 1348-byte printed call area that controls the printing of the reports.

The C6MATCH Call Area The C6MATCH call area structure contains a field that you must use to define your database library name. This field does not exist in the C6DBRLKP call area structure, so you must add the database library to your liblist before calling C6MATCH for reverse presorts. Pitney Bowes provides a copybook of this area, C6MATPRM, with your installation files. A sample COBOL batch driver program is supplied in the sample library called C6SMCDR. To run the sample program, use command C6SMCDRCMD, which runs CL program C6SMCDRCL, which, in turn, runs C6SMCDR. • Fields prefixed by MCA- and RP- are control areas. These fields are used to set run-time options for the routine and will only be interrogated on the first call in a batch environment, except for MCA-FUNCTION-REQ, which is checked with every call. • The Parameter Comments column in The C6MATCH Application Match Call Area table indicates whether the field is an input field, output field, or control area. You will populate input fields with the address information you wish to match against the Canadian Postal Database. Canadian CODE-1 Plus will populate output fields with information after the matching process has taken place. (The type of information posted varies with the parameters you set.) • Pay close attention to the MOA-ABEND-RC field, which, when not blank, will indicate that a serious processing error has occurred. In this case, the MOA-ABEND-TXT field will contain a text description of the problem. These additional non-MCA or RP prefixed fields are also used to control the matching and formatting of address information:

MOA-CAN-I-POBOX MOA-CAN-FORMAT-OVERFLOW-OPT

MOA-CAN-I-PRTY MOA-CAN-FORMAT-LNG-OPT

MOA-CAN-VALIDATE-FLAG MOA-CAN-FORMAT-EXTRA-OPT

MOA-CAN-ACCENTS-FLAG MOA-CAN-FORMAT-EN-APT-ID

MOA-CAN-FORMAT-APT-OPT MOA-CAN-FORMAT-FR-APT-ID

MOA-CAN-FORMAT-RR-OPT MOA-CAN-FORMAT-SAL1-LENGTH (PACKED NUMBER)

MOA-CAN-FORMAT-KEYWD-OPT MOA-CAN-FORMAT-SAL2-LENGTH (PACKED NUMBER)

MOA-CAN-FORMAT-DIQ-OPT MOA-CAN-SS-LVR-FLAG

MOA-CAN-FORMAT-ADDRESS-OPT

Release 3.4.0 149 User Guide - IBM® i Canadian CODE-1 Plus Matching Module - C6MATCH

The C6MATCH Application Match Call Area

Parameter/ Position Name Length User Action/Content Comments

1 MCA-FUNCTION-REQ 1 Select the control parameters that are to be Control established the first time the matcher is called. B Calling from a batch process. C6MATCH will accumulate counts for the final reports. D End-of-job indication for use in an online environment. C6MATCH will not produce final reports but will close all files. E End-of-job indication for use in a batch environment. C6MATCH will produce final reports. O Calling from an online process.

2-10 Reserved 9

11 MCA-USE-ADR-BLK 1 This should be set to N. Control

12-525 Reserved 514

526-533 MCA-IO-MODULE- 8 Enter the name of the routine used to Control NAME regulate the I/O that reads the Canadian Postal Database. By default, the name is C6IOBAT for processing VSAM/KEYED files

534-536 Reserved 3

537 MCA-FIX-FIELD- 1 This should be set to Y. Control CNTRY

538 MCA-FIX-FIELD-PC 1 This should be set to Y unless the postal Control code data is in the city field. If the postal code data is in the city field, this should be set to N and position 539 should be set to C.

539 MCA-FIX-FIELD-CITY 1 This should be set to Y if the city is in a fixed Control location or to C if the city data is mixed with the city field.

540 MCA-FIX-FIELD- 1 This should be set to Y unless the province Control STATE data is in the city field. If the province data is in the city field, this should be set to N and position 539 should be set to C.

541 MCA-FIX-FIELD- 1 This should be set to Y. Control ADDR

542 MCA-ALT-CITY-FLAG 1 This should be set to Y. Control

543-565 Reserved 23

566-575 MCA-DB-LIB 10 Database library override library name. Control

576-625 MIA-CNTRY 50 Country name. This must be uppercase. The Input default is CANADA. CP PCD

626-635 MIA-PC 10 Input postal code or blanks. This must be in Input six-character format (A9A9A9). CP PCD

Release 3.4.0 150 User Guide - IBM® i Chapter 8: Using Callable Routines Canadian CODE-1 Plus Matching Module - C6MATCH

Parameter/ Position Name Length User Action/Content Comments

636-685 MIA-CITY 50 Input city or blanks. Input CP PCD

686-735 MIA-STATE 50 Input province or blanks. Input CP PCD

736-785 MIA-FIRM-NAME 50 Large volume receiver or government Input agency name. FIRMNM

786-885 Reserved 100

886-985 MIA-STREET-1 100 Primary address line. Input ADDRDF

986- MIA-STREET-2 100 Secondary address line. Input 1085 ADDRDF

1086- Reserved 1300 2385

2386- MOA-ABEND-RC 2 Return area for abnormal termination of the Output 2387 matcher: D? C6DBMAT abend G? GENIOXXX abend L? ICDBLIO abend MC Invalid country level found for input country P? Parser abend blanks Normal termination.

2388- MOA-ABEND-TXT 80 Text that explains the abend return code in Output 2467 2386-2387.

2468- Reserved 82 2549

2550- MOA-RELEASE-MOD- 8 Software release number and modification Output 2557 NUM level (RxxxxMxx).

2558- Reserved 2408 4965

4966 MOA-CAN-I-POBOX 1 Code indicating treatment of input addresses Control that contain both street address information CONFIG and PO box information: Y Use only the PO box information; ignore the street address information. N Try to match the street address information first. If no match can be found, attempt a match using the PO Box information. (default)

Release 3.4.0 151 User Guide - IBM® i Canadian CODE-1 Plus Matching Module - C6MATCH

Parameter/ Position Name Length User Action/Content Comments

4967 MOA-CAN-I-PRTY 1 For input addresses that contain both a civic Control and non-civic component (for example, a CONFIG street address and either a rural route or PO Box), this code indicates which component to use on the initial match attempt. Enter one of the following: P Use the PO Box or rural route component first. S Use the street address component first. (default)

4968 Reserved 1

4969 MOA-CAN-VALIDATE- 1 Code indicating whether the matcher is to Control FLAG correct addresses or validate only: CONFIG C Perform address correction. (default) V Validate only.

4970 MOA-CAN-ACCENTS- 1 Code indicating whether to output accented Control FLAG data: FORMAT Y Output data (municipality, street name, etc.) is to contain accents. N Output data is not to contain accents. (default)

4971 MOA-CAN-O-VAL- 1 One-byte validation/correction return code - Output INVAL-CODE One of the following codes will be placed AM OUT here: C The input was correctable. F The input address was foreign (outside of Canada). N The input was non-correctable. V The input was valid.

Release 3.4.0 152 User Guide - IBM® i Chapter 8: Using Callable Routines Canadian CODE-1 Plus Matching Module - C6MATCH

Parameter/ Position Name Length User Action/Content Comments

4972 MOA-CAN-O- 1 One-byte code indicating success or reason Output GENERAL-RC for failure of the address-match attempt: AM OUT A Apartment number missing or not found in database, and an apartment-level match was required B Insufficient (or blank) address information for a match H Civic number not found on street, or out of range I When processing in validate-only mode, this indicates that the input address was invalid M Multiple address matches were found N Address did not match the database but was considered valid (LVR or rural postal code). Record written to COK file with input address in place of standardized address. O Probable correctness was less than the minimum specified in position 18 of the CONFIG parameter. P PO Box identifier not found or out of range R Route service identifier not found or out of range S Street name not found in postal code/municipality X The apartment does not match the database but is temporarily excluded from Address Accuracy calculations. Z Postal code and municipality not found in database blank The address-match attempt was successful.

4973 MOA-CAN-O- 1 One-byte code indicating the result of the Output DIRECTION-RC directional match, as follows: AM OUT D The directional does not match the database at all. F The complete directional does not match the database, but its first character does (for example, N versus NW). N No directional was found in the input address, but a directional was present on the database. blank The directional information matches the database, or there was no address match at all.

Release 3.4.0 153 User Guide - IBM® i Canadian CODE-1 Plus Matching Module - C6MATCH

Parameter/ Position Name Length User Action/Content Comments

4974 MOA-CAN-O-STREET- 1 One-byte code indicating the result of the Output TYPE-RC suffix match: AM OUT N No suffix was found in the input address, but a suffix was present on the database. S The suffix does not match the database. blank The suffix information matches the database, or there was no address match at all.

4975 MOA-CAN-O-APT-RC 1 One-byte code indicating the result of the Output apartment match: AM OUT A The apartment number does not match the database. N No apartment was found in the input address, but an apartment number was present on the database at the street address. Q Questionable unit range address blank The apartment number matches the database, or there was no address match at all.

4976 MOA-CAN-O-FIRM-RC 1 One-byte code indicating the result of the Output large volume receiver (LVR) name match: AM OUT F The input LVR name does not match the LVR name for that address as it appears on the database. M An input LVR name was present, but there were no LVR names on the database for the matched address. blank The LVR name matches the database, no LVR name was present in the input, or there was no address match at all.

Release 3.4.0 154 User Guide - IBM® i Chapter 8: Using Callable Routines Canadian CODE-1 Plus Matching Module - C6MATCH

Parameter/ Position Name Length User Action/Content Comments

4977 MOA-CAN-O-SAR 1 One-byte address return code - One of the Output following codes will be stored: SA OUT A Unit number missing or not found in database, and a unit-level match was required B Insufficient (or blank) address information for a match D Information was dropped during the address-match attempt H Civic/Box number not found on this street L The returned address was too long to be stored M Multiple matches were found N Address did not match the database but was considered valid (LVR or rural postal code). Record written to COK file with input address in place of standardized address. P P.O. box number not found R Route number not found S Street name not found in postal code Z Postal code not found on database blank The address-match attempt was successful.

4978 MOA-CAN-O-PCODE- 1 One-byte code indicating the success or Output RC reason for failure of the postal code PC OUT correction attempt: A Apartment number missing or not found in database, and an apartment-level match was required B Insufficient (or blank) address information for match H House/Box number not found on street M Multiple postal code matches of equal quality were found N Address did not match the database but was considered valid (LVR or rural postal code). Record written to COK file with input address in place of standardized address P P.O. Box not found S Street name not found in postal code Z Postal code not found in database blank The match attempt was successful.

Release 3.4.0 155 User Guide - IBM® i Canadian CODE-1 Plus Matching Module - C6MATCH

Parameter/ Position Name Length User Action/Content Comments

4979 MOA-CAN-O-INPUT- 1 One-byte code indicating the municipality Output CITY-RC match condition that resulted when the input AM OUT municipality name was used to find a locality: B No input municipality could be found. C No match could be found for the input municipality/state. N No locality attempt was made. blank The match was successful.

4980 MOA-CAN-O-MATCH- 1 One-byte code reflecting the source of the Output ADDR-SRC matched address: SA OUT M The matched address was synthesized from information in both the primary and secondary address lines. P The matched address was taken from the primary address line. S The matched address was taken from the secondary address line. blank No match was found.

4981 Reserved 1

4982 MOA-CAN-O-QR-RC 1 Output Location for questionable rural return code

Release 3.4.0 156 User Guide - IBM® i Chapter 8: Using Callable Routines Canadian CODE-1 Plus Matching Module - C6MATCH

Parameter/ Position Name Length User Action/Content Comments

4983 MOA-CAN-O-OVRLL- 1 One-byte code indicating the probable PRB-COR-SCR correctness of the address match. In general, the output postal code is more likely to be correct when this indicator contains a high number than when it contains a low number. The possible values include the following: 0 No records for the original postal code or city were found. 1 No address match was found, and the municipality/province does not agree with the original postal code. 2 No address match was found, but the municipality/province agrees with the original postal code. 3 The postal code has been corrected. The municipality/province does not match the new postal code, but it did match the original postal code. 4 The postal code has been corrected. The municipality/province matches neither the new nor the original postal code. 5 The original postal code was confirmed, but the municipality/province does not match that postal code. 6 The postal code has been corrected, and the municipality/province agrees with this new postal code. 7 The postal code has been corrected, but the municipality/province matches neither the new nor the original postal code. The match was made by using the house number, directional, and/or street type as a tie-breaker. 8 The postal code has been corrected, and the municipality/province agrees with this new postal code. The match was made by using the house number, directional, and/or street type as a tie breaker. 9 The original postal code was confirmed, and the municipality/ province agrees with that postal code.

4984 MOA CAN-O-APT-IND 1 One-character code indicating whether an Output apartment number was detected in the input AM OUT address: Y An apartment number was detected in the input address. N No apartment number was detected in the input address.

Release 3.4.0 157 User Guide - IBM® i Canadian CODE-1 Plus Matching Module - C6MATCH

Parameter/ Position Name Length User Action/Content Comments

4985 MOA-CAN-O-PC- 1 One-character code indicating the status of Output STATUS the output postal code field: PC OUT A The output postal code field contains a postal code other than the original due to the address match found. B The output postal code field contains blanks; no match was available, and the original postal code was not valid. C The output postal code field contains the original postal code, which was confirmed by address match. O The output postal code field contains blanks, because there was no address match, even though a postal code was found.

4986 Reserved 1

4987- MOA-CAN-O- 2 CPC Record Type of the postal code record Output 4988 RECORD-TYPE that was matched. If no match could be AM OUT obtained, this field is blank. Otherwise, the field will contain one of the following record types: blank No address match was found * Unknown A1 High rise B1 LVR street C1 Government street address D2 LVR served by Lock Box E2 Government served by Lock Box F2 LVR served by General Delivery 11 Street 21 Street served by route 32 PO Box 42 Route service 52 General delivery

4989 MOA-CAN-O-URBAN- 1 One-byte flag indicating how the record was Output RURAL-FLAG counted to determine the accuracy PC OUT percentage of the address file. F The record was counted as foreign (outside of Canada). R The record was counted as rural. U The record was counted as urban.

4990- MOA-CAN-O- 6 Final postal code, as best as it could be Output 4995 ANSWER-PCODE determined. This field will be blank if the PC OUT original postal code was invalid and no postal code could be determined.

4996- MOA-CAN-O-HOUSE 10 House number Output 5005 AE OUT

5006- MOA-CAN-O-STREET- 30 Street name Output 5035 NAME AE OUT

Release 3.4.0 158 User Guide - IBM® i Chapter 8: Using Callable Routines Canadian CODE-1 Plus Matching Module - C6MATCH

Parameter/ Position Name Length User Action/Content Comments

5036- MOA-CAN-O-STREET- 6 Street type Output 5041 TYPE AE OUT

5042- MOA-CAN-O-STREET- 2 Street directional Output 5043 DIR AE OUT

5044- MOA-CAN-O-APT- 8 Apartment number Output 5051 NUM AE OUT

5052- MOA-CAN-O-APT- 6 Apartment number, preceded by the Output 5057 KEYWORD apartment type AE OUT

5058- MOA-CAN-O-RR-NUM 5 Rural route, in the standard CPC form (RR Output 5062 11, for example) AE OUT

5063- MOA-CAN-O-BOX- 10 Post Office Box number Output 5072 NUM AE OUT

5073- MOA-CAN-O-DI- 5 Delivery installation type Output 5077 KEYWORD AE OUT

5078- MOA-CAN-O-DI-QUAL 15 Delivery installation qualifier Output 5092 AE OUT

5093- MOA-CAN-O-DI-AREA 30 Delivery installation name Output 5122 AE OUT

5123- MOA-CAN-O-PROV 2 CPC-standard province abbreviation Output 5124 CP OUT

5125- MOA-CAN-O-LONG- 30 Long municipality name Output 5154 CITY CP OUT

5155- MOA-CAN-O-18-CITY 18 18-character municipality name Output 5172 CP OUT

5173- MOA-CAN-O-SHORT- 13 Short municipality name Output 5185 CITY CP OUT

5186- MOA-CAN-O-LVR 60 Correct LVR or English government name Output 5245 FIRMNM

5246- MOA-CAN-O-GOV- 60 French LVR or government agency name Output 5305 FRENCH FIRMNM

5306- Reserved 4 5309

5310- Reserved 5 5314

5315- MOA-CAN-O-MULT- 24 First four additional postal codes found (that Output 5338 PCODE-LIST is, in addition to the postal code returned in M PCDS positions 5205–5210), if multiple postal code matches were obtained.

5339- Reserved 50 5388

5389- MOA-CAN-O-PROD- 20 Product name (“Canadian CODE-1 Plus”) Output 5408 NAME

Release 3.4.0 159 User Guide - IBM® i Canadian CODE-1 Plus Matching Module - C6MATCH

Parameter/ Position Name Length User Action/Content Comments

5409- Reserved 8 5416

5417- MOA-CAN-O-DB- 15 Canadian CODE-1 Plus software installation Output 5431 VERSION date

5432- MOA-CAN-O-DB-EFF- 10 Effective date of the database referenced in Output 5441 DT MOA-CAN-O-DB-VERSION. The format is MM/DD/YYYY

5442 Reserved 1

5443 MOA-CAN-FORMAT- 1 Code indicating the placement of the Control APT-OPT apartment information relative to the other FORMAT address elements. Enter one of the following: B The apartment identifier and number will be on the back of the address string (example: 100 MAIN ST SUITE 2). D The output information will be arranged like the input information whenever possible to preserve the original format. E The apartment identifier and number will be at the front of the address string (example: SUITE 2 100 MAIN ST). F The apartment number (with no identifier) will be in front of the address, followed by a hyphen and the rest of the address (example: 2- 100 MAIN ST). S The apartment identifier and number will be stored in the secondary standardized address line shown in this example:

SUITE 2 100 MAIN ST

5444 MOA-CAN-FORMAT- 1 Code indicating the format of the associated Control RR-OPT route delivery information in the output FORMAT record. Enter one of the following codes: A The associated route delivery information will be placed after the address. D The output address information will be arranged like the input whenever possible to preserve the original format. S The associated route delivery information will be placed in the secondary standardized address line.

Release 3.4.0 160 User Guide - IBM® i Chapter 8: Using Callable Routines Canadian CODE-1 Plus Matching Module - C6MATCH

Parameter/ Position Name Length User Action/Content Comments

5445 MOA-CAN-FORMAT- 1 Code indicating the format of the keyword in Control KEYWD-OPT the output records. Enter one of the FORMAT following: A The abbreviation for the keyword will be used. F The full keyword will be used.

5446 MOA-CAN-FORMAT- 1 Code indicating the format of the associated Control DIQ-OPT delivery office information in the output FORMAT records. Enter one of the following codes: A The associated delivery office information will be placed after the address (example: PO BOX 100 WILLOWDALE STN MAIN). D The output address information will be arranged like the input whenever possible to preserve the original format. S The associated delivery office information will be placed in the secondary standardized address line (example: WILLOWDALE STN MAIN PO BOX 100).

5447 MOA-CAN-FORMAT- 1 Code indicating the format of French output ADDRESS-OPT records (see the description of the FRENCH parameter in the Reference Guide). Enter one of the following codes: C The format of the output address will depend on the language of the street type in the CPC database. If the street type is ambiguous, the output will be formatted like the input. The following street types will result in French-order output addresses: ALLEE AUT AV BOUL CAR CARREF CERCLE CHCOTE COUR COURS CROIS ECH HEATH ILE IMP INLET MONTEE PARC POINTE QUAI RAMP RANG RDPT RLE RTE RUE SENT TSSE VILLAS VOIE

The following street types are ambiguous: CONC CDS PARADE PLACE PLAT PLAZA POINT PROM SQ VILLGE D The output address information will be arranged like the input whenever possible to preserve the original format. S The address elements will be returned in standard CPC format. T The output address will be formatted in French order.

NOTE: The MOA-CAN-FORMAT- LNG- OPT field must be set to F in order to use this option.

Release 3.4.0 161 User Guide - IBM® i Canadian CODE-1 Plus Matching Module - C6MATCH

Parameter/ Position Name Length User Action/Content Comments

5448 MOA-CAN-FORMAT- 1 Code indicating treatment of output Control OVERFLOW-OPT standardized address exceeding the location FORMAT specified on the SA OUT parameter. Enter one of the following: O Attempt to split the output address so that the majority of the street address is stored in the primary standardized address line, and the apartment, associated route delivery information, and/or associated delivery office information is stored in the secondary standardized address line. blank Truncate the output standardized address and store the result in the primary standardized address line.

5449 MOA-CAN-FORMAT- 1 If MOA-CAN-FORMAT-ADDRESS-OPT Control LNG-OPT (position 5447) is T, then an F in this position FRENCH will cause the address to be formatted in French. Any other value will cause the address to be formatted in English.

5450 MOA-CAN-FORMAT- 1 Control for the location of extra information. Control EXTRA-OPT Enter one of the following values: FORMAT A Extra information will be appended to the contents of the primary standardized address line and will also be placed in the separate extra information field. blank Extra information will be placed in the separate extra information field only.

5451- MOA-CAN-FORMAT- 9 Apartment identifier that should be written to Control 5459 EN-APT-ID English-format output records when no such FORMAT identifier was returned from the matcher. Choices are: APARTMENT, APT, SUITE, and UNIT.

5460- MOA-CAN-FORMAT- 11 Apartment identifier that should be written to Control 5470 FR-APT-ID French-format output records when no such FORMAT identifier was returned from the matcher. Choices are: APPARTEMENT, APP, BUREAU, SUITE, and UNITE.

5471- MOA-CAN-FORMAT- 2 Length of the standardized address line 1 or Control 5472 SAL1-LENGTH standardized address with unit information. SA OUT Packed decimal.

5473- MOA-CAN-FORMAT- 2 Length of the secondary standardized Control 5474 SAL2-LENGTH address without unit information. Packed SA OUT decimal.

5475- Reserved 2 5476

Release 3.4.0 162 User Guide - IBM® i Chapter 8: Using Callable Routines Canadian CODE-1 Plus Matching Module - C6MATCH

Parameter/ Position Name Length User Action/Content Comments

5477 MOA-CAN-SS-LVR- 1 When the input data record has been Control FLAG identified as an LVR record (Large Volume CONFIG Receiver) or a single-single record (only one record for that Postal Code/street name/street type), do not adjust the civic and/or the suite information to match the street record in the CPC data. Y Change the civic and/or suite information to match the LVR or single-single record.

If you enter Y in this field, the Statement of Address Accuracy will not be printed, because this is not a SERP-recognized setting.

N (default) Do not change the civic and/or suite information to match the LVR or single-single record. The LVR record will now be marked as a valid but non-correctable record (VN). The single-single record will either be corrected, if possible, or processed as a non-correctable record.

5478- MOA-CAN-R-PARSE- 10 Normalized input house number Output 5487 HOUSE

5488- MOA-CAN-R-PARSE- 30 Normalized input street name Output 5517 STREET

5518- MOA-CAN-R-PARSE- 6 Normalized input street type Output 5523 STREET-TYPE

5524- MOA-CAN-R-PARSE- 2 Normalized input directional Output 5525 STREET-DIR

5526- MOA-CAN-R-PARSE- 8 Normalized input apartment number Output 5533 APT-NUM

5534- MOA-CAN-R-PARSE- 6 Normalized input apartment identifier Output 5539 APT-KEYWORD

5540- MOA-CAN-R-PARSE- 5 Normalized input rural route keyword and Output 5544 RR-NUM rural route number

5545- MOA-CAN-R-PARSE- 10 Normalized input lock box number Output 5554 BOX-NUM

5555- MOA-CAN-R-PARSE- 5 Normalized input delivery installation type Output 5559 DI-KEYWORD

5560- MOA-CAN-R-PARSE- 15 Normalized input delivery installation Output 5574 DI-QUAL qualifier

5575- MOA-CAN-R-PARSE- 30 Normalized input delivery installation name Output 5604 DI-AREA

5605- Reserved 28 5632

Release 3.4.0 163 User Guide - IBM® i Canadian CODE-1 Plus Matching Module - C6MATCH

Parameter/ Position Name Length User Action/Content Comments

5633- MOA-CAN-O- 50 Fixed-fielded analysis codes Output 5682 ANA[LYSIS]-CODES AM OUT NOTE: Please review Chapter 7 of the Reference Guide for a detailed description of this area.

5683- MOA-CAN-O-STD- 98 The complete standardized address line 1. Output 5780 ADDR1 SA OUT

5781 MOA-CAN-O-SA1- 1 One-character field indicating address Output TRUNC truncation: SA OUT S Address was split onto address line 2 X Truncation occurred blank No truncation or splitting occurred.

5782- MOA-CAN-O-STD- 98 The complete standardized address line 2. Output 5879 ADDR2 SA OUT

5880 MOA-CAN-O-SA2- 1 One-character field indicating address Output TRUNC truncation: SA OUT X Truncation occurred blank No truncation occurred.

5881- MOA-CAN-O-XTRA- 98 The extra information line. Output 5978 INFO AP OUT

5979 MOA-CAN-O-XTRA- 1 One-character field indicating extra Output TRUNC information truncation: AP OUT X Truncation occurred blank No truncation occurred.

5980- MOA-CAN-O-STRT- 43 Complete street name Output 6022 NAME SA OUT

6023- MOA-CAN-O-STRT- 51 Street address, without apartment Output 6073 ADDR information SA OUT

6074- MOA-CAN-O-MUN- 43 Standardized Municipality/Province/Postal Output 6116 PROV-PC Code line, constructed using the long (30- CP OUT byte maximum) municipality name

6117- MOA-CAN-O-MPPC- 28 Standardized Municipality/Province/Postal Output 6144 SHORT Code line, constructed using the short (13- CP OUT byte maximum) municipality name

6145- MOA-CAN-O-APT-NM- 13 Apartment number preceded by the Output 6157 NUM apartment type SA OUT

The C6PRPT Call Area

Parameter/ Position Name Length User Action/Content Comments

NOTE: All of the report flags listed below default to Y. The following detail-level parameters are used for all but the last call to C6PRPT.

1-237 Reserved 237 Field

Release 3.4.0 164 User Guide - IBM® i Chapter 8: Using Callable Routines Canadian CODE-1 Plus Matching Module - C6MATCH

Parameter/ Position Name Length User Action/Content Comments

238 RP- 1 Print Analysis of Matched Records Report? REPORT RPANMR Y Print the report (default). N Do not print the report.

239 RP- 1 Print Summary by Province Report? REPORT RPSMPR Y Print the report (default). N Do not print the report.

240 RP- 1 Print Summary by List Code Report? REPORT RPSMLC Y Print the report (default). N Do not print the report.

241 RP- 1 Print Summary by FSA Code Report? REPORT RPSMFS Y Print the report (default). N Do not print the report.

242 RP- 1 Print reports in all upper case? REPORT RPUPLO Y Print the reports in all upper case (default). N Print the reports in mixed case.

243-252 RP-DATE 10 Date for all reports HEADER

253-292 RP- 40 Main header for reports UHDxx HEADER

293-424 RP-UHD-(1) 132 First line of additional header for reports UHDxx

425-556 RP-UHD-(2) 132 Second line of the additional header for all UHDxx reports

557-688 RP-UHD-(3) 132 Third line of the additional header for all UHDxx reports

689-820 RP-UHD-(4) 132 Fourth line of the additional header for all UHDxx reports

821-952 RP-UFT-(1) 132 First line of the footer for all reports UFTxx

953-1084 RP-UFT-(2) 132 Second line of the footer for all reports UFTxx

1085-1216 RP-UFT-(3) 132 Third line of the footer for all reports UFTxx

1217-1348 RP-UFT-(4) 132 Fourth line of the footer for all reports UFTxx

Release 3.4.0 165 User Guide - IBM® i Canadian CODE-1 Plus Matching Module - C6MATCH Calling C6MATCH • Enter Ys in the following areas, unless your data requires a different option (see the specific call area fields for options): 10 MCA-FIX-FIELD-ELEM 15 MCA-FIX-FIELD-CNTRY PIC X(1) 15 MCA-FIX-FIELD-PC PIC X(1) 15 MCA-FIX-FIELD-CITY PIC X(1) 15 MCA-FIX-FIELD-STATE PIC X(1) 15 MCA-FIX-FIELD-ADDR PIC X(1) 1. Initialize the 10 MCA-USE-ADR-BLK PIC X area to N. 2. Enter your data into the input address information fields (listed below) and set options for any other input MOA-fields you wish to change.

DFHEIBLK and DFHCOMMAREA Use the following to map the first two call areas: 01 DFHEIBLK PIC(X). 01 DFHCOMMAREA PIC(X).

Remaining Parameter Areas Use the following to map the remaining call areas: 01 G1ICGPR-PCB PIC(X). 01 G1ICGLU-PCB PIC(X). 01 G1ICTBL-PCB PIC(X). 01 G1ICMUN-PCB PIC(X). 01 G1ICRST-PCB PIC(X). 01 G1ICSDD-PCB PIC(X). 01 G1ICSTD-PCB PIC(X). 01 G1ICPCD-PCB PIC(X). 01 G1ICPND-PCB PIC(X). 01 G1C6DBI-PCB PIC(X). The PCBs must be mapped in the same order that they are mapped in the PSB for your driver program. For the sake of consistency, we recommend that this be the same order that you have in the PSBs for the driver we supply (C6BM00) as well as the sample batch driver (C6SMCDR). 01 G1ICxxx-PCB. 05 G1ICxxx-DBD-NAME-PCB PIC X(8). 05 G1ICxxx-SEG-LEVEL-PCB PIC X(2). 05 G1ICxxx-STATUS-CODE-PCB PIC X(2). 05 G1ICxxx-PROC-OPTS-PCB PIC X(4). 05 G1ICxxx-RSV-DLI-PCB PIC S9(9) BINARY. 05 G1ICxxx-SEGNAME-PCB PIC X(8). 05 G1ICxxx-KFB-LENGTH-PCB PIC S9(9) BINARY. 05 G1ICxxx-SENS-SEG-PCB PIC S9(9) BINARY. 05 G1ICxxx-KEY-FEEDBACK-PCB PIC X(50).

Release 3.4.0 166 User Guide - IBM® i Chapter 8: Using Callable Routines Canadian CODE-1 Plus Matching Module - C6MATCH C6DBRLKP

The reverse lookup callable routine, C6DBRLKP, takes as input a specific postal code and returns the street information stored in the Canadian CODE-1 Plus database for that postal code. We have supplied sample programs in source form for you to use as examples of how to call the C6DBRLKP subroutine. The sample batch program, C6SMCRL, demonstrates how to use the C6DBRLKP function, creating a report of the results from the calls. The command C6SMCRLCMD is used to run the sample program, which runs CL program C6SMCRLCL, which, in turn, calls C6SMCRL.

General Guidelines Be sure to follow the guidelines below when calling C6DBRLKP. • The entire calling area should be initialized to blanks, with the following exceptions: MOVE "00000” TO LM-REQ-SEQ-NUM MOVE SPACES TO LM-LAST-REC-PC-A LM-LAST-REC-PC-B MOVE ZEROS TO LM-REQ-SEQ-NUM-A LM-REQ-SEQ-NUM-B

• The maximum number of entries displayed on the interface is controlled by the calling program. The routine can return from 1 to 30 entries for every call. You can set this value in the LM- STREET-COUNT field. For example, entering the maximum number of lines allows you to retrieve a screen’s worth of information with each call to the inquiry routine. The number of returned streets can be less than the specified maximum when there are less than that many street entries associated with the requested postal code. • If the LM-REQ-SEQ-NUM field still contains zeroes after a call to the C6DBRLKP routine, the input postal code was not found on the Canadian Postal Database. • Approximately 85% of the have a single street with one or two house ranges associated with them. However, several postal codes in the database have over 256 streets associated with them, and one postal code has over 512 streets. The LM-LAST-REC-PC field will contain a Y when there are no more streets to show for a postal code after you make a call to C6DBRLKP. If, after a call to the routine, this field does not contain a Y, then you will need to continue making calls to retrieve the next set of associated street records. Non-civic street information (PO Box and Route Number) will be returned before civic street information. • Determine whether you have a civic or non-civic address layout by checking the LM-PC-REV- LK-KEYWORD field. If the first three bytes of this field contain “MR”, “RR”, “SS”, or “PO”, or the field contains “GENERAL DELIVERY”, the entry is in non-civic format. Any other value would indicate a civic layout. Refer to the FORMAT-STREET-RTN in the sample driver program C6SMCRL for an example of how to display this data. The following table defines each of the non-civic indicators. Non-Civic Indicators

Indicator Definition Indicator Definition

MR Mobile Route PO PO Box

RR Rural Route GD General Delivery

SS Suburban Service

Release 3.4.0 167 User Guide - IBM® i Canadian CODE-1 Plus Matching Module - C6MATCH Working Storage Area LM-PC-REV-LK The following table maps out the 3,752-byte LM-PC-REV-LK call area. We provide a copybook of are C6RLKPRM with your installation files.

Position Name Length Comments

1-6 LM-REQ-POSTAL-CODE 6 The postal code for which you want data returned. This is a required input field.

7 LM-STREET-INFO 1

8-11 LM-STREET-COUNT 4 The number of streets to return with each call of the program. This must be greater than 0001 and less than 0030.

12-16 LM-REQ-SEQ-NUM 5 Initialized to zeroes.

17 LM-LAST-REC-PC 1 A flag (Y) that tells when you have reached the last record for that postal code.

18-22 LM-REQ-SEQ-NUM-A 5 Initialized to zeroes.

23 LM-LAST-REC-PC-A 1 Reserved.

24-28 LM-REQ-SEQ-NUM-B 5 Initialized to zeroes.

29 LM-LAST-REC-PC-B 1 Reserved.

30-49 Reserved 20 Reserved.

50 LM-PC-REV-LK-RTN-CDE 1 The reverse lookup return code: Z Postal code not found blank Postal code found; information returned from master file lookup.

51-52 LM-PC-REV-LK-RTN- 2 The province name for the input postal code. PROV

53-112 LM-PC-REV-LK-GOV- 60 LVR or government name in English. ENG

113-172 LM-PC-REV-LK-GOV- 60 Government name in French. FRN

173 Reserved 1 Reserved.

174-3743 LM-PC-REV-LK-DATA 3570 Data area defined below.

3744-3751 LM-PC-REV-IO-MODULE- 8 The name of the routine used to regulate the I/O that NAME reads the Canadian Postal Database. By default, the name is C6IOBAT for processing VSAM/KEYED files.

3752 LM-PC-REV-FUNCTION- 1 Indicates whether to return accented or non-accented REQ data. In the interactive inquiry process, this field is populated with the value of the Output Accents Flag on the ADMIN screen. Y Return accented data. N Return non-accented data (default). 1 Return read and write data in an 8859-1 code page with multinationals.

The output area mentioned above is formatted in one of two ways, depending on whether non-civic or civic data is returned.

Release 3.4.0 168 User Guide - IBM® i Chapter 8: Using Callable Routines Canadian CODE-1 Plus Matching Module - C6MATCH

Position Name Length Comments

Non-Civic Data: LM-PC-REV-LK-NON-CIVIC (30 times)

1-9 LM-PC-REV-LK-LO-HSE 9 The starting civic number for this database entry. Pos. Field 1-6 Numeric house number 7 Filler (or space if initialized call area) 8 House number suffix 1 = 1/4 2 = 1/2 3 = 3/4 A–Z = Alpha suffix Space = No suffix 9 Filler

10-18 LM-PC-REV-LK-HI-HSE 9 The ending civic number for this database entry. Pos. Field 1-6 Numeric house number 7 Filler (or space if initialized call area) 8 House number suffix 1 = 1/4 2 = 1/2 3 = 3/4 A–Z = Alpha suffix Space = No suffix 9 Filler.

19 LM-PC-REV-LK-EO-IND 1 The even/odd indicator for this civic number range.

20-49 LM-PC-REV-LK-RTN-CITY 30 The municipality name for the input postal code.

50-69 LM-PC-REV-LK- 20 The non-civic keyword data for this database entry. KEYWORD

70-99 LM-PC-REV-LK-DI-AREA 30 The delivery installation area name for this database entry.

100-104 LM-PC-REV-LK-DI-TYPE 5 The delivery installation type for this database entry.

105-119 LM-PC-REV-LK-DI-QUAL 15 The delivery installation qualifier for this database entry.

Civic Data: LM-PC-LK-CIVIC

1-9 LM-PC-REV-LK-LO-HSE 9 The starting civic number for this database entry.

10-18 LM-PC-REV-LK--HI-HSE 9 The ending civic number for this database entry.

19 LM-PC-REV-LK--EO-IND 1 The even/odd indicator for this civic number range.

20-49 LM-PC-REV-LK-RTN-CITY 30 The municipality name for the input postal code.

50-79 LM-PC-REV-LK-STREET- 30 The street name for this database entry. NAME

80-85 LM-PC-REV-LK-STREET- 6 The street suffix for this database entry. TYPE

86-87 LM-PC-REV-LK- 2 The street directional for this database entry. DIRECTIONAL

88-94 LM-PC-REV-LK-ROUTE 7 The associated route information for this database entry.

Release 3.4.0 169 User Guide - IBM® i Canadian CODE-1 Plus Matching Module - C6MATCH

Position Name Length Comments

95-100 LM-PC-REV-LK-LO-APT 6 The low end of the apartment range for this database entry.

101-106 LM-PC-REV-LK-HI-APT 6 The high end of the apartment range for this database entry.

107 LM-PC-REV-LK-ALT-FLAG 1 The alternate street name flag. If this field is blank, the street name was not an alternate; if this field contains an “A”, the street name was an alternate street.

108-119 Filler 12

Release 3.4.0 170 User Guide - IBM® i Chapter 8: Using Callable Routines Canadian CODE-1 Plus Matching Module - C6MATCH

Calling C6DBRLKP This routine is written in COBOL and is called using the basic COBOL call statement: Call C6DBRLKP USING LM-PC-REV-LK-AREA

We have also supplied sample programs in source form for you to use as examples of how to call the G1C6LKP subroutine. The sample interactive program G1C6DSM demonstrates how to use the G1C6LKP function. .

Position Name Length Comments

1-6 G1C6LK- 6 This field is required for all G1C6LKP calls. Enter one of the COMMAND following codes to specify the command to be executed by the program: CM Returns an alphabetical listing of all cities within the postal database. For each city, the results row displays the province abbreviation and the postal code(s) valid for the city. CP Returns an alphabetical listing of all municipalities within the specified postal code. DP Returns the address details for the specified postal code. FM Returns all the firms on the specified street. The result rows display the house number ranges, apartment number ranges within a dwelling, the name of the firm located at each apartment/suite, and the postal codes. You may only execute this command immediately after an HS command. HS Returns all the house ranges on the specified street. In addition to even/odd house number ranges, the result rows display postal code ranges, number of apartments, and number of firms. You may only execute this command immediately after an SC or SP command. SC Returns an alphabetical listing of all the streets within the specified municipality. For each street, the result rows display directionals (NE, SW, etc.), suffixes (ST, BLVD, etc.), number of houses, number of firms, and postal code ranges. You may only execute this command immediately after a CM or CP command. SP Returns a listing of all streets within a postal code. * Moves down in the data at the same level, equivalent to the DOWN command. TOP Moves up in the data to the first entry. BOT Moves down in the data to the last entry. OPEN Validates the database version and returns the “signature” of the Canadian CODE-1 Plus database currently in use. QUIT Closes the database and clears all work areas. DOWN Moves down in the data at the same level; equivalent to an asterisk (*). UP Moves up in the data at the same level. BACK Returns to the previous data level.

7-100 G1C6LK-SEARCH- 94 This field defines the various address components used in the CRITERIA address search: Name Length G1C6LK-STREET-NAME 30 G1C6LK-MUNI-NAME 38 G1C6LK-PROV-ABBREV 2 G1C6LK-PCD 6 G1C6LK-HS-NBR 10 G1C6LK-AP-NBR 8

Release 3.4.0 171 User Guide - IBM® i Canadian CODE-1 Plus Matching Module - C6MATCH

Position Name Length Comments

101-118 G1C6LK-MAX- 18 These packed decimal fields (which have an internal length of RETURN- three but can pack five-digit numbers) are required for all G1C6LK CONTROL calls except OPEN. They allow you to specify the number of data rows you want returned by the current command. Here, there is one counter for each of the address elements. Populate the desired counter with a value and clear out the rest. The maximum value is 25. You may access additional rows by invoking G1C6LK multiple times (using the “*”, or asterisk, command). Name Length G1C6LK-MAX-MUNIS 5 G1C6LK-MAX-STREETS 5 G1C6LK-MAX-PCDS 5 G1C6LK-MAX-HOUSES 5 G1C6LK-MAX-APTS 5 G1C6LK-MAX-LVRS 5

119-120 G1C6LK-SELECT 2 Specify the occurrence of data to be used for browsing further into the database. For example, entering “02” could indicate that the second municipality name used for a street lookup.

121-150 Reserved 30

151-229 G1C6LK-RMSG 79 This field contains any returned error or informational messages.

230-233 G1C6LK-RETURN- 4 G1C6LKP returns one of the following codes: CODES blank The command was successful. IN01-IN09 Non-fatal error - An invalid command string was specified in G1C6LK-COMMAND. The command may be invalid for one of two reasons: 1 - Illegal command string 2 - Command is not allowed at this point in the database hierarchy LK01 Fatal error - Invalid command requested. LK02 Fatal error - Non-numeric SELECT FIELD passed. LK03 Fatal error - MAX-RETURN-CONTROL counter was out of range. LK04 Fatal error - Incompatible database found. 0040 Non-fatal error - Postal codes do not exist for the selected item. 0041 Non-fatal error - No firms exist for the selected item. 0042 Non-fatal error - No houses/apartments exist for the selected item. 0043 Non-fatal error - No apartments exist for the selected item. 0045 Non-fatal error - No streets exist for the selected item. 0050 Information - Alias information was returned in the G1C6LK-ALIASINFO field only. (Usually information is returned to the table in G1C6LK- DATA-TABL.)

234-236 Reserved 3

237-331 G1C6LK-DB- 95 The fields in this group are populated as a result of the “OPEN” SIGNATURE command. They contain the month and year string for the vintage date of the database, as well as the software data. Name Length G1C6LK-DB-RELEASE 20 G1C6LK-SW-RELEASE 20 Filler 55

Release 3.4.0 172 User Guide - IBM® i Chapter 8: Using Callable Routines Canadian CODE-1 Plus Matching Module - C6MATCH

Position Name Length Comments

332-410 G1C6LK-LINE- 79 Used by the caller to examine lines returned by the call. Once a BREAKDOWN result set is returned, each line may be moved here from the area starting at position x(25x79) for further analysis. See the provided copybook for examples of the various layouts that can be returned.

411-489 MU-LINE 79 REDEFINE

490-564 MPC-LINE 75 REDEFINE

565-717 SC-LINE 153 REDEFINE

718-796 SPC-LINE 79 REDEFINE

797-875 HS-LINE1 79 REDEFINE

876-968 HS-LINE 93 REDEFINE

969- LVR-LINE 79 1047 REDEFINE

1048- AH-LINE 79 1126 REDEFINE

1127- G1C6LK-POSITION 2 The position of the data returned in relation to all available data: 1128 “T” Top “ “ Middle “B” Bottom “TB” All.

1129- G1C6LK-LAST- 3 Last successful position within the database based on the user’s 1131 LEVEL request.

1132- G1C6LK-RESULT- 97 Data identified by G1C6LKP as required (through G1C6LK- 1228 DATA SELECT) to search further into the database. Name Length G1C6LK-RESULT-MUNI-NAME 30 G1C6LK-RESULT-PROV-ABBREV 2 G1C6LK-RESULT-STREET-NAME 38 G1C6LK-RESULT-PCD 6 G1C6LK-RESULT-HS-RANGE 21

1229- G1C6LK-DATA- 25 (X 25 occurrences of 79 bytes of data returned from the current 3203 TABL 79) request. The number of occurrences of valid data depends on the applicable G1C6LK-MAX-RETURN-CONTROL value, but cannot exceed 25.

3204- Reserved 103 3306

3307- G1C6LK-IPC- 10,000 This area is reserved for inter-program communications. 13306 AREAS NOTE: DO NOT CHANGE THIS FIELD

Release 3.4.0 173 User Guide - IBM® i Canadian CODE-1 Plus Matching Module - C6MATCH

Release 3.4.0 174 User Guide - IBM® i Using the Interactive 9 System

In this chapter

 Getting Started with the Interactive System ...... 176  Using the Interactive System Screen ...... 178  Example Work Session ...... 184  Interactive Screen Reference ...... 189  Address Matching Screens ...... 191  Database Inquiry Screens ...... 198  Customizing Screens...... 203 Getting Started with the Interactive System Getting Started with the Interactive System

The Canadian CODE-1 Plus Interactive System is an environment where you can match and correct addresses online through one easy-to-use screen. This screen enables you to use the two main functions, Address Matching and Database Inquiry, and a secondary function that enables you to correct non-coded records. (You must implement the user-exit G1C6BNC to correct uncoded records interactively.)

 To minimize maintenance, the interactive screens in this chapter do not display the database version and the date stamp.

Address Matching Function The interactive address matching function enables you to: • Match a single input address against the master file • Analyze return codes to determine actions that were taken to attempt a match • Detect the types and quantities of problems encountered in an input address.

 For more information about these return codes, see the Return Codes Screen section of this chapter.

For each match attempt, Canadian CODE-1 Plus displays return codes that indicate the success or reason for failure of the attempt.

In addition to the return codes, Canadian CODE-1 Plus shows you parsed address elements for each match attempt.

Database Inquiry Function The database inquiry function lets you browse the contents of the Canadian CODE-1 Plus database. Using this feature, you can look up houses, apartments, and firms on a given street, in a particular municipality.

The database inquiry function enables you to display and analyze the following information for each municipality in the Canadian CODE-1 Plus database: • Municipality name • Details within a postal code • Streets within a municipality • House ranges on a street

Correcting Uncoded Records Function When you run a batch job in Canadian CODE-1 Plus, you can generate an uncoded records output file (C6BMNCO). This file contains records with valid postal codes, but for some reason, the records did not match against the database. With a supplied user-exit, you can correct these records in the Canadian CODE-1 Plus interactive system. You display an uncoded record in the input area, correct the record, write the corrected record to a corrected output file, and then display the next uncoded record.

Release 3.4.0 176 User Guide - IBM® i Chapter 9: Using the Interactive System Getting Started with the Interactive System

To take advantage of this functionality, you or someone at your site must write a program called G1C6BNC to do the following: • Read the records from the file • Pass the record to the interactive system • Wait for the user to correct the record • Receive the record back from the interactive system • Write the corrected record to an output file.

Accessing the Canadian CODE-1 Plus Interactive System 1. Access the Canadian Products Selection screen using your site’s procedure.

Group 1 Application Selection

Select one of the following: 1. MailStream Plus Presorting and Reporting System 2. List Conversion System 3. Label Printing System 4. Merge/Purge System 5. CODE-1 Plus Name/Address Coding System 6. Generalized Selection System 7. EZ-CASE Plus 8. Geographic Coding Plus 9. I/O-Jet Plus 10. Business Merge/Purge Plus 11. GeoTAX 12. VeriMove

60. Canadian/International Products Option 60

F3=Exit

Release 3.4.0 177 User Guide - IBM® i Using the Interactive System Screen

2. Type 60 in the Option field to select Canadian products; press Enter.

Group 1 Application Selection

Select one of the following: 1. MailStream Plus Presorting and Reporting System 2. List Conversion System 3. Label Printing System 4. Merge/Purge System 5. CODE-1 Plus Name/Address Coding System 6. Generalized Selection System 7. EZ-CASE Plus 8. Geographic Coding Plus 9. I/O-Jet Plus 10. Business Merge/Purge Plus 11. GeoTAX 12. VeriMove 60. Canadian/International Products Option 60

F3=Exit

3. At the next screen, type 2 on the option line to start Canadian CODE-1 Plus and to display the Work with Jobs screen. 4. Press F8 to start the Interactive System.

Using the Interactive System Screen

The Canadian CODE-1 Plus Interactive System contains a screen that has the address matching function on the top half and the database inquiry function on the bottom half.

Canadian CODE-1 Plus ------LVR Name: Address 2: Input Fields Address 1: City, Prov: Postal Code: Correct Addr: Y Matched Addr:

City, Prov PCD: ------Command: Top Municipality Information LN Municipality/Directory Area Prov Short Name 1 ABBEY SK ABBEY 2 ABBOTSFORD BC ABBOTSFORD 3 ABBOTSFORD QC ABBOTSFORD 4 ABEE AB ABEE Match Results 5 ABENAKIS QC ABENAKIS 6 ABENAKIS SPRINGS QC ABENAKIS SPRI 7 ABERCORN QC ABERCORN

1=Help 3=Quit 4=SMU 5=DPC 8=Down 9=Mat 10=Flip

Release 3.4.0 178 User Guide - IBM® i Chapter 9: Using the Interactive System Using the Interactive System Screen

From this screen, you can choose to enter an address and attempt a match or display database information. • Input Fields (top half of screen) – Input fields where you enter the address to match. • Match Results (bottom half of screen) – Output fields containing the returned standardized address. • Command Field – Enter screen commands • Position in List – Where vertically the screen is positioned [vertically] in the list. • Database Inquiry – An alphabetical list of requested information. • Function Keys – How you access other functions in the address matching or database inquiry components.

Online Help Help is available on three levels: • Context-sensitive help • System tutorial • List of commands To access the online help facility from any screen in the Canadian CODE-1 Plus Interactive System, enter HELP in the Command field or press function key F1 or the HELP key. The online help facility displays a menu, and you can choose to see the tutorial, a list of all valid commands, or context sensitive help on the screen that was displayed when you accessed the online help facility.

• To exit the help facility, press function key F10 or enter X in the Selection field.

Address Matching To match an address, follow the steps below. 1. Move your cursor to the top of the screen using the TAB key, arrow keys, or Field Exit key. 2. Enter any LVR name, primary and secondary address lines, municipality, province, and/or postal code. 3. Press ENTER. Canadian CODE-1 Plus searches the database to find an address that matches the one you entered. If a match is found, the standardized address line and the standardized municipality/province/postal code line appear for you on the top half of the screen.

Release 3.4.0 179 User Guide - IBM® i Using the Interactive System Screen

4. You can display other match result information by entering RC (return codes) or MAT in the Command field, or by pressing F9. The Return Codes screen appears. This is the first match results screen in a series. Match results screens are described in the following section that presents more detail about your match attempt.

Canadian CODE-1 Plus

LVR Name: BANQUE ROYALE PARC LAURIER Address 2: Address 1: 351 LAUREL AV City, Prov: MONTREAL QUEBEC Postal Code: H2U2K4

Matched Addr: City, Prov PCD:

Command: Top RC - Return Codes (1 of 4)

General RC: Overall Prob: CPC Rec. Type: Source of Addr: Correction RC: 'best fit' PCDs:

Results Section shows you First four multiple PCDs: the return codes from your Extra Information: match attempt.

1=Help 3=Quit 5=RE 8=Down 9=Inq 10=Flip

Scrolling Match Results Screens

 For complete reference about the fields on each match results screen, review the Interactive Screen Reference.

Each Match Results screen shows you different information about your match attempt. These screens are the following: • RC - Return Codes screen • PE - Parsed Elements screen • ME - Multiple Elements screen • DI - Dropped Information Screen You can access these screens from anywhere in the system by typing the screen’s two-character code in the Command field. You can display these screens sequentially.

Database Inquiry The bottom half of the Canadian CODE-1 Plus Interactive System screen contains the first database inquiry screen. The database inquiry function supports the following screens: • DPC - Details in a postal code • HS - Houses on a street • MU - Municipality information • SMU - Streets in a municipality

Release 3.4.0 180 User Guide - IBM® i Chapter 9: Using the Interactive System Using the Interactive System Screen

To make any database inquiry screen take up all of the space on the screen, type FLIP in the Command field or press function key F9 or F10. More lines are available to display additional information stored in the database. To restore the screen to the original display, enter FLIP again in the Command field. Navigating the Screens You can access the MU database inquiry screen from anywhere in the system by typing the screen’s two-character code in the Command field. For instance, to access the municipality information from a Details in a Postal Code screen, type MU and press Enter. An alphabetical listing of businesses in that municipality will appear. To scroll through data on any screen, use the DOWN command (F8) or the UP command (F7). Moving to a Specific Line on a Screen To position the data on the screen to a specific spot alphabetically, type L (short for locate) in the Command field, then type the search string and press the ENTER key. For example, if you wanted to position the list to Montreal while displaying a Cities screens, you would enter L MONTREAL in the Command field. The first municipality that matches would be displayed first. Displaying Data About a Database Entry 1. Start at the first database inquiry screen. 2. Enter FLIP in the Command field. 3. Enter L MONTREAL in the Command field to change the screen display: database inquiry:

Canadian CODE-1 Plus ------Command: SMU 1 Mid Municipality Information

LN Municipality/Directory Area Prov Short Name 1 MONTREAL QC MONTREAL 2 MONTREAL LAKE SK MONTREAL LAKE 3 MONTREAL NORD QC MONTREAL NORD 4 MONTREAL RIVER HARBOUR ON MONTL-RIV-HBR 5 MONTREAL-EST QC MONTREAL-EST 6 MONTREAL-NORD QC MONTREAL-NORD 7 MONTREAL-OUEST QC MONTREAL-O 8 MONTREAL-WEST QC MONTREAL-WEST 9 MONTREVILLE QC MONTREVILLE 10 MONTROSE BC MONTROSE 11 MONTROSE NS MONTROSE 12 MONTROSE ON MONTROSE 13 MONTROSE PE MONTROSE 14 MONUMENT NB MONUMENT 15 MOON LAKE AB MOON LAKE 16 MOON BEAM ON MOONBEAM

1=Help 2=SPC 3=Quit 4=SMU 5=DPC 7=Up 8=Down 9=Mat 10=Flip

Release 3.4.0 181 User Guide - IBM® i Using the Interactive System Screen

4. Enter SMU 1 in the Command field.

 You can also enter SMU only. Line 1 is the default line number.

The cursor moves to the Streets in a Municipality screen for the municipality on the first line of the display (in this case, Montreal, QC).

Canadian CODE-1 Plus ------Command: Top Streets in MONTREAL QC

LN Dir Street Name 1 P.O. BOX 2 GENERAL DELIVERY 3 A. A. DESCROCHES 4 ABBOTT 5 ABELARD 6 ABERCORN 7 ABERDARE 8 ABERDEEN 9 ABRAMS 10 ACADEMY 11 ACADIA 12 ACADIE 13 ACAJOU 14 ACHILLE-FORTIER 15 ACHIM 16 ACORN

1=Help 3=Quit 4=HS 6=Back 8=Down 9=Mat 10=Flip

5. Enter DOWN in the Command field or press F8 to show additional streets in Montreal, QC.

.

Canadian CODE-1 Plus ------Command: Mid Streets in MONTREAL QC

LN Dir Street Name 1 ACORN 2 ACRES 3 ADAIR 4 ADALBERT 5 ADAM 6 ADAMS 7 ADDINGTON 8 ADDISON 9 ADHEMAR-MAILHIOT 10 ADOLPHE-CARON 11 ADOLPHE-RHO 12 ADRIEN-HEBERT 13 ADRIENNE 14 AESOP 15 AETERNA 16 AGINCOURT

1=Help 3=Quit 4=HS 6=Back 7=Up 8=Down 9=Mat 10=Flip

Release 3.4.0 182 User Guide - IBM® i Chapter 9: Using the Interactive System Using the Interactive System Screen

6. Enter HS 6 in the Command field or press F4 to see the display of houses on streets with the name 2 ND. This screen displays the street types and directionals, house ranges, even/odd indicators, unit ranges, LVR names, and postal codes.

Canadian CODE-1 Plus ------Command: ______All Houses on ADAMS, MONTREAL QC

LN House Range E/O Unit Range LVR/Government Dept Postal Code 1 ADAMS AV 2 206-234 E H9R5Y6 3 207-235 O H9R5Y6 4 236-242 E H9R5Y4 5 237-245 O H9R5Y4

1=Help 3=Quit 6=Back 9=Mat 10=Flip

Optionally, you can enter CITY in the Command field to show city names only.

Canadian CODE-1 Plus ------Command: ______All Houses on ADAMS, MONTREAL QC

LN House Range E/O Unit Range Municipality/Directory Area Postal Code 1 ADAMS AV 2 206-234 E POINTE-CLAIRE H9R5Y6 3 207-235 O POINTE-CLAIRE H9R5Y6 4 236-242 E POINTE-CLAIRE H9R5Y4 5 237-245 O POINTE-CLAIRE H9R5Y4

1=Help 3=Quit 6=Back 9=Mat 10=Flip

Release 3.4.0 183 User Guide - IBM® i Example Work Session Example Work Session

The remainder of this chapter is devoted to an example of how to use the interactive functions to correct problem addresses. The first step is to access the interactive matching function and enter an address. The address will not match, so we use the database inquiry to see if our “detective” skills enable us to find the address. Once we find an address, we return to the address matching function to look at the results of a match.

 Review the section titled Interactive Screen Reference for details on the system screens.

The input address is: BANQUE ROYALE PARC LAURIER 351 LAURIAULT AV MONTREAL, QC H2U2K4 In the following example, follow the steps below to match and correct an input address. • Access the Canadian CODE-1 Plus Interactive System (F8 from the Work with Jobs screen). • Query the postal database to determine the correct address. • Successfully match the corrected input address, producing parsed address elements and output return codes.

Step 1. Accessing the Interactive System 1. Interactive System.

Canadian CODE-1 Plus ------LVR Name: Address 2: Address 1: City, Prov: Postal Code: Correct Addr: Y

Matched Addr:

City, Prov PCD: ------Command: Top Municipality Information LN Municipality/Directory Area Prov Short Name 1 ’OLDEN HILL AB ’OLDEN HILL 2 ABBEY SK ABBEY 3 ABBOTSFORD BC ABBOTSFORD 4 ABBOTSFORD QC ABBOTSFORD 5 ABEE AB ABEE 6 ABENAKIS QC ABENAKIS 7 ABENAKIS SPRINGS QC ABENAKIS SPRI

1=Help 3=Quit 4=SMU 5=DPC 8=Down 9=Mat 10=Flip

2. Type the address and press ENTER.

The match attempt is unsuccessful (there is no match address or municipality/postal code line displayed).

Release 3.4.0 184 User Guide - IBM® i Chapter 9: Using the Interactive System Example Work Session

3. Next, review why a match was not found.

.

Canadian CODE-1 Plus ------LVR Name: BANQUE ROYALE PARC LAURIER Address 2: Address 1: 351 LAURIAULT AV City, Prov: MONTREAL QUEBEC Postal Code: H2U2K4

Matched Addr:

City, Prov PCD: ------Command: ______Top RC - Return Codes (1 of 4)

General RC: H Overall Prob: 1 CPC Rec. Type: Source of Addr: Correction RC: N 'best fit' PCDs:

First four multiple PCDs: Extra Information:

1=Help 3=Quit 5=RE 8=Down 9=Inq 10=Flip

Return codes appear on the screen for “General RC” and “Correction RC.” In this example, the General RC of H means “House out of Range” and the Correction RC of N means “non- correctable.”

4. Type DOWN in the Command field; press ENTER or F8 to display the Parsed Elements screen:

.

Canadian CODE-1 Plus ------LVR Name: BANQUE ROYALE PARC LAURIER Address 2: Address 1: 351 LAURIAULT AV City, Prov: MONTREAL QUEBEC Postal Code: H2U2K4

Matched Addr:

City, Prov PCD: ------Command: ______Mid PE - Parsed Elements (2 of 4)

Civic #: 351 Dir: Street: LAURIAULT Type: AV

Route: 000 RR Box: PO Box: Unit Info: D I Type/Qual: Short City: D I Area Name: Postal Code: 1 1=Help 3=Quit 5=RE 7=Up 8=Down 9=Inq 10=Flip

The postal code field is blank, indicating that the input postal code was also invalid.

Release 3.4.0 185 User Guide - IBM® i Example Work Session Step 2. Querying the Database 1. To change to the database inquiry function, type INQ and press ENTER or F9. The lower half of the screen changes and displays the list of cities in the database.

.

Canadian CODE-1 Plus ------LVR Name: BANQUE ROYALE PARC LAURIER Address 2: Address 1: 351 LAURIAULT AV City, Prov: MONTREAL QC Postal Code: H2U2K4 Correct Addr: Y

Matched Addr:

City, Prov PCD: ------Command: ______Top Municipality Information LN Municipality/Directory Area Prov Short Name 1 ’OLDEN HILL AB ’OLDEN HILL 2 ABBEY SK ABBEY 3 ABBOTSFORD BC ABBOTSFORD 4 ABBOTSFORD QC ABBOTSFORD 5 ABEE AB ABEE 6 ABENAKIS QC ABENAKIS 7 ABENAKIS SPRINGS QC ABENAKIS SPRI

1=Help 3=Quit 4=SMU 5=DPC 8=Down 9=Mat 10=Flip

2. Type L Montreal in the Command field; press ENTER. Montreal is now at the top of the list. Other Montreal cities appear on the page. None of the additional cities has the target postal code range.

Canadian CODE-1 Plus ------LVR Name: BANQUE ROYALE PARC LAURIER Address 2: Address 1: 351 LAURIAULT AV City, Prov: MONTREAL QUEBEC Postal Code: H2U2K4

Matched Addr:

City, Prov PCD: ------Command: ______Mid Municipality Information LN Municipality/Directory Area Prov Short Name 1 MONTREAL QC MONTREAL 2 MONTREAL LAKE SK MONTREAL LAKE 3 MONTREAL NORD QC MONTREAL NORD 4 MONTREAL RIVER HARBOUR ON MONTL-RIV-HBR 5 MONTREAL-EST QC MONTREAL-EST 6 MONTREAL-NORD QC MONTREAL-NORD 7 MONTREAL-OUEST QC MONTREAL-O

1=Help 2=SPC 3=Quit 4=SMU 5=DPC 7=Up 8=Down 9=Mat 10=Flip

3. Type smu 1 in the command field to display all of the streets in Montreal starting with “Lauriault.”

Release 3.4.0 186 User Guide - IBM® i Chapter 9: Using the Interactive System Example Work Session

4. When you get to the street names, type “L Lauriault” and press ENTER to display the Streets in Montreal QC screen.

Canadian CODE-1 Plus ------LVR Name: BANQUE ROYALE PARC LAURIER Address 2: Address 1: 351 LAURIAULT AV City, Prov: MONTREAL QC Postal Code: H2U2K4

Matched Addr:

City, Prov PCD: ------Command: ______Mid Streets in MONTREAL QC LN Street Name 1 LAURIAULT 2 LAURIE 3 LAURIER 4 LAURIN 5 LAUSANNE 6 LAUZON 7 LAVAL

1=Help 3=Quit 4=HS 6=Back 7=Up 8=Down 9=Mat 10=Flip

5. Type HS 1 to see the details of Lauriault street.

Canadian CODE-1 Plus ------LVR Name: BANQUE ROYALE PARC LAURIER Address 2: Address 1: 351 LAURIAULT AV City, Prov: MONTREAL QC Postal Code: H2U2K4

Matched Addr:

City, Prov PCD: ------Command: ______All Houses on LAURIAULT, MONTREAL QC LN House Range E/O Unit Range LVR/Government Dept Postal Code 1 LAURIAULT RUE 2 3075-3377 O H4K1T5 3 3100-3442 E H4K1T6

1=Help 3=Quit 6=Back 9=Mat 10=Flip

• You will notice that it does not show “Banque Royale Parc Laurier” in the LVR field, and the house number is not valid for this street. • Looking at the postal code, we can see that the third character is a U, which is not a valid character for a Canadian postal code. V is frequently mis-typed as U. Therefore, we could look at the street information for postal code H2V2K4.

Release 3.4.0 187 User Guide - IBM® i Example Work Session

6. Enter DPC H2V 2K4 in the Command line and press Enter to display the addresses associated with postal code H2V2K4.

Canadian CODE-1 Plus ------LVR Name: BANQUE ROYALE PARC LAURIER Address 2: Address 1: 351 LAURIAULT AV City, Prov: MONTREAL QC Postal Code: H2U2K4

Matched Addr:

City, Prov PCD: ------Command: ______All Postal Code: H2V2K4 City: MONTRÉAL QC LVR: BANQUE ROYALE PARC LAURIER 1 LAURIER AV W 000351 -000351 O

1=Help 3=Quit 5=DPC 6=Back 9=Mat 10=Flip

The house range and the LVR name match are different. The match is close; however, the street name is different. The street name was likely misspelled.

Step 3. Matching an Updated Address Enter the inaccurate/incorrect address and look at the match return codes.

Canadian CODE-1 Plus ------LVR Name: BANQUE ROYALE PARC LAURIER Address 2: Address 1: 351 LAURIAULT AV City, Prov: MONTREAL QC Postal Code: H2U2K4

Matched Addr:

City, Prov PCD: ------Command: ______Top RC - Return Codes (1 of 4)

General RC: Overall Prob: 9 CPC Rec. Type: B1 Source of Addr: P Correction RC: V 'best fit' PCDs:

First four multiple PCDs: Extra Information:

1 1=Help 3=Quit 5=RE 8=Down 9=Inq 10=Flip

The General RC field is blank, indicating a database match, and the Correction RC is V, indicating a valid address.

Release 3.4.0 188 User Guide - IBM® i Chapter 9: Using the Interactive System Interactive Screen Reference

Correcting Uncoded Records

 This function requires the G1C6BNC user-exit program.

You can correct uncoded records from the G1C6BNC output file. Use the UR (User Read) and UW (User Write) commands, described below. To correct uncoded records from the C6BMNCO output file, start at the Canadian CODE-1 Plus Interactive System screen.

1. Type UR in the Command field to display an uncoded address in the input area. 2. You can use any address matching or database inquiry functions necessary to match this address.

3. Once the uncoded address is matched to the database and corrected, type UW in the Command field. Canadian CODE-1 Plus writes the corrected address to an output file. Repeat these steps to correct additional output file records.

Interactive Screen Reference

This half of the chapter provides complete reference for the Canadian CODE-1 Plus Interactive System screens. Each screen is presented, along with its fields and function keys.

Command Field The Command field appears on every screen in the Canadian CODE-1 Plus Interactive System. This field allows you to move through address match attempt results as well as database inquiry data. The following table lists all of the commands you can enter in the Command field as well as alternate actions you can take to accomplish the same results. For each command listed, the underlined portion is all that is required for entry; however, you may enter the entire command string.

Command Description Alternate Method

General Commands

BOTTOM Move to the bottom of the data. In the address None match function this command brings you to the Base Address/Dropped Information screen. In the database inquiry function this command repositions the list of data to the last entry.

DOWN Move down one “screenful” of data. In the address Press F8 match function this command moves you to the next match results screen. In the database inquiry function this command repositions the list of data down one “screenful.”

FLIP Flip the screen from the combined functions to the Press F10 zoomed database inquiry function or from the zoomed database inquiry function to the combined functions, whichever is appropriate.

HELP Access the online help system. Press F1

QUIT Exit from the Canadian CODE-1 Plus interactive Press F3 system.

Release 3.4.0 189 User Guide - IBM® i Interactive Screen Reference

Command Description Alternate Method

TOP Move to the top of the data. In the address match None function this command brings you to the Return Code screen. In the database inquiry function this command repositions the list of data to the first entry.

UP Move up one “screenful” of data. In the address Press F7 match function this command moves you to the previous match results screen. In the database inquiry function this command repositions the list of data up one “screenful.”

Database Inquiry Commands

ADMIN Enter, and optionally update, the password None required to access the site default update screens.

BACK Return to the previous database inquiry level. (For Press F6 example, if you were at the Streets in a Municipality screen, this command would take you back to the Municipalities in the Database screen.)

DPC Move to the Details in a Postal Code screen for the Type the desired postal code that you typed. postal code in the Command field and press F5 from the Municipalities screen.

HS Move to the Houses on a Street screen for the Type the desired line street name that is displayed on line . number in the This command is only valid from the Streets in a Command field and Municipality or Streets in a Postal Code screens. then press F4. Or, position your cursor on the desired line and press F4.

LOCATE Positions the database inquiry to the first entry that None starts with .

MATCH Go to the address match function. (The match Press F9 results screen that was displayed when you accessed the database inquiry function will be re- displayed.)

MU Go to the Municipality Information screen. None

SMU Move to the Streets in a Municipality screen for the Type the desired line municipality name that is displayed on line . This command is only valid from the Command field and Municipalities in the Database screen. then press F4. Or, position your cursor on the desired line and press F4.

Address Match Commands

INQUIRY Go to the database inquiry function. If you had Press F9 previously used the database inquiry function during this session, the screen that was displayed when you left the database inquiry function will be re-displayed.

REFRESH Clear all fields on all address match function Press F5 screens.

Release 3.4.0 190 User Guide - IBM® i Chapter 9: Using the Interactive System Address Matching Screens Address Matching Screens

The screens shown in this section of the chapter support the address matching function. They are listed in alphabetical order.

Address Match Screen The Address Match screen occupies the top half of the physical screen in the Canadian CODE-1 Plus interactive system. The only time this screen does not appear is when you have entered the FLIP command to cause the database inquiry function to be displayed on the entire physical screen. In all other cases, the Address Match screen will be shown as follows:.

Canadian CODE-1 Plus ------LVR Name: BANQUE ROYALE PARC LAURIER Address 2: Address 1: 351 LAURIAULT AV City, Prov: MONTREAL QC Postal Code: H2U2K4

Matched Addr:

City, Prov PCD: ------Command: Top Municipality Information LN Municipality/Directory Area Prov Short Name 1 ’OLDEN HILL AB ’OLDEN HILL 2 ABBEY SK ABBEY 3 ABBOTSFORD BC ABBOTSFORD 4 ABBOTSFORD QC ABBOTSFORD 5 ABEE AB ABEE 6 ABENAKIS QC ABENAKIS 7 ABENAKIS SPRINGS QC ABENAKIS SPRI

1=Help 3=Quit 4=SMU 5=DPC 8=Down 9=Mat 10=Flip

This screen allows you to enter an input address that you want Canadian CODE-1 Plus to match against the database. Canadian CODE-1 Plus will return the matched, standardized address for you.

Fields

Field Name Description

LVR Name (input) The name of the LVR for the record to match; optional

Secondary Addr (input) The secondary address line for the record to match; optional

Primary Addr (input) The primary address for the record to match; optional

Municipality, Prov The municipality and province for the record to match. You may enter the (input) province name or abbreviation; optional.

Postal Code (input) The postal code for the record to match; optional

Matched Addr The matched standardized address, including apartment number

City, Prov PCD The matched standardized municipality/province/postal code line

Release 3.4.0 191 User Guide - IBM® i Address Matching Screens

Function Keys

Function Key Name Description

F1 HELP Display online help.

F3 QUIT Exit from the Canadian CODE-1 Plus Interactive System.

F4 SMU Go to the Streets in a Municipality screen.

F5 DPC Go to the Details in a Postal Code screen.

F8 DOWN Go to the next screen.

F9 MAT Go to the Return Codes screen.

F10 FLIP Expand the database inquiry function to fill the entire screen.

Return Codes Screen The Return Codes screen shows return codes that correspond to the match attempt. Access this screen by entering RC in the Command field.

Canadian CODE-1 Plus ------LVR Name: BANQUE ROYALE PARC LAURIER Address 2: Address 1: 351 LAURIAULT AV City, Prov: MONTREAL QC Postal Code: H2U2K4

Matched Addr:

City, Prov PCD: ------Command: ______Top RC - Return Codes (1 of 4)

General RC: Overall Prob: 3 CPC Rec. Type: 11 Source of Addr: S Correction RC: C 'best fit' PCDs:

First four multiple PCDs: Extra Information:

1 1=Help 3=Quit 5=RE 8=Down 9=Inq 10=Flip

Release 3.4.0 192 User Guide - IBM® i Chapter 9: Using the Interactive System Address Matching Screens

Fields

Field Name Description

General RC A 1-byte return code indicating the success or reason for failure of the match attempt: blank The address match attempt was successful A Unit number missing or not found on database B Insufficient (or blank) address information for a match H House/Box number not found on street M Multiple matches were found N Input address was non-correctable P PO Box number not found R Rural service number not found S Street name not found in postal code Z Postal code not found on database

Overall Prob A single digit that indicates the probable correctness of the address and LVR name match: blank No match was found 0 The match is least likely to be correct 1-8 These values represent intermediate values on a sliding scale 9 The match is most likely to be correct

CPC Rec. Type The CPC-defined type code postal code record used for matching: * Unknown A1 High rise B1 LVR street 11 Street 21 Street served by Route 32 PO Box 42 Route service 52 General delivery

Source of Addr. A 1-byte code indicating whether the output street address was matched from the primary address line or the secondary address line: P Primary line S Secondary line M A combination of information from the two lines.

Correction RC A 1-byte code indicating the result of the address validation/correction: V Input was valid C Input was correctable N Input was non-correctable F Foreign input address

“Best fit” PCDs The number of “best fit” postal codes that were found during the match attempt

First Four Additional The first four additional postal codes that matched the input record but were PCDs not used as the output postal code

Extra Information Any miscellaneous data that was not used for matching but was presented in the address.

Release 3.4.0 193 User Guide - IBM® i Address Matching Screens

Function Keys

Function Key Name Description

F1 HELP Obtain online help.

F3 QUIT Return to the Main Menu.

F5 RE Refresh (erase) all of the input and output data from the screen.

F8 DOWN Go to the next match results screen.

F9 INQ Go to the database inquiry function.

F10 FLIP Go to the database inquiry function, and expand it to fill the entire physical screen.

 Entering the name of a key in the Command field is the same as pressing the function key (for example, to access online help, you could either press function key F1 or enter HELP in the Command field).

Parsed Elements Screen The Parsed Elements screen shows you the individual elements that make up the standardized address. If no address match was found, the fields on this screen will be blank. This screen is accessed by entering the PE command, or by pressing function key F8 from the Return Codes screen or F7 from the Multiple Elements screen.

Canadian CODE-1 Plus ------LVR Name: Address 2: 1209 ADANAC ST Address 1: City, Prov: BC Postal Code: V5K1A1 Matched Addr: 1209 ADANAC ST

City, Prov PCD: VANCOUVER BC V6A 2C8 ------Command: ______Mid PE - Parsed Elements (2 of 4)

Civic #: 1209 Dir: Street: ADANAC Type: ST

Route: 000 RR Box: PO Box: Unit Info: D I Type/Qual: Short City: VANCOUVER D I Area Name: Postal Code: V6A2C8

1=Help 3=Quit 5=RE 7=Up 8=Down 9=Inq 10=Flip

Release 3.4.0 194 User Guide - IBM® i Chapter 9: Using the Interactive System Address Matching Screens

Fields

Field Name Description

Civic # The returned house number

Street The returned street name

Type The returned street type (suffix)

Dir The returned trailing directional

Route The returned rural route number

RR Box The returned rural route box number

PO Box The returned post office box number

Unit Information The returned apartment designator (for example, STE, APT) and number

D I Type/Qual The returned delivery installation type and qualifier

D I Area Name The returned delivery installation area name

Short City The returned short city name

Postal Code The returned 6-digit postal code

Function Keys

Function Key Name Description

F1 HELP Obtain online help.

F3 QUIT Exit from the Canadian CODE-1 Plus Interactive System.

F5 RE Refresh (erase) all of the input and output data from the screen.

F7 UP Return to the previous match results screen.

F8 DOWN Go to the next match results screen.

F9 INQ Go to the database inquiry function.

F10 FLIP Go to the database inquiry function, and expand it to fill the entire physical screen.

 Entering the name of a key in the Command field is the same as pressing the function key (for example, to access online help, you could either press function key F1 or enter HELP in the Command field).

Release 3.4.0 195 User Guide - IBM® i Address Matching Screens Multiple Elements Screen The Multiple Elements screen shows you whether multiple match elements were found during the match attempt. This screen can be accessed by entering the ME command, or by pressing function key F8 from the Parsed Elements screen or F7 from the Dropped Information screen.

Canadian CODE-1 Plus ------LVR Name: Address 2: 1209 ADANAC ST Address 1: City, Prov: VANCOUVER BC Postal Code: V5K1A1

Matched Addr: 1209 ADANAC ST

City, Prov PCD: VANCOUVER BC V6A 2C8 ------Command: Mid ME - Multiple Elements (3 of 4)

Was apartment detected in input?: N Was ‘default record’ matched?:

1=Help 3=Quit 5=RE 7=Up 8=Down 9=Inq 10=Flip

Fields

Field name Description

Was apartment One-byte code indicating whether an apartment (or unit) was found on the detected in input? input record: Y Input apartment was detected N No input apartment was detected

Was “default record” One-byte code indicating whether the default record was matched: matched? blank The record matched was not the default record, or no match was obtained X Yes, the default record was matched O The only record on the database was the default record

Function Keys

Function Key Name Description

F1 HELP Display online help.

F3 QUIT Exit from the Canadian CODE-1 Plus Interactive System.

F5 RE Refresh (erase) all input and output data from the screen.

F7 UP Return to the previous match results screen.

F8 DOWN Go to the next match results screen.

Release 3.4.0 196 User Guide - IBM® i Chapter 9: Using the Interactive System Address Matching Screens

Function Key Name Description

F9 INQ Go to the database inquiry function.

F10 FLIP Go to the database inquiry function, and expand it to fill the entire physical screen.

Dropped Info Screen The Dropped Information screen shows you any information that was dropped (not used) during the matching process. This screen is accessed by entering the DI command.

Canadian CODE-1 Plus ------LVR Name: Address 2: 1209 ADANAC ST Address 1: City, Prov: VANCOUVER BC Postal Code: V5K1A1

Matched Addr: 1209 ADANAC ST

City, Prov PCD: VANCOUVER, BC V6A 2C8 ------Command: Bot (4 of 4) DI - Dropped Info

Dropped Information: Address 1: Address 2:

1=Help 3=Quit 5=RE 7=Up 9=Inq 10=Flip

Fields

Field Name Description

Dropped Information Any characters dropped from the primary address line when it was parsed. Address 1

Dropped Information Any characters dropped from the secondary address line when it was Address 2 parsed.

Function Keys

Function Key Name Description

F1 HELP Obtain online help.

F3 QUIT Exit from the Canadian CODE-1 Plus interactive system.

F5 RE Refresh (erase) all of the input and output data from the screen.

F7 UP Return to the previous match results screen.

Release 3.4.0 197 User Guide - IBM® i Database Inquiry Screens

Function Key Name Description

F9 INQ Go to the database inquiry function.

F10 FLIP Go to the database inquiry function, and expand it to fill the entire physical screen.

Database Inquiry Screens

The screens shown in this section all support the database inquiry function. They are listed in alphabetical order by command line entry.

Details in a Postal Code Screen The Details in a Postal Code screen shows an alphabetical listing of all of the streets and LVRs in a given postal code. For each street listed, Canadian CODE-1 Plus displays the street name string (including directional and suffix), the house number ranges, and the unit ranges. For any street that has more than one house number range, Canadian CODE-1 Plus will display each range on a separate line. The street name for such streets will only be displayed on the line that contains the first house range (see the following example screen). This screen is accessed by entering the DPC postal code command from any screen in the system. You must enter a specific postal code when using the DPC command.

Canadian CODE-1 Plus ------LVR Name: Address 2: 1209 ADANAC ST Address 1: City, Prov: VANCOUVER BC Postal Code: V5K1A1

Matched Addr: 1209 ADANAC ST

City, Prov PCD: VANCOUVER, BC V6A 2C8 ------Command: ______Top Postal Code: J0K1A0 City: QC LN Streets Hse Range E/O Unit Ranges 1 GENERAL DELIVERY BERTHIERVILLE 2 PO BOX BERTHIERVILLE 1 -1487 3 RR 1 BERTHIERVILLE 4 RR 2 BERTHIERVILLE 5 RR 3 BERTHIERVILLE 6 AUCOIN RUE 821 -1030 B 7 BARDOCHETTE RANG 60 -302 E 1 1=Help 3=Quit 5=DPC 6=Back 8=Down 9=Mat 10=Flip

Fields

Field Name Description

LN Street line number

Streets Street names

Release 3.4.0 198 User Guide - IBM® i Chapter 9: Using the Interactive System Database Inquiry Screens

Field Name Description

Hse Range Range of house numbers for this street

E/O Even/odd indicator for the house number range listed. This column will contain an E (for even), an O (for odd), or a B (for both).

Unit Ranges Number of apartment unit ranges on the street

Function Keys

Function Key Name Description

F1 HELP Display online help.

F3 QUIT Return to the Main Menu.

F5 DPC Display another postal code.

F6 BACK Return to the previous screen.

F8 DOWN Scroll the list so that the next 7 streets are displayed.

F9 MAT Go to the address matching function.

F10 FLIP Change the screen so that the data fills the entire physical screen.

Houses on a Street Screen The Houses on a Street screen shows you a listing of all of the house number ranges on a particular street. In addition to even/odd house number ranges, Canadian CODE-1 Plus shows you postal codes, apartment ranges, and LVR names.

Specify the HS line number command, or press F4, to display the Streets in a Municipality screens.

Canadian CODE-1 Plus ------LVR Name: Address 2: Address 1: 2 ROBERT SPECK PKY #670 City, Prov: ON Postal Code: L4Z1H8 Correct Addr: Y Matched Addr: 2 ROBERT SPECK PKY

City, Prov PCD: MISSISSAUGA ON L4Z 1H8 ------Command: All Houses on ROBINSON, MISSISSAUGA ON LN House Range E/O Unit Range LVR/Government Dept Postal Code 1 ROBINSON ST 2 2515-2545 O L5C2P2 3 2524-2546 E L5C2P3 4 2560-2580 E L5C2P4 5 2565-2577 O L5C2P5

1=Help 3=Quit 6=Back 9=Mat 10=Flip

Release 3.4.0 199 User Guide - IBM® i Database Inquiry Screens

 To view more lines of data, enter FLIP in the Command field, or press F10. You can also enter CITY in the Command field to toggle the display between LVR names and city names. However, there is no corresponding function key for this command.

Fields

Field Name Description

LN Line number of the house range

House Range House number range

E/O Indicator, E or an O, showing whether this is a range of only even-numbered or only odd-numbered houses

Unit Range Range of units on this street

LVR/Government Dept LVR or government name for the record or Municipality. or Municipality for this address name

Postal Code Postal Code for the houses in this range

Function Keys

Function Key Name Description

F1 HELP Obtain online help.

F3 QUIT Return to the Main Menu.

F6 BACK Return to the previous screen.

F8 DOWN Scroll the list so that the next 7 house ranges are displayed.

F9 MAT Go to the address matching function.

F10 FLIP Change the screen so that the data fills the entire physical screen.

Municipality Information Screen The Municipality Information screen shows you an alphabetical listing of all of the municipality names in the Canadian CODE-1 Plus database. For each municipality, this screen also displays the province abbreviation.

Release 3.4.0 200 User Guide - IBM® i Chapter 9: Using the Interactive System Database Inquiry Screens

This screen is displayed when you first access the Canadian CODE-1 Plus interactive system. If you switch to any of the address match results screens, you can return to this screen by entering MU in the Command field.

Canadian CODE-1 Plus ------LVR Name: Address 2: Address 1: 1 LOWER BATTERY RD City, Prov: ST JOHN'S NF Postal Code: A1

Matched Addr: 1 LOWER BATTERY RD

City, Prov PCD: ST. JOHN'S NF A1A 1A1 ------Command: ______Mid Municipality Information LN Municipality/Directory Area Prov Short Name 1 SAINT-ALEXIS-DE-MONTCALMQCST-ALEXIS-MLM 2 SAINT-ALEXIS-DES-MONTSQCST-ALEXIS-MTS 3 SAINT-ALFREDQCSAINT-ALFRED 4 SAINT-ALPHONSE-DE-CAPLANQCST-ALPH-D-CAP 5 SAINT-ALPHONSE-DE-GRANBYQCST-ALPH-D-GBY 6 SAINT-ALPHONSE-RODRIGUEZQCST-ALPH-RODR 7 SAINT-AMABLEQCSAINT-AMABLE

1=Help 2=SPC 3=Quit 4=SMU 5=DPC 7=Up 8=Down 9=Mat 10=Flip

 To view more lines of data, enter FLIP in the Command field, or press F10.

Fields

Field Name Description

LN Line number of the municipality

Municipality/Directory Municipality name or specific directory area (some Large Volume Receivers Area are listed as directory areas)

Prov Abbreviation for the province in which the municipality is located

Short Name Short municipality name

Function Keys

Function Key Name Description

F1 HELP Display online help.

F3 QUIT Return to the Main Menu.

F4 SMU Go to the Streets in a Municipality screen.

F5 SPC Go to the Details in a Postal Code screen.

F7 UP Scroll the list so that the previous 7 municipalities are displayed.

F8 DOWN Scroll the list so that the next 7 municipalities are displayed.

Release 3.4.0 201 User Guide - IBM® i Database Inquiry Screens

Function Key Name Description

F9 MAT Go to the address matching function.

F10 FLIP Change the screen so that the data fills the entire physical screen.

Streets in a Municipality Screen The Streets in a Municipality screen shows an alphabetical listing of all of the street names in a given municipality. This screen is accessed by entering the SMU command (or pressing F4) from the Municipalities in the Database screen.

Canadian CODE-1 Plus ------LVR Name: Address 2: Address 1: 1 LOWER BATTERY RD City, Prov: ST JOHN'S NF Postal Code: A1

Matched Addr: 1 LOWER BATTERY RD

City, Prov PCD: ST. JOHN'S NF A1A 1A1 ------Command: ______Top Streets in SAINT-ALEXIS-DE-MONTCALM QC LN Street Name 1 GENERAL DELIVERY 2 RURAL ROUTE 3 DU RUISSEAU RR 0001 4 LA GRANDE LIGNE RR 0001 5 LANDRY RR 0001 6 LIARD RR 0001 7 PETITE LIGNE RR 0001

1=Help 3=Quit 4=HS 6=Back 8=Down 9=Mat 10=Flip

 To view additional data, enter the FLIP in the Command field, or press function key F10.

Fields

Field Name Description

LN Street line number

Street Name Street names

Associated Route Route associated with the street, if any

Function Keys

Function Key Name Description

F1 HELP Obtain online help.

F3 QUIT Return to the Main Menu.

Release 3.4.0 202 User Guide - IBM® i Chapter 9: Using the Interactive System Customizing Screens

Function Key Name Description

F4 HS Go to the Houses on a Street screen.

F6 BACK Return to the Municipality Information screen.

F8 DOWN Scroll the list so that the next 7 streets are displayed.

F9 MAT Go to the address matching function.

F10 FLIP Change the screen so that the data fills the entire physical screen.

Customizing Screens

The screens shown in this section all support the interactive customizing.

Administration Sign-on Screen The Administration Sign-on screen allows you to type in, and optionally update, the password required to access the site default update screens. This screen is accessed by typing “ADMIN” from any match or database inquiry screen. The initial password is “GROUP1”; after entering this password, Canadian CODE-1 Plus will prompt you to enter a new password. The password change process can be stopped by pressing the space bar through both new password fields or by selecting Quit or Cancel. The Administration Sign-on screen is shown below.

Canadian CODE-1 Plus Administration Sign-on Screen ------

Password:

New Password:

G1M01I Enter Current Password and optional New Password 1=Help 3=Quit Enter=Process 10=Exit

Fields

Field Name Description

Password Area to type in current password

Release 3.4.0 203 User Guide - IBM® i Customizing Screens

Field Name Description

New Password Area to type in a new password. The new password must be 1-8 alphanumeric characters with no leading or embedded spaces.

Confirm New Password Area to re-type the new password for confirmation. This field will only be displayed if a new password has been entered.

Function Keys

Function Key Name Description

F1 HELP Display online help.

F3 QUIT Exit from the Canadian CODE-1 Plus Interactive System.

F10 EXIT Return to screen from which “ADMIN” was invoked.

Release 3.4.0 204 User Guide - IBM® i Chapter 9: Using the Interactive System Customizing Screens

Interactive Customization Screen The Interactive Customization screen allows you to view, and optionally update, the site-specific values you choose for your system. This screen is accessed by successfully entering the existing system password on the Administration Sign-on screen (accessed by the ADMIN command). Values on these screens are not updated unless you press F5 or select Save on the command line. Canadian CODE-1 Plus validates changed values when you press ENTER or Save. The Interactive Customization screen is shown below.

Canadian CODE-1 Plus ------Command: Interactive Customization Screen Page 1 of 1

Address Match Settings

English Apt Default: French Apt Default: Houses City/LVR Display: L Output Accents Flag: N Apartment Format Option: B Associated Route Delivery: D Non-civic Keyword Option: F Associated Delivery Office: D French Format Address Format: D Overflow Treatment Option: O Format Language Option: F Extra Information Option: Alternate City Flag: Y Last Updated on:

G1M06I Change current Site Default Settings as desired 1=Help 3=Quit 5=Save Enter=Verify 9=Reset 10=Exit

Fields

Field Name Description

English Apt Default Apartment identifier to format for English-format output records with no apartment identifier

French Apt Default Apartment identifier to format for French-format output records with no apartment identifier

Houses City/LVR Display Default House Range screen display column (City or LVR): C City column L LVR column

Output Accents Flag Default for accented data: N No accented data will be returned. Y Accented data will be returned. 1 Read and write data in an 8859-1 code page with multinationals will be returned.

Release 3.4.0 205 User Guide - IBM® i Customizing Screens

Field Name Description

Apartment Format Option Code indicating the placement of the apartment information in relation to the other address elements: D The output information will be formatted like the input information whenever possible to preserve the original format. F The apartment number (with no identifier) will be in front of the address followed by a hyphen and the rest of the address. B The apartment identifier and number will be on the back of the address string. E The apartment identifier and number will be at the front of the address string. S The apartment identifier and the number will be stored in the secondary standardized address line.

Associated route Delivery Code indicating the format of the associated route delivery information in the output record: A Formatted after the address D Formatted like the input whenever possible, to preserve the original format S Formatted in the secondary standardized address line

Non-civic Keyword Option Code indicating the format of the keyword in the output records: A The abbreviation for the keyword will be used. F The full keyword will be used.

Associated Delivery Office Code indicating the format of the associated delivery office information in the output: D Formatted like the input whenever possible, to preserve the original format A Formatted after the address S Formatted in the secondary standardized address line

French Format Address Format Code indicating the format of French Output records: D Formatted like the input whenever possible to preserve the original format T Formatted in French order (if Format Language Option is “F”) C Formatted based on the language of the street type on the CPC database S The address elements will be returned in standard CPC format

Overflow Treatment Option Code indicating what to do in situations where the output standardized address is too long to fit in the output location specified on the SA OUT parameter: O Attempt to split the output address Blank Truncate the output standardized address and store in the primary standardized address line

Format Language Option Code referenced when French Format Address Format is set to “T”: F French format Blank English format

Extra Information Option Control for the location of extra information: Blank Placed in the separate information field only A Appended to the contents of the primary standardized address line, as well as placed in the separate extra information field

Release 3.4.0 206 User Guide - IBM® i Chapter 9: Using the Interactive System Customizing Screens

Field Name Description

Alternate City Flag Control of the presentation of alternate cities: Y Allow alternate cities in the answer N Present primary cities in the answer for the valid alternates

Last Updated on System time stamp

Function Keys

Function Key Name Description

F1 Help Obtain online help.

F3 Quit Exit the system as defined on the customization database.

F5 Save Save current entries after validation. Remain on screen after save.

F9 Reset Restore screen values to current database entries (at last update to customization file).

F10 Exit Return to the screen from which “ADMIN” was entered.

Enter Enter Validate the fields. If the validation is unsuccessful, the screen is again displayed, an error message is displayed, and the first field in error is indicated.

Release 3.4.0 207 User Guide - IBM® i Customizing Screens

Release 3.4.0 208 User Guide - IBM® i Printing Postal Code 10 Data - C6DBPRT

In this chapter

 What is C6DBPRT? ...... 210  Printing Postal Code Data ...... 210 Printing Postal Code Data What is C6DBPRT?

Program C6DBPRT enables you to print Postal Code information from the Canadian CODE-1 Plus Database. Using this program, you can select up 100 Postal Codes and print the addresses from the database residing within those ranges. To print contents of the Canadian CODE-1 Plus database:

1. Define the Postal Code ranges to include in the report. 2. Update the C6DBPRTCL program to update the database and product libraries.

Printing Postal Code Data

Step 1: Define Postal Code Ranges 1. Go to G1C6PGMS and locate your parameter definition file, C6DBPRM. 2. Using your IBM® i editor, change the SELPCD (Select Postal Code) parameter to include the Postal Codes you want to print and review.

Position Field Name Description Comments

1-6 Keyword SELPCD is the only acceptable entry. Required. No default.

8-13, 15- Postal Codes Postal code(s) for which you wish to extract Required for 8-13. 20, 22-27, data. The others are 29-34, 36- If you wish to extract data for only one postal optional. No default. 41, 43-48, code, complete bytes 8-13 and leave the 50-55, 57- remainder of the record blank. 62

Step 2: Define Database and Product Installation Libraries 1. Locate G1C6PGMS/SOURCE/C6DBPRTCL to update the database and product library locations so that they are recognized by the C6DBPRM program. 2. Use the EDTLIBL command to add the working library, G1@@PGMS, and the G1C6PGMS library.

3. Compile G1C6PGMS/SOURCE/C6DBPRTCL to save your updates. 4. Call C6DBPRTCL. Program C6DBPRT writes the PRNTRPT and PRTXLG output spool files. You will see the acquired database information for Postal Code(s) you requested.

Release 3.4.0 210 User Guide - IBM® i System-Wide Commands 11

In this chapter

 Entering Commands at the Command Line...... 212  Using the Job Import Utility ...... 218 Entering Commands at the Command Line

From a command line, you can enter the following commands to run or submit a Canadian CODE-1 Plus job: • C6RUNJOB – Runs the job interactively • C6SBMJOB – Submits the job to run in batch mode When you enter these commands, you have two options. • Type the command and then press F4 for a screen prompting you for the input name/address file, library, and member, as well as processing limitations. – Or – • Type the command and the Job ID of the job you want to run or submit, and then press ENTER to run or submit the job with the same name/address file and other parameters that you used last time this job was submitted. In addition to entering these commands at the system prompt, you can include them in your control language (CL) programs to submit several jobs in succession.

 For your system to recognize these commands, your library list must contain the Canadian CODE-1 Plus library (default G1C6PGMS) and the Global library (default G1@@PGMS). The libraries for other products should not be in the library list.

Release 3.4.0 212 User Guide - IBM® i Chapter 11: System-Wide Commands

Using C6RUNJOB to Run Jobs

C6RUNJOB (Canadian CODE-1 Plus Run Job) is an optional command that executes a Canadian CODE-1 Plus job interactively, from a command line, or from within a control language program. You can use C6RUNJOB in a job stream to run jobs in a specific order. The library list must contain the Canadian CODE-1 Plus library before C6RUNJOB can be executed. Use command ADDLIBLE LIB(G1C6PGMS) to add the library to your list. The fields on the C6RUNJOB command reflect the field values that are available through the job submission function screens. Value *SAME means that the last values on those screens will be used. The values typed on this command, however, will not replace the values on the Submit Canadian CODE-1 Plus Job screens. 1. To execute the C6RUNJOB command interactively, position your cursor on the command line.

2. Type C6RUNJOB, and press F4. You will see the following screen:

Run Canadian CODE-1 Plus Job (C6RUNJOB)

Run Canadian CODE-1 Plus Job (C6RUNJOB)

Type choices, press Enter.

Specify Job ID ...... Character value Input N/A File Name ...... *SAME Name, *SAME Library ...... *SAME Name, *SAME Member ...... *SAME Name, *SAME, *NONE Input File Exit Routine . . . . *SAME Name, *SAME Output N/A Record Length . . . . 0 Number Successfully Coded Output File *SAME Name, *SAME Library ...... *SAME Name, *SAME Member ...... *SAME Name, *SAME, *NONE Delete Existing Coded File? . . N N, Y Produce Correctable File? . . . N N, Y Correctable Coded File . . . . . *SAME Name, *SAME Library ...... *SAME Name, *SAME Member ...... *SAME Name, *SAME, *NONE Dlt Existing Correctable File? N N, Y Produce Inv Postal Code File? . N N, Y More...

F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display F24=More keys

The initial C6RUNJOB screen (shown above) displays three columns. • The first column lists the field and parameter selections available in C6RUNJOB. • The second column provides entry fields for all parameter definitions. • The third column lists all valid values or valid value types for each field.

You may press F11 to display the keywords for your parameter selections. The keywords provide an alternative method of typing commands and parameters. 3. Complete the entries on this screen. When you use C6RUNJOB: • You must specify the Job ID to execute. • If you specify *SAME for any output file, library, member name, or exit routine name, Canadian CODE-1 Plus uses either the value specified in your most recent job submission or uses the default values.

Release 3.4.0 213 User Guide - IBM® i 4. Page down to see additional C6RUNJOB selections.

Run Canadian CODE-1 Plus Job (C6RUNJOB)

Type choices, press Enter.

Invalid Postal Code File . . . . *SAME Name, *SAME Library ...... *SAME Name, *SAME Member ...... *SAME Name, *SAME, *NONE Delete Existing IPC File? . . . N N, Y Produce Uncoded Records File? . N N, Y Uncoded Records File ...... *SAME Name, *SAME Library ...... *SAME Name, *SAME Member ...... *SAME Name, *SAME, *NONE Delete Existing Uncoded File? . N N, Y Database Library ...... *DEFAULT Name, *DEFAULT Address type ...... N Y, N Address matching option . . . . S S, P Return valid input records . . . N N, Y

More...

F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display F24=More keys

5. Use the guidelines from the previous screen to complete the entries on the second screen.

6. Page down to see more parameters.

Run Canadian CODE-1 Plus Job (C6RUNJOB) Type choices, press Enter.

Uncoded records Exit Routine . . *SAME Name, *SAME Low Postal Code of Range . . . . Character value High Postal Code of Range . . . Character value Input records to skip . . . . . Number Fraction of input to process . . Character value Max input records to process . . Number Correct or Verify ...... C C, V Min Overall Correctness . . . . 0-9 EXITOP Program Name...... *SAME Name, *SAME EXITOP Canadian CODE-1 Plus ID . P P EXITOP User-Defined Data . . . . *SAME Name, *SAME

Bottom

F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display F24=More keys

7. Make additional changes, if needed. 8. Press ENTER to run your job using your specified parameters.

Release 3.4.0 214 User Guide - IBM® i Chapter 11: System-Wide Commands

Using C6SBMJOB to Submit Jobs

C6SBMJOB (Canadian CODE-1 Plus Submit Job) is an optional command that submits a Canadian CODE-1 Plus job for batch processing from the command line or from within a control language program. You can use C6SBMJOB in a job stream to submit jobs in a specific order. The library list must contain the Canadian CODE-1 Plus library before C6SBMJOB can be executed. Run command ADDLIBLE G1C6PGMS to accomplish this.

The fields on the C6SBMJOB command reflect the field values that are available through the job submission function screens. Value *SAME means that the last values on those screens will be used. The values typed on this command, however, will not replace the values on the Submit Canadian CODE-1 Plus Job screens.

 The Submit Job command is similar to the Run Job command (C6RUNJOB), with the addition of the job description, job name, and hold on queue parameters.

1. To run the C6SBMJOB command interactively, your cursor must be positioned on a command entry line.

2. Type C6SBMJOB in the command entry line. Press . You will see this screen:

Submit Canadian CODE-1 Plus Job (C6SBMJOB)

Type choices, press Enter.

Specify Job ID ...... Character value Input N/A File Name ...... *SAME Name, *SAME Library ...... *SAME Name, *SAME Member ...... *SAME Name, *SAME, *NONE Input File Exit Routine . . . . *SAME Name, *SAME Output N/A Record Length . . . . 0 Number Successfully Coded Output File *SAME Name, *SAME Library ...... *SAME Name, *SAME Member ...... *SAME Name, *SAME, *NONE Delete Existing Coded File? . . N N, Y Produce Correctable File? . . . N N, Y Correctable Coded File . . . . . *SAME Name, *SAME Library ...... *SAME Name, *SAME Member ...... *SAME Name, *SAME, *NONE Dlt Existing Correctable File? N N, Y Produce Inv Postal Code File? . N N, Y

More...

F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display F24=More keys

The initial C6SBMJOB screen (shown above) displays three columns. • The first column lists the field and parameter selections available in C6SBMJOB. • The third column lists all valid values or valid value types for each field.

You may press F11 to display the keywords for your parameter selections. The keywords provide an alternative method of typing commands and parameters.

Release 3.4.0 215 User Guide - IBM® i 3. Complete the entries on this screen. When you use C6SBMJOB: • You must specify the Job ID to execute. • The fields on the C6SBMJOB command reflect the field values that are available through the job submission function screens. 4. Page down to see the next Submit Canadian CODE-1 Plus Job screen.

Submit Canadian CODE-1 Plus Job (C6SBMJOB)

Type choices, press Enter.

Invalid Postal Code File . . . . *SAME Name, *SAME Library ...... *SAME Name, *SAME Member ...... *SAME Name, *SAME, *NONE Delete Existing IPC File? . . . N N, Y Produce Uncoded Records File? . N N, Y Uncoded Records File ...... *SAME Name, *SAME Library ...... *SAME Name, *SAME Member ...... *SAME Name, *SAME, *NONE Delete Existing Uncoded File? . N N, Y Database Library ...... *DEFAULT Name, *DEFAULT Job Description ...... *SAME Name, *SAME Library ...... *SAME Name, *SAME Job Name ...... *SAME Name, *SAME Hold Job on Queue? ...... N Y, N Address type ...... N Y, N Address matching option . . . . S S, P

More...

F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display F24=More keys

5. Using the guidelines for completing the previous screen, complete the entries on the second screen.

Release 3.4.0 216 User Guide - IBM® i Chapter 11: System-Wide Commands

6. Page down to see more parameters.

Submit Canadian CODE-1 Plus Job (C6SBMJOB)

Type choices, press Enter.

Return valid input records . . . N Y, N Coded records Exit Routine . . . *SAME Name, *SAME Corrected Code Exit Routine . . *SAME Name, *SAME Inv Postal Code Exit Routine . . *SAME Name, *SAME Uncoded records Exit Routine . . *SAME Name, *SAME Low Postal Code of Range . . . . Character value High Postal Code of Range . . . Character value Input records to skip . . . . . Number Fraction of input to process . . Character value Max input records to process . . Number Correct or Verify ...... C C, V Min Overall Correctness . . . . 0-9 EXITOP Program Name...... *SAME Name, *SAME EXITOP Canadian CODE-1 Plus ID . P P EXITOP User-Defined Data . . . . *SAME Name, *SAME

Bottom F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display F24=More keys

7. Make additional changes, if needed. 8. Press ENTER to submit your job to batch using your specified parameters.

Release 3.4.0 217 User Guide - IBM® i Using the Job Import Utility

Use the Job Import Utility to create a ready-to-run job from a flat parameter file and parameters specified on the import command. To use the Job Import Utility, follow these steps: 1. Add the product install and global library to your library list. Use the ADDLIBLE or EDTLIBL command. Example: ADDLIBLE LIB(G1C6PGMS) and ADDLIBLE LIB(G1@@PGMS). 2. Verify that the job does not already exist. • Call G1MM01. • Select option 60: Canadian/International Products. • Select option 2: Canadian CODE-1 Plus. • Verify that the job does not appear in the list. 3. Create a file to hold the job parameters to be imported using the create source file command: Example: CRTSRCPF FILE(MYLIB/PARMFILE) RCDLEN(92)

 The file must have a record length of 92.

You may also use an existing source file. 4. FTP the job parameters into the source file using your preferred method. You will FTP the parameter file from the source platform (Windows or Unix, for example) into a new or existing member of the source physical file created in step 3.

 Some FTP clients cannot send parameters directly to a source physical file. In these cases, create an 80-byte file and FTP the parameter file into that file. Copy that file to the source physical file using the CPYF command with parameter option FMTOPT(*CVTSRC).

Release 3.4.0 218 User Guide - IBM® i Chapter 11: System-Wide Commands

5. Import the job using this command: IMPJOBC6P + F4

Import Canadian CODE-1 Plus Job (IMPJOBC6P) Type choices, press Enter. Parm Input File Name ...... Name Library ...... Name Member ...... Name, *FIRST Job ID ...... Character value Job Work Library ...... Name Create Work Library? ...... N Y, N Job Input N/A File Name . . . . Name Library ...... Name Member ...... Name, *FIRST

Bottom F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display F24=More keys

6. Fill out the following entries on the Import Job screen:

Parameter Description

[Parameter] Input File Source physical file that you created in step 3 and member you Name/Library/Member FTP'd the parameters into in step 4

Job ID Name of the job you want to create: A Job ID may be from one to five characters in length. The characters may be A-Z, 0-9, or special characters $, @, #, or _. Embedded blanks are not permitted.

Job Work Library Name of the library where the IBM® i parameter file will be created (PRMC6jobid)

Create Work Library Specify whether to create the Job Work Library if it does not already exist. If library does not exist but Create Work Library was not specified, the program will fail with CPF9810.

Job Input N/A File Name/Library/Member In the created job, this is the default input file name on the job submission screen. Specify it here because there is no parameter to define it.

Job Bank File Name/Library/Member In the created job, this will be the default bank input file name on the job submission screen. Specify it here because there is no parameter to define it.

 Other variables on the Submit Batch Job screens (C6CPSBnn) are set to their default values, including job description and output file names.

Release 3.4.0 219 User Guide - IBM® i 7. Verify the results using the command WRKMBRPDM C6WORKLIB/PRMC6jobid; then use option 5 to view the members

Work with Members Using PDM MDG1I7DV

File ...... PRMC6DEMO Library . . . . C6WORKLIB Position to . . . . .

Type options, press Enter. 2=Edit 3=Copy 4=Delete 5=Display 6=Print 7=Rename 8=Display description 9=Save 13=Change text 14=Compile 15=Create module...

Opt Member Type Text @@PXT 200@@PXT Parameters BMPRM 380BMPRM Parameters CPPRM 380CPPRM Parameters IDPRM 500IDPRM Parameters IGNORED Recognized but ignored parameters MIPRM 300MIPRM Parameters MOPRM 700MOPRM Parameters ODPRM 600ODPRM Parameters More ...

Parameters or command ===> F3=Exit F4=Prompt F5=Refresh F6=Create F9=Retrieve F10=Command entry F23=More options F24=More keys

8. Review the following members by specifying option 5=Display:

Parameter Member Description

IGNORED Parameters that were recognized, but not otherwise processed, such as TESTIT and CHCKPT.

ORIGINAL Copy of the complete list of parameters being imported, as specified in step 5

PROCESSED Parameters that were imported, but that do not appear in any parameter member, such as parameters that are specified on the “Submit Batch Job” screens. For example: FILEDF, DB LIB, BYPEXP, AUXIL1, and EXITOP, and so on. The values on those parameters will appear on the “Submit Batch Job” screens.

UNKNOWN Parameters that were ignored because their names were unrecognized.

Other members Contain the imported, sorted-out parameters used by the application.

 Parameters that are commented out with a leading “*” (asterisk) or “* “ (asterisk+space) are sorted to the appropriate member, but are not otherwise processed.

9. Run the job. • Verify that the job now exists and is ready to run with no modifications. – CALL G1MM01 – Select option 60: Canadian/International Products. – Select option 2: Canadian CODE-1 Plus. – The Last Activity displayed on the Work with Jobs screen will show as “Import Job.” • On the Define and/or Submit a Presort Job screen, the values listed under Last Activity indicate the date and time the job was imported, and will show user IMPJOBC6P.

Release 3.4.0 220 User Guide - IBM® i Chapter 11: System-Wide Commands

Example: Creating a Job that Uses an Existing Library To create a job named DEMO with a work library of C6WORKLIB, follow these steps. This job: • Uses a product install library of G1C6PGMS • Uses parameters that were FTP'd into file MYLIB/PARMFILE member PARMMBR • Assumes library MYLIB already exists 1. Run the commands ADDLIBLE LIB(G1C6PGMS) and ADDLIBLE LIB(G1@@PGMS). 2. CALL G1MM01

3. Select option 60: Canadian/International Products, then select option 2: Canadian CODE-1 Plus. Verify that the job does not appear in the list. 4. Run the command CRTSRCPF FILE(MYLIB/PARMFILE) RCDLEN(92). 5. FTP parameters into MYLIB/PARMFILE member PARMMBR.

6. Run the command IMPJOBC6P INPPRMFIL(MYLIB/PARMFILE) INPPRMMBR(PARMMBR) JOBID(DEMO) WORKLIB(C6WORKLIB) CRTWRKLIB(N) INPNAFIL(MYNALIB/MYNAFILE) INPNAMBR(*FIRST).

7. Run the command WRKMBRPDM C6WORKLIB/PRMC6DEMO, and use option 5 to display the contents of the members. 8. Run the job. • CALL G1MM01 and select option 60: Canadian/International products, then select option 5: Canadian CODE-1 Plus. • Use option 16 next to job “DEMO” or use the commands C6RUNJOB or C6SBMJOB to run or submit the job: C6RUNJOB JOBID(DEMO)

Error Messages IMPJOBC6P may return the following escape messages: • IMP0100: Job already exists • All CHKOBJ escape messages, including: • CPF9810: Library xxxxxxxxxx not found • CPF9801: Object xxxxxxxxxx in library xxxxxxxxxx not found (file not found) • CPF9815: Member xxxxxxxxxx file xxxxxxxxxx in library xxxxxxxxxx not found

Release 3.4.0 221 User Guide - IBM® i Release 3.4.0 222 User Guide - IBM® i Sample Library Member 12 Reference

In this chapter

 Sample Library Member Reference ...... 224  File SOURCE...... 224  File SOURCE92...... 225 Sample Library Member Reference Sample Library Member Reference

This chapter describes the sample library members that are included with your software. Pitney Bowes is not responsible for any changes you make to the sample members.

 Some library members are unavailable on some platforms.

File SOURCE

File Member File Type Description

C6CALLRPT RPGCPYBK Definition of INQREQ data structure in ILE RPG.

C6DBPRTCL CLLE CL to call program C6DBPRT, a program delivered in the product library to print the database details report.

C6DBPRTCMD CMD CMD for C6DBPRTCL. Accepts PGMS library name and database library name.

C6INQPRM CBLCPYBK Definition of C6INQPRM data structure in ILE COBOL.

C6INQREQ RPGCPYBK Definition of INQREQ data structure in ILE RPG.

C6MATPRM CBLCPYBK Definition of the matching module (C6MATCH) data structure in ILE COBOL.

C6MATRPGLE RPGCPYBK Definition of the matching module (C6MATCH) data structure in ILE RPG.

C6RLKPRM CBLCPYBK Definition of the Reverse Lookup callable routine (C6DBRLKP) data structure in ILE COBOL.

C6SMCDR CBLLE Sample program that calls matching and reporting routines, C6MATCH, written in ILE COBOL. Uses filename C6PIN for input and C6POUT for output. Prints to spool file PRNTRPT

C6SMCDRCL CLLE CL to call C6SMCDR. Overrides DB files to the database library name passed in.

C6SMCDRCMD CMD CMD for program C6SMCDRCL. Accepts database library name.

C6SMCOP CBLLE Sample EXITOP parameter target program. Writes output to file C6SMOUT.

C6SMCRL CBLLE Sample program to demonstrate calling the reverse lookup program C6DBRLKP written in ILE COBOL. Uses input file PCIN, output file PCOUT, and bad record file PCBAD.

C6SMCRLCL CLLE CL to call C6SMCRL. Overrides DB files to the database library name passed in.

C6SMCRLCMD CMD CMD for program C6SMCRLCL. Accepts database library name.

C6SMRDR RPGLE Sample program to demonstrate call to C6MATCH written in ILE RPG.

C6SMRDRCL CL CL to call C6SMRDR. Passes in database library name.

C6SMRDRCMD CMD CMD for program C6SMRDRCL. Accepts database library name.

Release 3.4.0 224 User Guide - IBM® i Chapter 12: Sample Library Member Reference Sample Library Member Reference

File Member File Type Description

C6SMEG01 CLLE Sample CL program to demonstrate call to G1G001. Accepts C6 program library name and database library name. Uses parameters located in G1C6PGMS/SOURCE92.

C6SMMG01 CMD CMD for program C6SMEG01. Accepts product library name and database library name.

G1C6BNC CBLLE Sample program to demonstrate user exit that allows the user to change/correct an address then export the address out of the online system. Detailed instructions on how to use this sample are included within the source.

File SOURCE92

File Member Description

C6SMCOPP TXT Parameter file associated with sample program C6SMCOP: Sample EXITOP parameter target program.

G1G001.DAT Parameter file associated with sample program C6SMEG01: CL program to demonstrate call to G1G001.

Release 3.4.0 225 User Guide - IBM® i Sample Library Member Reference

Release 3.4.0 226 User Guide - IBM® i Index

A CONSTANT parameter record (for G1G001) defined 141 Accessing CONTRL parameter record (for G1G001) Database function menu 25 defined 139 Accessing the database functions menu 25 Control Totals Report 116 Additional Input File Information Screen 48 Correcting uncoded records Address Locations Screen 42 in interactive system 176, 189 Address matching function (interactive CPCID11 - Postal Locations Screen 45 environment) CROSS SECT. SAMPLING field (FILEDF) 137 capabilities 176 Cross sectional sampling 133 example work session 188 Administration Sign-on Screen (Interactive) 203 D Analysis of Matched Records field 101 Database Analysis of Matched Records Report 116 moving 26 Automatically printed reports 116-117 Database function menu B accessing 25 Database functions menu, accessing 25 basic job information Database inquiry function (interactive system) control language 22 capabilities 176 file description 22 in interactive system 179 file format, defining 22 information displayed 176 file layout 22 Database Library field 124 record length, defining 22 Decimal fraction, limiting processing by 133 BLOCK SIZE field (FILEDF) 137 Define 14 Postal code 14 C Define Differences/Uncoded Reports screen C1PRPT call area fields 105 mapped 168 function keys 106, 115 RP-DATE 165 Display Database File Field List Screen 59 RP-HEADER 165 RP-RPUPLO 165 E RP-RPZ4ST 165 executing jobs from the command line 211 C6CPID10 - Address Locations Screen 42 Execution Log Report 117 C6CPID12 - Additional Input File Information Exit Routine (Invalid Postal Code file) field 128 Screen 48 Exit Routine (Successfully Coded output file) C6CPID13 - Confirmation Options Screen 50, 56- field 126-127, 130 57 Exit Routine (Uncoded Records file) field 129 C6CPID14 - Additional Input File Information Exit Routine field 123 Screen 52 EXIT ROUTINE NAME field (FILEDF) 137 C6CPID15 - Sequence Check Screen 54 Exit routines Call areas input, defined 120 for C1PRPT 168 output, defined 120 maps, defined 148 Canadian CODE-1 Plus concepts F Postal code 13 Field 179 CHANGE parameter record (for G1G001) Fields defined 146 Analysis of Matched Records 101 field-by-field 146 Database Library 124 City Name Differences screen Exit Routine 123 fields 111 Exit Routine (Invalid Postal Code file) 128 function keys 112 Exit Routine (Successfully Coded output file) Command field 126-127, 130 in interactive system 179 Exit Routine (Uncoded Records file) 129 command line processing 211 Input N/A file 123 Components Invalid Postal Code file (indicator) 128 Submit Batch Job reference 120 Invalid Postal Code file (name) 128 Confirmation Options Screen 50

Release 3.4.0 227 User Guide - IBM® i Index

Job description 123 G Job name 124 Library (Input N/A file) 123 G1G001 Library (Invalid Postal Code file) 128 midrange sample control language 146 Library (Job description) 124 G1G001 parameter records Library (Successfully Coded output file) 126-128 CHANGE 146 Library (Uncoded Records file) 129 CONSTANT 141 Member 123 CONTRL 139 Member (Invalid Postal Code file) 128 FILEDF 137 Member (Successfully Coded output file) 126-127 FORMAT 141 Member (Uncoded Records file) 129 HEADER 137 on City Name Differences screen 111 HEADxx 138 on Define Differences/Uncoded Reports screen 105, MOVE 143 115 PAGESZ 143 on Postal Code Differences screen 107 SELECT 145 on Standardized Address Differences screen 109 TESTIT 144 on Submit Batch Job screen (first) 123 UFT 138 on Uncoded/Unmatched screen 103, 113 UHD 139 Processing Summary by FSA 101 UNPK 144 Processing Summary by List Code 101 G1G001 report generator program Processing Summary by Province 101 defined 136 Uncoded Records file (indicator) 128 headers and footers 137 Uncoded Records file (name) 129 input file 136 FILE NAME field (FILEDF) 137 report layout 139 File Names selecting reports 145 explained 120 using 136 File names C6BMCOK 120 H C6BMIPC 120 HEADER parameter record (for G1G001) C6BMNAM 120 defined 137 C6BMNCO 120 field-by-field 137 FILEDF parameter card 120 HEADER TEXT field (UHDxx) 139 FILEDF parameter record (for G1G001) HEADxx parameter record (for G1G001) BLOCK SIZE 137 defined 138 CROSS SECTIONAL SAMPLING 137 defined 137 I EXIT ROUTINE NAME 137 input FILE NAME 137 file format 22 MAXIMUM NUMBER OF RECORDS 137 record NUMBER OF RECORDS TO SKIP 137 what Canadian CODE-1 Plus needs to know 22 RECORD FORMAT 137 Input exit routine 120 RECORD LENGTH 137 Input N/A file field 123 First Interactive Customization Screen (Interactive) 205 Interactive site customization FOOTER TEXT field (UFTxx) 138 Administration Sign-on screen 203 FORMAT parameter record (for G1G001) First Interactive Customization screen 205 defined 141 Interactive system field-by-field 141 address matching 176, 179 FRENCH parameter line Administration Sign-on Screen 203 defined 56-57 Command field 179 Function keys correcting uncoded records 176, 189 in interactive system 179 database inquiry 176, 179 on City Name Differences screen 112 example work session 184 on Define Differences/Uncoded Reports screen 106, First Interactive Customization Screen 205 115 function keys 179 on Postal Code Differences screen 108 introduction to 176 on Report Selection screen 102 match results 179 on Standardized Address Differences screen 110 matching an address 188 on Uncoded/Unmatched screen 104, 114

Release 3.4.0 228 User Guide - IBM® i Index

online help 179 parameter record querying the database 186 functions 23 Invalid Postal Code file (indicator) field 128 general 23 Invalid Postal Code file (name) field 128 settings, general 23 Postal Code 14 J Parts of 15 job Understanding a 13 preparing 22 Postal Code Differences screen Job description field 123 fields 107 Job name field 124 function keys 108 Postal Code range, limiting processing by 132 L Postal Locations Screen 45 Printing reports automatically 116-117 Library (Input N/A file) field 123 Probable correctness value 116 Library (Invalid Postal Code file) field 128 Processing Summary by FSA field 101 Library (Job description) field 124 Processing Summary by List Code field 101 Library (Successfully Coded output file) field 126-128 Processing Summary by Province field 101 Library (Uncoded Records file) field 129 Limiting Processing 132 Q LINE NUMBER field (UFTxx) 138 Querying the database (UHDxx) 139 in interactive system 181, 186 LINE SIDE field R (UFTxx) 138 (UHDxx) 139 RECORD FORMAT field (FILEDF) 137 LINES-PER-PAGE field (PAGESZ) 143 RECORD LENGTH field (FILEDF) 137 Records processed, limiting 132 M REPORT OR LOG CODE field (PAGESZ) 143 Maps, of call areas 148 Report Selection screen Match results Analysis of Matched Records field 101 in interactive system 179 function keys 102 Matching an address 188 Processing Summary by FSA field 101 MAXIMUM RECORDS field (FILEDF) 137 Processing Summary by List Code field 101 Member (Invalid Postal Code file) field 128 Processing Summary by Province field 101 Member (Successfully Coded output file) field 126-127 shown 101 Member (Uncoded Records file) field 129 Reports Member field 123 Analysis of Matched Records 116 MOVE parameter record (for G1G001) Control Totals 116 defined 143 Execution Log 117 Moving to a line Parameter Card Listing 116 in interactive system 181 printed automatically 116-117 Summary by List Code 116 N Summary by State 116 RP-DATE call area field 165 NUM. RECORDS TO SKIP field (FILEDF) 137 RP-HEADER call area field 165 O RP-RPS4ST call area field 165 RP-RPUPLO call area field 165 Online help interactive system 179 S Output exit routine 120 Sample control language P for using G1G001 146 Sample library 224 PAGESZ parameter record (for G1G001) SOURCE 224 defined 143 SOURCE92 225 LINES-PER-PAGE 143 Sampling 133 REPORT OR LOG CODE 143 Screens Parameter Card Listing Report 116 Report Selection 101 Submit Canadian CODE-1 Plus Job screen (first) 123

Release 3.4.0 229 User Guide - IBM® i Index

Submit Canadian CODE-1 Plus Job screen (second) T 126 Screens (Interactive) TESTIT parameter record (for G1G001) Administrative Sign-on Screen 203 defined 144 First Interactive Customization Screen 205 SELECT parameter record (for G1G001) U defined 145 UFTxx parameter record (for G1G001) field-by-field 145 defined 138 SEQCHK parameter line FOOTER TEXT 138 defined 54 LINE NUMBER 138 Sequence Check Screen 59 LINE SIDE 138 Standardized Address Differences screen UHDxx parameter record (for G1G001) fields 109 defined 139 function keys 110 HEADER TEXT 139 Submit Batch Job component LINE NUMBER 139 overview 120 LINE SIDE 139 reference 120 Uncoded Records file (indicator) field 128 Submit Batch Job screen (first) Uncoded Records file (name) field 129 Database Library field 124 Uncoded/Unmatched screen Exit Routine field 123 fields 103, 113, 115 fields 123 function keys 104, 114 Input N/A file field 123 UNPK parameter record (for G1G001) Job description field 123 defined 144 Job name field 124 UPBSBMJOB command 212 Library (Input N/A file) field 123 UPRUNJOB Library (Job description) field 124 command 212 Member field 123 Run jobs screen 213 Submit Canadian CODE-1 Plus Batch Job screen UPSBMJOB - Submitting Jobs screen 130, 215 (second) Uncoded Records file (indicator) field 128 Submit Canadian CODE-1 Plus Job screen (first) shown 123 Submit Canadian CODE-1 Plus Job screen (second) Exit Routine (Invalid Postal Code file) field 128 Exit Routine (Successfully Coded output file) field 126- 127, 130 Exit Routine (Uncoded Records file) field 129 Invalid Postal Code file (indicator) field 128 Invalid Postal Code file (name) field 128 Library (Invalid Postal Code file) field 128 Library (Successfully Coded ouput file) field 127-128 Library (Successfully Coded output file) field 126 Library (Uncoded Records file) field 129 Member (Invalid Postal Code file) field 128 Member (Successfully Coded ouput file) field 126-127 Member (Uncoded Records file) field 129 shown 126 Uncoded Records file (name) field 129 Summary by 3-Digit ZIP Code 116 Summary by FSA field 101 Summary by List Code field 101 Summary by List Code Report 116 Summary by Province field 101 Summary by State Report 116 Summary reports 116 Syntax, checking with TESTIT 144 system requirements 22 system-wide commands 211

Release 3.4.0 230 User Guide - IBM® i Index

Release 3.4.0 231 User Guide - IBM® i Index

Release 3.4.0 232 User Guide - IBM® i