pitney bowes 11

Canadian CODE-1 Plus™ Release 3.4.0

User Guide

For Open Systems 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 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 ...... 7 Introducing Canadian CODE-1 Plus ...... 8 Understanding a ...... 9 What is a Postal Code? ...... 10 Anatomy of a Postal Code ...... 11 Canadian Addressing Guidelines ...... 12 Addressing Canadian Mail...... 12 Addressee Information...... 13 Software Evaluation and Recognition Program (SERP) ...... 15 What Is SERP? ...... 15 How Does SERP Evaluation Process Work? ...... 15 The CPC Postal Code Data Files ...... 16 What Is a “Valid” Address? ...... 16 What Is an Invalid Address? ...... 16 Chapter 2: Platform-Specific Details...... 17 For All Platforms: The Postal Code Data Files...... 18 File Names ...... 18 z/OS and IMS JCL ...... 19 Getting Started with Windows ...... 19 Customization Issues...... 19 Step 1. Edit/Save Job Files ...... 20 Step 2. Edit/Save Parameter Files...... 21 Step 3. Run the Job ...... 21 Step 4. Invoke the Interactive System ...... 22 Copying the Sample Job to Use as a Template...... 22 Setting Up the Parameter Files for Your New Job ...... 22 Getting Started with UNIX and Linux ...... 22 UNIX Shell Script ...... 22 Step 1. Source the setup Script ...... 22 Step 2. Source the Job (sample) Script ...... 23 Step 3. Execute the runc6p Script ...... 23 Step 4. Execute the Interactive System ...... 23 Setting Up the Parameter Files for Your New Job ...... 23 Copying the Sample Job to Use as a Template...... 23 Getting Started with z/OS...... 24 Updating the Postal Code Data Files...... 24 Editing IVPFILE ...... 24 Getting Started with IMS...... 24 Updating the Postal Code Data Files...... 25 Editing IVPFILE ...... 25 Chapter 3: Defining Batch Jobs Using Control Language and Parameter

Release 3.4.0 3 User Guide - Open Systems Table of Contents

Definitions ...... 27 Using Canadian CODE-1 Plus ...... 28 Parameters ...... 28 Control Language ...... 28 Combining Parameters and Control Language ...... 28 Canadian CODE-1 Plus Job Steps...... 29 Parameter Reference...... 29 Step 1. Copying the Sample Job File...... 29 Step 2. Defining the Physical Attributes of Your Files ...... 29 Step 3. Defining the Layout of the Input Record Elements ...... 30 Step 4. Defining the Layout of the Output Record Elements ...... 30 Step 5. Defining Processing Options ...... 30 Step 6. Defining Reporting Options ...... 31 Step 7. Writing Control Language ...... 32 Chapter 4: Interactive Processing...... 33 Canadian CODE-1 Plus Interactive System ...... 34 Accessing the Interactive System on Different Platforms ...... 34 Address Matching Function ...... 34 Database Inquiry Function...... 34 Correcting Uncoded Records Function ...... 35 Interactive System Main Screen ...... 35 Online Help ...... 36 Address Matching...... 36 Scrolling Through the Match Results Screens...... 37 Database Inquiry ...... 38 Navigating Through the Screens ...... 38 Moving to a Specific Line on a Screen...... 38 Displaying Data for a Database Entry ...... 38 Querying the Database ...... 39 Example Work Session...... 42 Step 1. Accessing the Interactive System ...... 42 Step 2. Querying the Database ...... 44 Step 3. Matching a Corrected Address ...... 47 Correcting Uncoded Records ...... 47 Chapter 5: Callable and Stand-Alone Programs ...... 49 Canadian CODE-1 Plus Callable Modules ...... 50 Address Validation/Correction Module...... 50 Database Inquiry Type 1 and 2 Modules ...... 50 Call Areas ...... 50 The Canadian CODE-1 Plus Matching Module...... 51 How Does C6MATCH Work?...... 51 The C6MATCH Call Area...... 51 Calling C6MATCH (All Platforms) ...... 70

Release 3.4.0 4 User Guide - Open Systems Table of Contents

Call Areas...... 73 Calling Canadian CODE-1 Plus in z/OS ...... 73 IMS Program Control Blocks (PCBs) ...... 75 Using the Reverse Lookup Callable Routine - C6DBRLKP...... 80 General Guidelines ...... 80 Working Storage Area LM-PC-REV-LK ...... 81 Calling C6DBRLKP (Non-Mainframe Only) ...... 83 Calling C6DBRLKP on z/OS ...... 83 Use G1C6LKP to Browse the Database Content ...... 85 Sample Call for G1C6LKP ...... 85 G1C6LKP-USER-REQUEST-AREA ...... 85 G1C6DSM Sample Program ...... 86 G1C6DMI - Sample Program...... 92 Using Program G1G001 to Customize Reports ...... 93 Using G1G001 ...... 93 Parameters ...... 93 Using C6DBPRT to Print the Database Contents...... 95 Parameters ...... 95 Sample Control Language ...... 95 Index ...... 97

Release 3.4.0 5 User Guide - Open Systems Table of Contents

Release 3.4.0 6 User Guide - Open Systems Canadian CODE-1 Plus 1 Concepts

In this chapter

 Introducing Canadian CODE-1 Plus ...... 8  Understanding a Postal Code ...... 9  Canadian Addressing Guidelines ...... 12  Software Evaluation and Recognition Program (SERP)...... 15 Introducing Canadian CODE-1 Plus 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 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 • 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)

Release 3.4.0 8 User Guide - Open Systems Chapter 1: Canadian CODE-1 Plus Concepts Understanding a Postal Code

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 Code

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 Postal CodeOM system. 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 table “Canadian Postal Code System,” on page 10 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 9 User Guide - Open Systems Understanding a Postal Code 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 10 User Guide - Open Systems Chapter 1: Canadian CODE-1 Plus Concepts Understanding a Postal Code

Figure 1: Postal Code Example

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 11 User Guide - Open Systems 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 delimiters (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 12 User Guide - Open Systems 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 to be 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 13 User Guide - Open Systems 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. Province should be identified by the international two-character symbol as listed on “Canadian Postal Code System,” on page 10 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 14 User Guide - Open Systems 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 SERP Evaluation 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 15 User Guide - Open Systems 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 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 16 User Guide - Open Systems Platform-Specific Details 2

In this chapter

 For All Platforms: The Postal Code Data Files ...... 18  File Names ...... 18  z/OS and IMS JCL...... 19  Getting Started with Windows...... 19  Getting Started with UNIX and Linux ...... 22  Getting Started with z/OS ...... 24  Getting Started with IMS ...... 24 For All Platforms: The Postal Code Data Files For All Platforms: The Postal Code Data Files

To view the Postal Code Data Files, double-click the DB folder icon. Note that there is one file with the *.vix extension and an accompanying file with no extension. The C6dbload.xlg file is the Execution Log resulting from the last time you loaded a Postal Code Data File. Pitney Bowes compiles the Postal Code Data Files from the update files received from Canada Post. These files allow Canadian CODE-1 Plus to process your files accurately and ensure that your mailings comply with CPC regulations. If you keep your Postal Code Data Files current, you can reduce delivery errors and maximize postal discounts. The installation procedure discusses the C6D installation in the \DB directory. We highly recommend that you update your \DB directory with the latest C6D files as you receive them from Pitney Bowes.

File Names

If you are running Canadian CODE-1 Plus under any platform except UNIX or Windows, the following DD names are used for the various input and output files: DD Names for Input and Output Files - Mainframe

DD Name Description

C6BMPRM The input parameter file

C6G1PXT The auxiliary parameter file

PRNTRPT The output reports file

PRNTXLG The output Execution Log report file

C6BMNAM The input name/address file

C6BMCOK The output validated records file

C6BMCOR The output corrected records file

C6BMNCO The output unmatched records file

C6BMIPC The output invalid postal code records file

If you are running under UNIX or Windows, the following file names are used: File Names for Input and Output Files - UNIX and Windows

File Name Description

DD_C6BMPRM The input parameter file

DD_C6G1PXT The auxiliary parameter file

DD_PRNTRPT The output reports file

DD_PRNTXLG The output Execution Log report file

DD_C6BMNAM The input name/address file

DD_C6BMCOK The output validated records file

Release 3.4.0 18 User Guide - Open Systems Chapter 2: Platform-Specific Details z/OS and IMS JCL

File Names for Input and Output Files - UNIX and Windows

File Name Description

DD_C6BMCOR The output corrected records file

DD_C6BMNCO The output unmatched records file

DD_C6BMIPC The output invalid postal code records file z/OS and IMS JCL

The sample JCL defines the input and output data sets and runs the Canadian CODE-1 Plus driver (C6BM00). You can find this file in the IVPFILE member of the INSTALIB (installation) library.

Getting Started with Windows

This section assumes you are familiar with the Windows Product Installation Instructions and the details of how the product was installed on your system. Pitney Bowes products for the Windows environment are designed so that you can set up and run a job with a minimal amount of typing. Information that does not change from job to job is stored in files that you can edit via the icons provided, using your preferred text editor. This section describes how to: • Edit/Save job files • Edit/Save the parameter file • Invoke the Canadian CODE-1 Plus interactive system

 For purposes of this discussion, we assume that you installed Canadian CODE-1 Plus in the default directory, as indicated in the Canadian CODE-1 Plus Installation Guide for All Platforms.

After you have completed your Windows installation and run your IVP or sample job, review the Pitney Bowes folder. If this is the first time you have installed a Pitney Bowes product, you will find that this is the folder that the installation program creates to contain all Pitney Bowes applications and their associated files.

Customization Issues If you need to modify the Canadian CODE-1 Plus components to suit your needs, be prepared to re- create your modifications when we send a product update. Record the changes you make so that if you need to call Pitney Bowes Customer Support, they can duplicate your problem. In Canadian CODE-1 Plus, the BIN\SETUP.BAT file defines the environment variables needed for any invocation of Canadian CODE-1 Plus functions. You should review and revise BIN\SETUP.BAT for any customization that is necessary for your system.

Release 3.4.0 19 User Guide - Open Systems Getting Started with Windows Step 1. Edit/Save Job Files A job file is a batch command file (with a *.BAT extension) that runs one of the Canadian CODE-1 Plus programs and configures the program's environment to define the files the program is to use. Pitney Bowes provides a SAMPLE job in the BIN directory that is used to test the product while also serving as an example and template for you to create your own job files. This sample job runs the batch driver program (C6BM00) to process the standard Installation Verification Procedure (IVP), which uses DATA\SAMPLE.NAM as the input file.

Important Script Commands The most important script command is SET, which is used to initialize the PBJOB variable and the DD_environment variables. DD_environment variables associate the system file names used by the Canadian CODE-1 Plus programs with the files you want processed in your job. The system file names used by Canadian CODE-1 Plus are listed at the beginning of this chapter. The script also contains a RUN command that specifies the Canadian CODE-1 Plus program to be invoked.

Creating a New Job File The easiest way to create a new job file is to modify an existing one, such as the SAMPLE.BAT provided with your installation. To create a new job file: 1. Use Windows Explorer to copy BIN\SAMPLE.BAT to BIN\MYJOB.BAT. 2. Select the Edit Canadian CODE-1 Plus Batch Job File icon and specify MYJOB as the file to edit. or 1. Use Windows Explorer to copy BIN\SAMPLE.BAT. 2. Select the Edit Canadian CODE-1 Plus Batch Job File icon. 3. Enter a new name for the job file. 4. Paste in BIN\SAMPLE.BAT.

 Be sure to edit the PBJOB=SAMPLE line in the MYJOB.BAT file to reflect the new name. For instance, if you change the file name to “MYJOB”, you will need to edit the PBJOB=SAMPLE line to read “PBJOB=MYJOB”. You will also need to change the highlighted portion of the following line accordingly:

SET DD_C6BMNAM=%PBC6P%\DATA\%PBJOB%.NAM

Be sure the path and input file name are correct. For example, to use the sample input file, specify: SET DD_C6BMNAM=%PBC6P%\DATA\SAMPLE.NAM

Editing a Job File You can edit job files by double-clicking the Edit Canadian CODE-1 Plus Batch Job icon or by invoking your text editor and editing the job file in the BIN directory. Ensure that the job file has the extension *.BAT and that the job name is unique among the batch files in the directory.

 This program accepts the PBEDIT environment variable as the name of the editor you prefer to use. If PBEDIT is not defined, NOTEPAD is used as the editor.

Release 3.4.0 20 User Guide - Open Systems Chapter 2: Platform-Specific Details Getting Started with Windows

Step 2. Edit/Save Parameter Files Parameter files use the *.PRM extension. Pitney Bowes provides an example parameter file, SAMPLE.PRM, which contains parameters for the batch driver program of the Installation Verification Procedure (IVP).

This section describes how to create a new parameter file and how to edit an existing one.

Creating a New Parameter File The easiest way to create a new parameter file is to modify an existing one, such as the SAMPLE.PRM file provided with your installation. To create a new parameter file, you can use one of the following two methods: 1. Use the File Manager to copy DATA\SAMPLE.PRM to DATA\MYJOB.PRM. 2. Select the Edit Parm File icon and specify MYJOB as the file to edit. or 1. Use the File Manager to copy DATA\SAMPLE.PRM. 2. Select the Edit Parm File icon. 3. Enter a new name for the file. 4. Paste in DATA\SAMPLE.PRM.

Editing a Parameter File You can edit parameter files by double-clicking the Edit Canadian CODE-1 Plus Parameter File icon or by invoking your text editor and editing the parameter file in the DATA directory. Ensure that the parameter file has the extension *.PRM and that the file name is unique among the batch files in the directory. The %\BIN\C6PPRM.vbs script is invoked when you double-click the Edit Canadian CODE-1 Plus Parameter File icon.

 This program accepts the PBEDIT environment variable as the name of the editor you prefer to use. If PBEDIT is not defined, NOTEPAD is used as the editor.

Step 3. Run the Job The C6BM00 program is invoked via the Run Canadian CODE-1 Plus Job icon. The program prompts you for the name of the job you want to run and then proceeds to execute the job. When the job finishes running, you are asked to press a key to continue so that the window is not refreshed before you can read any error messages. To run a batch job (C6BM00), double-click the Run Canadian CODE-1 Plus Job icon. Once you enter a job name, the Run Canadian CODE-1 Plus icon runs the BIN\C6PRun.vbs script, which builds a temporary batch file, and transfers control of the job to the temporary file. The temporary file:

• Calls the BIN\SETUP.BAT file to initialize the Canadian CODE-1 Plus environment • Calls the BIN\jobname.BAT file to tailor the environment to the job requested and then runs the C6BM00 program • Pauses the process so you can see any error messages and then deletes the temporary file

Release 3.4.0 21 User Guide - Open Systems Getting Started with UNIX and Linux Step 4. Invoke the Interactive System To invoke the Canadian CODE-1 Plus Interactive System, click the Interactive System icon in the Canadian CODE-1 Plus folder on the Start menu. For a complete reference to the various commands available in the Interactive System, see Chapter 3 of the Canadian CODE-1 Plus Reference Guide.

Copying the Sample Job to Use as a Template The Canadian CODE-1 Plus installation process copies one file to your system. This file is a basic job that verifies the proper installation of the application files and programs. The sample file is useful as a template for new jobs because it has the required organization and content. The first step in defining your Canadian CODE-1 Plus job is to copy the sample job for your own purposes. 1. Go to the Pitney Bowes folder and locate the Canadian CODE-1 Plus sub-folder. 2. Double-click the Canadian CODE-1 Plus folder icon. 3. Double-click the bin folder icon. 4. Click on the sample.bat file to highlight it. 5. Right-click to copy the job, then paste it and rename it as a template for your new job.

Setting Up the Parameter Files for Your New Job Review the contents of the data folder. The sample.* files serve as the various input and output files for the sample job. These files include the name/address records, reports, and so on. Typically, you will make parameter changes to the *.prm file members, which will affect the processing of those data files. See Defining Batch Jobs Using Control Language and Parameter Definitions, to define your parameters and add them to your job script.

Getting Started with UNIX and Linux

The sections that follow discuss the Postal Code Data Files and provide information on modifying parameters for your job.

UNIX Shell Script To run Canadian CODE-1 Plus under UNIX, you must complete three steps: 1. Source the setup script to set up the Canadian CODE-1 Plus environment variables. 2. Source the job script to set up the Canadian CODE-1 Plus job variables. 3. Execute the runc6p script to execute the Canadian CODE-1 Plus batch driver.

Step 1. Source the setup Script The installation setup script sets all the Canadian CODE-1 Plus environment variables. The setup script resides in the $PBC6P\bin folder. For more information on the bin/setup file, see the installation instructions that came with the software.

Release 3.4.0 22 User Guide - Open Systems Chapter 2: Platform-Specific Details Getting Started with UNIX and Linux

Step 2. Source the Job (sample) Script The sample job script, named sample, assigns file names to all the Canadian CODE-1 Plus file variables. The script sample resides in the $PBC6P\bin folder.

Step 3. Execute the runc6p Script The runc6p script executes the Canadian CODE-1 Plus batch driver. The runc6p script resides in the $PBC6P\bin folder. To execute, type runc6p jobname at the command prompt, where jobname is the name you have specified for the job. For the sample job, the jobname would be “runc6p sample”.

Step 4. Execute the Interactive System Execute the interactive system by typing $PBC6P/bin/runonline at the command prompt.

Setting Up the Parameter Files for Your New Job Review the contents of the data directory. You will find the “sample” files, which serve as the various input and output files for the “stock” sample job. These files include the name and address records, reports, and so on. Typically, you will make parameter changes in this file. See Defining Batch Jobs Using Control Language and Parameter Definitions, for information on writing your parameters and adding them to your job script.

Copying the Sample Job to Use as a Template The Canadian CODE-1 Plus installation copies a sample job (installation verification procedure, or IVP) to your system. This is a basic job that verifies the proper installation of the application files and programs. The sample job is useful as a template for your new jobs because it has the required organization and content. The first step in defining your Canadian CODE-1 Plus job is to copy the sample job to use for your own purposes.

1. Go to the /bin directory.

2. Source the setup file. For example: ../setup 3. This is usually only necessary once at login time. 4. Copy sample to newname.

 The name you choose, by default, will be used to name all output data report and Execution Logs

newname is the name you assign to the job. For example, to create a job called myown, enter cp sample myown.

5. Edit the file created in step three to complete template for your own jobs.

Release 3.4.0 23 User Guide - Open Systems Getting Started with z/OS Getting Started with z/OS

Once you have completed the install process, you will end up with the following libraries: • A Load library that will contain the actual (C6P) load modules • An Object library that will contain the C6P object modules • An Install JCL library that will contain all required JCL for proper execution and subsequent maintenance of C6P • A Sample library that contains JCL, copybooks, and sample source code to illustrate how to call the various Canadian CODE-1 Plus functions, such as matching, reverse lookup, and browsing the database

Updating the Postal Code Data Files To update these files, locate members C6PALOCF and C6PDBINS in the JCL library. Edit this member, replacing the lower-case variable names with your site-specific names. Run this JCL against your most current, un-installed Postal Code Data Files. You should perform this operation each time you receive the Postal Code Data File.

Editing IVPFILE After you have completed your z/OS Canadian CODE-1 Plus product installation, go to the JCL library created by the installation and locate the member IVPFILE. This is a sample installation verification job that you can use to verify that the installation was successful and that the “plumbing” works. 1. Locate member IVPFILE. Edit this member, replacing the lower-case variable names with your site-specific ones. 2. Submit the IVPFILE JCL for processing.

3. Once the IVP job runs, go to your SDSF (Systems Display and Search Facility), or IOF, or use the display tool of choice for viewing reports, logs, system messages, etc. 4. Select the job ID for the IVPFILE job that you just ran. All steps should have completed with a return code of zero (RC=0). Among several other files created, each job produces a report and an Execution Log for each execution of the Canadian CODE-1 Plus product. The driver program, C6BM00, is the parameter check and verification program that confirms correct installation. The output report files that will most likely interest you are the PRNTRPT Report and the PRNTXLG Execution Log that is created for all driver programs. Getting Started with IMS

Once you have completed the install process, you will have the following libraries: • A Load library containing the Canadian CODE-1 Plus (C6P) load modules • An Object library containing the C6P object • An Install JCL library containing all required JCL for proper execution and subsequent maintenance of C6P • A Sample library containing JCL, copybooks, and sample source code illustrating how to call the various Canadian CODE-1 Plus functions, such as matching, reverse lookup, and browsing the database

Release 3.4.0 24 User Guide - Open Systems Chapter 2: Platform-Specific Details Getting Started with IMS

Updating the Postal Code Data Files To update these files, locate members C6PALOCF and C6PDBINS in the JCL library. Edit this member, replacing the lower-case variable names with your site-specific names. Run this JCL against your most current, un-installed Postal Code Data Files. You should perform this operation each time you receive the Postal Code Data File.

Editing IVPFILE After you have completed your IMS Canadian CODE-1 Plus product installation, go to the JCL library created by the installation and locate the member IVPFILE. This is a sample installation verification job that you can use to verify that the installation was successful. 1. Locate member IVPFILE. Edit this member, replacing the lower-case variable names with your site-specific ones. 2. Submit the IVPFILE JCL for processing.

3. Once the IVP job runs, go to your SDSF (Systems Display and Search Facility), or IOF, or use the display tool of choice for viewing reports, logs, system messages, etc. 4. Select the job ID for the IVPFILE job that you just ran. All steps should have completed with a return code of zero (RC=0). Among several other files created, each job produces a report and an Execution Log for each execution of Canadian CODE-1 Plus. The C6BM00 driver program is used for any Canadian CODE-1 Plus job.

The output report files that will most likely interest you are the PRNTPRT Report and the PRNTXLG Execution Log that is created for every driver program.

Release 3.4.0 25 User Guide - Open Systems Getting Started with IMS

Release 3.4.0 26 User Guide - Open Systems 3 Defining Batch Jobs Using Control Language and Parameter Definitions

In this chapter

 Using Canadian CODE-1 Plus ...... 28  Canadian CODE-1 Plus Job Steps ...... 29 Using Canadian CODE-1 Plus Using Canadian CODE-1 Plus

Canadian CODE-1 Plus is configured and operated using parameters and control language. You can define parameters and control language.

Parameters Parameters contain your processing instructions for the Canadian CODE-1 Plus system. Through these parameters, you will provide Canadian CODE-1 Plus with the following information: • The format of your input file • The location, length, and format of each relevant data element in your input file • The output files to create • The processing options that should be applied • The location, length, and format of additional output record data elements (such as return codes that tell you what occurred when Canadian CODE-1 Plus processed each record) • The reports to print at the end of the job • The headers, footers, and lines per page for your reports

Control Language In addition to writing parameters to control your job, you will have to write control language. Control language varies from processing platform to processing platform, but its purpose is always the same: to define the operating environment and execute the programs that will process your records. The following table shows the types of control language used by each of the platforms supported by Canadian CODE-1 Plus.

Control Processing Platform Language

z/OS z/OS JCL

IMS z/OS JCL

UNIX and Linux Shell Scripts

Windows Scripts

The job definition method described in this chapter assumes that you are familiar with writing control language for your platform. The control language provided in this manual is example only and must be modified to meet your site-specific needs. For other platform-specific information, see Platform- Specific Details in this guide.

Combining Parameters and Control Language Parameters and control language can be combined in two ways: • Create a file that contains all of your parameters and “point” to that file from your control language. • Embed your parameters directly into your control language file. Either method is acceptable. Canadian CODE-1 Plus runs with the same efficiency regardless of the method you choose.

Release 3.4.0 28 User Guide - Open Systems Chapter 3: Defining Batch Jobs Using Control Language and Parameter Definitions Canadian CODE-1 Plus Job Steps Canadian CODE-1 Plus Job Steps

To create a Canadian CODE-1 Plus job: 1. Copy the IVP file (or the sample job file) to use as a template. 2. Define the physical attributes of your input and output files. 3. Define the layout of your input records. 4. Define the layout of your output records. 5. Define your processing options. 6. Define your reporting options. 7. Write control language.

Parameter Reference The table below shows the parameters required for each step in a Canadian CODE-1 Plus job. Please see Chapter 1 in the Canadian CODE-1 Plus Reference Guide for a complete description of each parameter. Parameters by Job Step

Job Step Parameters Used

Defining the physical attributes of FILEDF input and output files NOTE: A separate FILEDF is required for each input and output file.

Defining the layout of input records ADDRDF, CP PCD, FIRMNM, L CODE

Defining the layout of output records SA OUT, FORMAT, FRENCH, AE OUT, AP OUT, AM OUT, CP OUT, PC OUT

Defining processing options CONFIG, CONFIRM, TESTIT

Defining reporting options REPORT, HEADER, UHDxx, UFTxx, PAGESZ

Step 1. Copying the Sample Job File The Canadian CODE-1 Plus installation process copies a sample job file to your system. This basic job verifies the proper installation of the application files and programs. The sample job file is useful as a template for new jobs because it contains the minimum required content. Copy this job as described in Platform-Specific Details to proceed.

Step 2. Defining the Physical Attributes of Your Files The next step in creating a Canadian CODE-1 Plus job is to define the physical attributes of your input and output files. You will define some or all of the following files: • C6BMNAM - This required file contains your input name/address records. • C6BMC[OK] - This required file contains records that were validated by Canadian CODE-1 Plus. If you define only the C6BMC[OK] file (for output), Canadian CODE-1 Plus will write all output records to that file regardless of whether the records were validated or corrected.

Release 3.4.0 29 User Guide - Open Systems Canadian CODE-1 Plus Job Steps

• C6BMCOR - This optional file contains records that were corrected by Canadian CODE-1 Plus. If you define a C6BMCOR file, Canadian CODE-1 Plus writes only corrected records to that file. If C6BMCOR is not used, the corrected records are written to C6BMC[OK]. • C6BMNCO - This optional file contains records that could not be validated or corrected (for example, the postal code is valid, but the address could not be validated or corrected). If you do not define C6BMNCO, Canadian CODE-1 Plus writes these records to C6BMC[OK]. If you define only the C6BMC[OK] and the C6BMNCO files, Canadian CODE-1 Plus writes all records that were not validated or corrected to C6BMNCO, regardless of whether they have valid postal codes. • C6BMIPC - This optional file contains records that Canadian CODE-1 Plus could neither validate nor correct (the postal codes are not valid in Canada). If you do not define C6BMIPC, those records go to the C6BMNCO file.

 Regardless of the number of output files you define, you must define the input file. You will define these files by creating a separate FILEDF parameter for each file.

Step 3. Defining the Layout of the Input Record Elements To define your input data elements, create parameters specifying the format of the address and the locations and lengths of the address components.

Step 4. Defining the Layout of the Output Record Elements Define the layout and content of the records that Canadian CODE-1 Plus will write to the output files. You will define locations, lengths, and sometimes formats, for the following types of data elements: • Standardized address (validated or corrected) • Normalized address (non-matched) • Address components • Return codes and match statistics • Standardized municipality, province, and postal code To create output records, Canadian CODE-1 Plus: 1. Copies the input record to the output area. 2. Reads all output parameters, writing the data elements they describe to the desired locations.

 Be careful when defining output locations for your data elements to avoid accidentally overwriting original input data. We suggest that you define output locations written beyond that data.

Step 5. Defining Processing Options Define the following processing options: • The configurations used to process your input file: configurations include matching preferences (post office box or address information) and maximum address and overall probabilities of correctness • Whether to write records with a specific input field value directly to the C6BMC[OK] file without being processed: This procedure is called “automatic confirmation” • Whether the parameters in your job should be checked for errors without actually executing the job

Release 3.4.0 30 User Guide - Open Systems Chapter 3: Defining Batch Jobs Using Control Language and Parameter Definitions Canadian CODE-1 Plus Job Steps

Step 6. Defining Reporting Options Select optional Canadian CODE-1 Plus reports in addition to those that are printed automatically. You may also specify some format options for these reports.

Defining the Reports to Print These reports cannot be suppressed: • Parameter Listing • Execution Log • Control Totals • Address Match Execution Statistics These reports are optional: • Analysis of Matched Records • Processing Summary by Province • Processing Summary by List Code • Processing Summary by FSA • Return Code Analysis Report - Correctable and Valid

 The default is to print all of these reports for your job. If you do not want to suppress these reports, you do not need to define the REPORT parameter.

Defining Report Formats While the format for the body of all reports is internally set by Canadian CODE-1 Plus, you can control the format and content of the reports' headers and footers, as well as the number of lines to print on each report page. You can write parameters to modify the following formatting elements: • System Header - Generated by Canadian CODE-1 Plus, the system header is a single line that prints at the very top of the report page and includes the name of the report and the page number. • Main Header - This single-line includes a date (either the system date or another date you specify) and/or up to 40 characters of user-defined text. The main header line is the last header line printed above the main body of the report page. • Additional Header - This header can contain up to four lines of user-defined text, each having up to 132 characters. These lines are printed below the system header and above the main header. • System Footer - Generated by Canadian CODE-1 Plus, the system footer is a single line that prints at the very bottom of the report page. It includes the name of the report and the page number exactly as it appears in the system header. • Additional Footer - This footer can contain up to four lines of user-defined text, each having up to 132 characters. These lines are printed below the body of the report page and above the system footer. For example, a report with all lines of all headers and footers defined would be formatted as follows: System Header Additional Header Line 1 Additional Header Line 2 Additional Header Line 3 Additional Header Line 4

Main Header . .

Release 3.4.0 31 User Guide - Open Systems Canadian CODE-1 Plus Job Steps

. Body of Report . . . Additional Footer Line 1 Additional Footer Line 2 Additional Footer Line 3 Additional Footer Line 4

System Footer

Step 7. Writing Control Language Your software came with a sample file that you should copy and edit as necessary to run your Canadian CODE-1 Plus job. Review Platform-Specific Details, in this guide, for more information on file names and platform-specific functions.

Release 3.4.0 32 User Guide - Open Systems Interactive Processing 4

In this chapter

 Canadian CODE-1 Plus Interactive System ...... 34  Interactive System Main Screen ...... 35  Online Help ...... 36  Address Matching ...... 36  Database Inquiry ...... 38  Example Work Session ...... 42  Correcting Uncoded Records ...... 47 Canadian CODE-1 Plus Interactive System Canadian CODE-1 Plus 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 an additional function that allows you to correct un-coded records. (You must call the user-exit G1C6BNC to correct un-coded records interactively.)

 The interactive screens in this chapter do not display the database version or the date stamp.

Accessing the Interactive System on Different Platforms Follow the steps for your platform. • CICS - z/OS) – initiate transaction G1C6 on a blank CICS screen. • Windows – Go to Start > Programs > Pitney Bowes Canadian CODE-1 Plus > Interactive System. • Unix/LINUX – source the setup, then execute....c6p\bin\runonline. • IMS – Initiate transaction G1C6 on a blank IMS interactive screen.

Address Matching Function The interactive address matching function enables you to:

• Match a single input address against the database. • Analyze return codes to identify actions that were taken to attempt a match. • Detect the types and quantities of problems encountered in an input address.

 For more information on return codes, review Chapter 3 in the Canadian CODE-1 Plus Reference Guide.

For each match attempt, Canadian CODE-1 Plus displays a return code that indicates the success or reason for failure of the attempt. You can choose to view these return codes either in code or expanded English format. In addition to the return codes, Canadian CODE-1 Plus shows you the parsed address elements for each match attempt.

Database Inquiry Function

 This function is available for point of call data, only.

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

Release 3.4.0 34 User Guide - Open Systems Chapter 4: Interactive Processing Interactive System Main Screen

Correcting Uncoded Records Function When you run a batch job in Canadian CODE-1 Plus, you can generate an un-coded records output file (C6BMNCO). This file contains records with valid postal codes that did not match against the database. With a supplied user-exit, you can correct these records within the Canadian CODE-1 Plus Interactive System. To do this, display an un-coded record in the input area, correct the record, write the modified record to the appropriate output file, and then display the next un-coded record. To take advantage of this functionality, you must write a program, 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

Interactive System Main 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. From this screen, you can enter an address and attempt a match or display database information. The different parts of the screen are shown in the figure below.

Input Fields

Match Results

Command Field Position in List

Database Inquiry

Function Keys

Figure 1: Canadian CODE-1 Plus Interactive System Main Screen Components The screen components are as follows: • Input Fields - Enter the address that you want to match • Match Results - Returns the standardized address • Command Field - Enter screen commands • Position in List - Vertical position of the screen • Database Inquiry - Displays a sorted list (either alphabetically or numerically) showing the requested information • Function Keys - A reference to the function keys

Release 3.4.0 35 User Guide - Open Systems Online Help Online Help

The Canadian CODE-1 Plus Interactive System has an extensive help feature. Help is available on three levels: • Context-sensitive help • A system tutorial • A commands list 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 from which you can choose to see the tutorial, a list of all valid commands, or context-sensitive help pertaining to the screen that was displayed when you accessed it. 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, the arrow keys, or the Field Exit key. 2. Enter any available address information, including LVR (Large Volume Receiver) 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 your input. If a match is found, the standardized address line and the standardized municipality/province/postal code line appear on the top half of the screen.

Release 3.4.0 36 User Guide - Open Systems Chapter 4: Interactive Processing Address Matching

4. You can display other match result information by entering RC (return codes) or MAT in the Command field, or you can press F9. Canadian CODE-1 Plus displays the Return Codes screen. This is the first match results screen in a series. Match results screens are described in greater detail in the following section.

Results section: return codes from the match attempt.

Scrolling Through the Match Results Screens

 For a complete reference to the fields on each match results screen, review the Canadian CODE-1 Plus Reference Guide.

Each interactive system screen provides different information about your match attempt: • 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. They can also be displayed sequentially using the DOWN command (F8) or the UP command (F7).

Release 3.4.0 37 User Guide - Open Systems Database Inquiry Database Inquiry

The bottom half of the Canadian CODE-1 Plus Interactive System screen contains the first database inquiry screen. The database inquiry function also includes the following: • DPC - Details in a Postal Code screen • HS - Houses on a Street screen • MU - Municipality Information screen • SMU - Streets in a Municipality screen To maximize the database inquiry screen, type FLIP in the Command field or press function key F9 or F10. More lines are made 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 Through 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. You will see an alphabetical listing of businesses in that municipality.

Moving to a Specific Line on a Screen To move to a specific spot in the data alphabetically, type L (short for “locate”) in the Command field, enter the search string, and then press the ENTER key. For example, if you wanted to position the list to Montreal on the Municipalities screen, you would enter L MONTREAL in the Command field. The first municipality starting with the letters M-O-N-T-R-E-A-L would become the first municipality displayed.

Displaying Data for a Database Entry There are three methods that will allow you to display data for any database line on the screen, and each method produces the same result. In the Command field, you can type the two- or three-character command and the appropriate line number. For example, if the municipality of Montreal, QC, is the second municipality displayed and we want to display all of the streets in Montreal, QC, we would: 1. Type SMU 2 (streets in the municipality on line 1) in the Command field. You will see a listing of all streets in the municipality of Montreal. Most two- or three-character screen abbreviations (like SMU above) are assigned to function keys on the current screen. Refer to the display line on the bottom of the screen for the corresponding function keys. If you want to use a function key to access data instead of typing the two- or three-character code, you can use one of the two methods described below. To display the streets in Montreal, QC, again: 2. Type 2 in the Command field and press the function key F4; or, Position the cursor on the first line of the display (the line with Montreal, QC) and press F4.

Release 3.4.0 38 User Guide - Open Systems Chapter 4: Interactive Processing Database Inquiry

Querying the Database To query the database using some of the methods presented above, you must: 1. Start at the first database inquiry screen.

2. Enter FLIP in the Command field. 3. Enter L MONTREAL in the Command field.

4. The screen changes so that only the database inquiry (and no address matching) information is displayed.

Release 3.4.0 39 User Guide - Open Systems Database Inquiry

5. Enter SMU 1 in the Command field.

 You could also enter just SMU. The line number defaults to 1 if no line number is entered in the Command field.

6. The cursor moves to the Streets in a Municipality screen for the selected municipality (in this case, Montreal, QC).

7. Enter DOWN in the Command field (or press F8) to “scroll” through the list of streets for Montreal, QC.

Release 3.4.0 40 User Guide - Open Systems Chapter 4: Interactive Processing Database Inquiry

8. 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.

9. Optionally, you can enter CITY in the Command field to see city names rather than LVR names.

Release 3.4.0 41 User Guide - Open Systems Example Work Session Example Work Session

This section presents an example case that shows how to use the interactive functions to correct problem addresses. The first step is to access the interactive matching function and enter an address. In our example, the address will not match, so we will use the database inquiry to see if our “detective” skills enable us to find the address. Once we find an address, we will return to the address matching function to look at the results of the match. Our input address is: BANQUE ROYALE PARC LAURIER 351 LAURIAULT AV MONTREAL, QC H2U2K4

The following are the main steps in the address-correction process and will be described in greater detail later in this section: 1. Access the Canadian CODE-1 Plus Interactive System. 2. Query the postal database to determine the correct address.

3. Successfully match the corrected input address to produce parsed address elements and output return codes.

Step 1. Accessing the Interactive System First you must start the Canadian CODE-1 Plus Interactive System. The procedures for this depend on the platform.

• In a Windows environment, double-click on the Interactive System icon. • In a UNIX environment, type the following commands: .. c6p/bin/setup . c6p/bin/runonline • For CICS or IMS users, we start our session at a blank screen.

 The examples in this chapter are shown for a CICS environment, but other platform-specific information is included when necessary.

Release 3.4.0 42 User Guide - Open Systems Chapter 4: Interactive Processing Example Work Session

1. Enter G1C6 to call the Canadian CODE-1 Plus Interactive System.

2. Type the input address as it appears on page 42 and press ENTER.

Canadian CODE-1 Plus attempts to match the address but is unsuccessful (there is no match address or municipality/postal code line displayed). Next, we will determine why a match was not found.

Canadian CODE-1 Plus shows the return codes 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.”

Release 3.4.0 43 User Guide - Open Systems Example Work Session

3. To display the Parsed Elements screen, type DOWN in the Command field and press ENTER, or press F8.

We can see from this screen that the postal code field is blank, indicating that the input postal code was also invalid.

4. To change to the database inquiry function, type INQ and press ENTER, or press F9.

Step 2. Querying the Database The lower half of the screen changes and displays the list of cities in the database.

Release 3.4.0 44 User Guide - Open Systems Chapter 4: Interactive Processing Example Work Session

1. In the Command field, type L Montreal and press ENTER.

The list of cities is repositioned with Montreal at the top. Note that a number of other “Montreal” cities appear on the page, but none are in the desired postal code range.

2. To display all of the streets in Montreal starting with “Lauriault,” first type SMU 1 in the Command field. When you get to the streets, type L Lauriault and press ENTER. You will see the Streets in Montreal, QC screen.

Release 3.4.0 45 User Guide - Open Systems Example Work Session

3. Type HS 1 to see the details of Lauriault street.

You will notice that it does not show “Banque Royale Parc Laurier” in the LVR field and that the house number (351) is not valid for this street (which only has house numbers in the ranges 3075-3377 and 3100-3442). 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. It may be helpful to look at the street information for postal code H2V2K4. By entering DPC H2V 2K4 in the Command line and pressing Enter, you should see the addresses associated with postal code H2V2K4.

We can tell from this screen that the house range and the LVR name match a slightly different street name, indicating that the street name was most likely misspelled.

Release 3.4.0 46 User Guide - Open Systems Chapter 4: Interactive Processing Correcting Uncoded Records

Step 3. Matching a Corrected Address Enter the accurate address, as previously described, and take note of the match return codes.

The blank General RC field indicates a database match. The Correction RC is V for a valid address.

Correcting Uncoded Records

If the G1C6BNC user-exit program is implemented, you can correct uncoded records from the G1C6BNC output file. To correct uncoded records using the Canadian CODE-1 Plus Interactive System, you use two commands: UR (User Read) and UW (User Write). These commands are described below: To correct uncoded records from the C6BMNCO output file, follow the steps below:

1. Start at the Canadian CODE-1 Plus Interactive System screen. 2. Type UR in the Command field to display uncoded address in the input area. 3. You can use any address matching or database inquiry functions necessary to find a match for this address. 4. 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. 5. Repeat steps 2 through 4 until all the records in the uncoded records output file are corrected.

Release 3.4.0 47 User Guide - Open Systems Correcting Uncoded Records

Release 3.4.0 48 User Guide - Open Systems Callable and Stand-Alone 5 Programs

In this chapter

 Canadian CODE-1 Plus Callable Modules ...... 50  The Canadian CODE-1 Plus Matching Module ...... 51  Using the Reverse Lookup Callable Routine - C6DBRLKP . . . . .80  Calling C6DBRLKP (Non-Mainframe Only) ...... 83  Using Program G1G001 to Customize Reports...... 93  Using C6DBPRT to Print the Database Contents ...... 95 Canadian CODE-1 Plus Callable Modules Canadian CODE-1 Plus Callable Modules

Callable modules are the subroutines that provide the functionality of the Canadian CODE-1 Plus system. These modules have been designed so that you can call them from your own applications, allowing you to tailor Canadian CODE-1 Plus to meet your very specific processing needs. Canadian CODE-1 Plus has callable modules for three functions: • Address validation/correction/reporting • Database inquiry type 1 • Database inquiry type 2

Address Validation/Correction Module There are two address validation/correction callable modules: • C6MATCH — This module takes an input record and the processing instructions you provide, matches the input record against the Canadian CODE-1 Plus database, and stores the match results (standardized addresses and return codes) and processing statistics. If requested, this module will also create a report. • C6CICSM — This module provides the same functions as C6MATCH above but with an alternate interface. C6CICSM has been designed to function in a CICS multiple-region environment and allows for the Canadian CODE-1 Plus programs to reside in one region while a link is made to C6CICSM from another AOR. This callable utilizes the C6MATCH call area structure for processing.

Database Inquiry Type 1 and 2 Modules The first database inquiry method is provided by the following module: • C6DBRLKP — This module is a routine that takes 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. A second database inquiry method is provided by the module below: • G1C6LKP — This is a routine that allows you to query the database, starting with city data and drilling down into streets, houses, apartments, and firms on a street.

Call Areas When you call a module, you must use parameters to pass the names of pre-defined call areas. These call areas are blocks of memory containing data that is 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 so 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.

Release 3.4.0 50 User Guide - Open Systems Chapter 5: Callable and Stand-Alone Programs The Canadian CODE-1 Plus Matching Module The Canadian CODE-1 Plus Matching Module

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. A detailed description of the call area for the C6MATCH routine follows. Please read this section to understand the information that you will be asked to supply and the information that will be returned to your calling program.

Following the description of the call area is a discussion of how the calls to the subroutine should be coded based on the calling platform. We have also supplied sample programs in source form for you to use as examples of how to call the C6MATCH subroutine. For CICS the program name is G1C6DMI. This program demonstrates how to call the C6MATCH function as either a CICS LINK or a COBOL call. In CICS a transaction ID id of G1M6 will execute the G1C6DMI program. For batch environments, the C6SMCDR program demonstrates how to use the C6MATCH function.

How Does C6MATCH Work? 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 following tables describe the C6MATCH call area. Refer to Chapter 1 of the Reference Guide for more information on the parameters listed in the right column.

 Pitney Bowes provides a copybook of this area, called C6MATPRM, with your installation. A sample COBOL batch driver program is supplied in the sample library member C6SMCDR.

Notes on the Call Area This section provides additional information on the call area. • 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 Match Call Area table defines the field type: input, output, 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.) • The MOA-ABEND-RC field, which, when not blank, will indicate that a serious/fatal error has occurred. In this case, the MOA-ABEND-TXT field will contain a text description of the problem.

Release 3.4.0 51 User Guide - Open Systems The Canadian CODE-1 Plus Matching Module

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-FORMAT-ADDRESS-OPT

C6MATCH Match Call Area Detail The C6MATCH Match Call Area (Part 1 of 17)

Comments/ Parameter to Position Name Length User Action/Content Reference

1M CA- 1 Select the control parameters that are to be CONFIG FUNCTION- established the first time the matcher is REQ 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- 1 This should be set to N. Input BLK

12-525 Reserved 514

526-533 MCA-IO- 8 Enter the name of the routine used to Input MODULE- regulate the I/O that reads the Canadian NAME Postal Database. By default, the name is C6IOBAT for processing VSAM/KEYED files; GENIOIMS must be specified for processing an IMS database; GENIOINT must be specified for processing under a CICS umbrella.

534-536 Reserved 3

537 MCA-FIX- 1 This should be set to Y. Input FIELD-CNTRY

Release 3.4.0 52 User Guide - Open Systems Chapter 5: Callable and Stand-Alone Programs The Canadian CODE-1 Plus Matching Module

The C6MATCH Match Call Area (Part 2 of 17)

Comments/ Parameter to Position Name Length User Action/Content Reference

538 MCA-FIX- 1 This should be set to Y unless the postal Input FIELD-PC 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- 1 This should be set to Y if the city is in a fixed Input FIELD-CITY location or to C if the city data is mixed with the city field.

540 MCA-FIX- 1 This should be set to Y unless the province Input FIELD-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- 1 This should be set to Y. Input FIELD-ADDR

542 MCA-ALT-CITY- 1 This should be set to Y. Input FLAG

543-565 Reserved 23

566-575 MCA-DB-LIB 10 Database library override library name. Input This field is for the AS/400 platform only. All other platforms are reserved through position 575.

576-625 MIA-CNTRY 50 Country name. This must be uppercase; 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

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- 50 Large volume receiver or government Input NAME agency name. FIRMNM

786-885 Reserved 100

886-985 MIA-STREET-1 100 Primary address line. Input ADDRDF

986-1085 MIA-STREET-2 100 Secondary address line. Input ADDRDF

1086-2385 Reserved 1300

Release 3.4.0 53 User Guide - Open Systems The Canadian CODE-1 Plus Matching Module

The C6MATCH Match Call Area (Part 3 of 17)

Comments/ Parameter to Position Name Length User Action/Content Reference

2386-2387 MOA-ABEND- 2 Return area for abnormal termination of the Output RC 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-2467 MOA-ABEND- 80 Text that explains the abend return code in Output TXT 2386-2387.

2468-2549 Reserved 82

2550-2557 MOA- 8 Software release number and modification Output RELEASE- level (RxxxxMxx). MOD-NUM

2558-4965 Reserved 2408

4966 MOA-CAN-I- 1 A code indicating what to do with input Input POBOX addresses that contain both street address CONFIG information 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)

4967 MOA-CAN-I- 1 For input addresses that contain both a Input PRTY civic and non-civic component (for CONFIG example, a 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- 1 Input code indicating whether the matcher Input VALIDATE- is to correct addresses or validate only. CONFIG FLAG C Perform address correction. (default) V Validate only.

Release 3.4.0 54 User Guide - Open Systems Chapter 5: Callable and Stand-Alone Programs The Canadian CODE-1 Plus Matching Module

The C6MATCH Match Call Area (Part 4 of 17)

Comments/ Parameter to Position Name Length User Action/Content Reference

4970 MOA-CAN- 1 Input code indicating whether accented Input ACCENTS- data is to be output. FORMAT FLAG Y Output data (municipality, street name, etc.) is to contain accents. N Output data is not to contain accents. (default) 1 Read and write data in an 8859-1 code page with multinationals will be returned. This only applies for Unix and Windows.

4971 MOA-CAN-O- 1 A one-byte validation/correction return Output VAL-INVAL- code. One of the following codes will be AM OUT CODE placed 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 55 User Guide - Open Systems The Canadian CODE-1 Plus Matching Module

The C6MATCH Match Call Area (Part 5 of 17)

Comments/ Parameter to Position Name Length User Action/Content Reference

4972 MOA-CAN-O- 1 A one-byte code indicating the success or Output GENERAL-RC reason for failure of the address-match AM OUT attempt: 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 A 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 (or lack of directional) matches the database, or there was no address match at all.

Release 3.4.0 56 User Guide - Open Systems Chapter 5: Callable and Stand-Alone Programs The Canadian CODE-1 Plus Matching Module

The C6MATCH Match Call Area (Part 6 of 17)

Comments/ Parameter to Position Name Length User Action/Content Reference

4974 MOA-CAN-O- 1 A one-byte code indicating the result of the Output STREET-TYPE- suffix match: AM OUT RC 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 (or lack of directional) matches the database, or there was no address match at all.

4975 MOA-CAN-O- 1 A one-byte code indicating the result of the Output APT-RC 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 (or lack of directional) matches the database, or there was no address match at all.

4976 MOA-CAN-O- 1 A one-byte code indicating the result of the Output FIRM-RC 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 57 User Guide - Open Systems The Canadian CODE-1 Plus Matching Module

The C6MATCH Match Call Area (Part 7 of 17)

Comments/ Parameter to Position Name Length User Action/Content Reference

4977 MOA-CAN-O- 1 A one-byte address return code. One of the Output SAR 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- 1 A one-byte code indicating the success or Output PCODE-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 58 User Guide - Open Systems Chapter 5: Callable and Stand-Alone Programs The Canadian CODE-1 Plus Matching Module

The C6MATCH Match Call Area (Part 8 of 17)

Comments/ Parameter to Position Name Length User Action/Content Reference

4979 MOA-CAN-O- 1 A one-byte code indicating the municipality Output INPUT-CITY-RC match condition that resulted when the AM OUT input 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- 1 A one-byte code reflecting the source of the Output MATCH-ADDR- matched address: SA OUT SRC 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- 1 Output Location for one of the following AM OUT QR-RC Questionable Rural Return Codes: 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.

Release 3.4.0 59 User Guide - Open Systems The Canadian CODE-1 Plus Matching Module

The C6MATCH Match Call Area (Part 9 of 17)

Comments/ Parameter to Position Name Length User Action/Content Reference

4983 MOA-CAN-O- 1 A one-byte code indicating the probable AM OUT OVRLL-PRB- correctness of the address match. COR-SCR Generally, the output postal code is more likely correct when this indicator contains a high number. The possible values include: 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- 1 A one-character code indicating whether APT-IND an apartment number was detected in the input 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 60 User Guide - Open Systems Chapter 5: Callable and Stand-Alone Programs The Canadian CODE-1 Plus Matching Module

The C6MATCH Match Call Area (Part 10 of 17)

Comments/ Parameter to Position Name Length User Action/Content Reference

4985 MOA-CAN-O- 1 A one-character code indicating the status PC-STATUS of the output postal code field: 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-4988 MOA-CAN-O- 2 The CPC Record Type of the postal code Output RECORD-TYPE record that was matched. If no match could AM OUT be 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- 1 A one-byte flag indicating how the record Output URBAN- was counted to determine the accuracy PCOUT RURAL-FLAG 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-4995 MOA-CAN-O- 6 Final postal code, as best as it could be Output ANSWER- determined. This field will be blank if the PC OUT PCODE original postal code was invalid and no postal code could be determined.

4996-5005 MOA-CAN-O- 10 The house number Output HOUSE AE OUT

Release 3.4.0 61 User Guide - Open Systems The Canadian CODE-1 Plus Matching Module

The C6MATCH Match Call Area (Part 11 of 17)

Comments/ Parameter to Position Name Length User Action/Content Reference

5006-5035 MOA-CAN-O- 30 The street name Output STREET-NAME AE OUT

5036-5041 MOA-CAN-O- 6 The street type Output STREET-TYPE AE OUT

5042-5043 MOA-CAN-O- 2 The street directional Output STREET-DIR AE OUT

5044-5051 MOA-CAN-O- 8 The apartment number Output APT-NUM AE OUT

5052-5057 MOA-CAN-O- 6 The apartment number, preceded by the Output APT-KEYWORD apartment type AE OUT

5058-5062 MOA-CAN-O- 5 The rural route, in the standard CPC form Output RR-NUM (RR 11, for example) AE OUT

5063-5072 MOA-CAN-O- 10 The Post Office Box number Output BOX-NUM AE OUT

5073-5077 MOA-CAN-O- 5 Delivery installation type Output DI-KEYWORD AE OUT

5078-5092 MOA-CAN-O- 15 Delivery installation qualifier Output DI-QUAL AE OUT

5093-5122 MOA-CAN-O- 30 Delivery installation name Output DI-AREA AE OUT

5123-5124 MOA-CAN-O- 2 The CPC-standard province abbreviation Output PROV CP OUT

5125-5154 MOA-CAN-O- 30 The long municipality name Output LONG-CITY CP OUT

5155-5172 MOA-CAN-O- 18 The 18-character municipality name Output 18-CITY CP OUT

5173-5185 MOA-CAN-O- 13 The short municipality name Output SHORT-CITY CP OUT

5186-5245 MOA-CAN-O- 60 Correct LVR or English government name Output LVR FIRMNM

5246-5305 MOA-CAN-O- 60 French LVR or government agency name Output GOV-FRENCH FIRMNM

5306-5309 Reserved 4

5310-5314 Reserved 5

5315-5338 MOA-CAN-O- 24 The first four additional postal codes found Output MULT-PCODE- (that is, in addition to the postal code M PCDS LIST returned in positions 5205–5210), if multiple postal code matches were obtained.

5339-5388 Reserved 50

Release 3.4.0 62 User Guide - Open Systems Chapter 5: Callable and Stand-Alone Programs The Canadian CODE-1 Plus Matching Module

The C6MATCH Match Call Area (Part 12 of 17)

Comments/ Parameter to Position Name Length User Action/Content Reference

5389-5408 MOA-CAN-O- 20 Product name (Canadian CODE-1 Plus) Output PROD-NAME

5409-5416 Reserved 8

5417-5431 MOA-CAN-O- 15 The Canadian CODE-1 Plus software Output DB-VERSION installation date

5432-5441 MOA-CAN-O- 10 The effective date of the database Output DB-EFF-DT referenced in MOA-CAN-O-DB-VERSION. The format is MM/DD/YYYY

5442 Reserved 1

5443 MOA-CAN- 1 Code indicating the placement of the Input FORMAT-APT- apartment information in relation to the FORMAT OPT other address elements. Enter one of the following: B The apartment identifier and number will be on the back of the address string (such as 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 (such as 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 (such as 2-100 MAIN ST). S The apartment identifier and number will be stored in the secondary standardized address line (such as SUITE 2 100 MAIN ST).

5444 MOA-CAN- 1 Code indicating the format of the Input FORMAT-RR- associated route delivery information in the FORMAT OPT output 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 63 User Guide - Open Systems The Canadian CODE-1 Plus Matching Module

The C6MATCH Match Call Area (Part 13 of 17)

Comments/ Parameter to Position Name Length User Action/Content Reference

5445 MOA-CAN- 1 Code indicating the format of the keyword Input FORMAT- in the output records. Enter one of the FORMAT KEYWD-OPT following: A The abbreviation for the keyword will be used. F The full keyword will be used.

5446 MOA-CAN- 1 Code indicating the format of the Input FORMAT-DIQ- associated delivery office information in the FORMAT OPT output records. Enter one of the following codes: A The associated delivery office information will be placed after the address (for 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 (WILLOWDALE STN MAIN PO BOX 100).

Release 3.4.0 64 User Guide - Open Systems Chapter 5: Callable and Stand-Alone Programs The Canadian CODE-1 Plus Matching Module

The C6MATCH Match Call Area (Part 14 of 17)

Comments/ Parameter to Position Name Length User Action/Content Reference

5447 MOA-CAN- 1 Code indicating the format of French output Input FORMAT- records (see the description of the FORMAT ADDRESS-OPT 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 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 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.

5448 1 Code indicating what to do in situations Input where the output standardized address is FORMAT too long to fit in the location 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.

Release 3.4.0 65 User Guide - Open Systems The Canadian CODE-1 Plus Matching Module

The C6MATCH Match Call Area (Part 15 of 17)

Comments/ Parameter to Position Name Length User Action/Content Reference

5449 MOA-CAN- 1 If MOA-CAN-FORMAT-ADDRESS-OPT Input FORMAT-LNG- (pos. 5447) is T, then an F in this position FRENCH OPT will cause the address to be formatted in French. Any other value will cause the address to be formatted in English.

5450 MOA-CAN- 1 The control for the location of extra Input FORMAT- information. Enter one of the following FORMAT EXTRA-OPT values: 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-5459 MOA-CAN- 9 The apartment identifier that should be Input FORMAT-EN- written to English-format output records FORMAT APT-ID when no such identifier was returned from the matcher. Choices are: APARTMENT, APT, SUITE, and UNIT.

5460-5470 MOA-CAN- 11 The apartment identifier that should be Input FORMAT-FR- written to French-format output records FORMAT APT-ID when no such identifier was returned from the matcher. Choices are: APPARTEMENT, APP, BUREAU, SUITE, and UNITE.

5471-5472 MOA-CAN- 2 Length of the standardized address line 1 Input FORMAT-SAL1- or standardized address with unit SA OUT LENGTH information; Packed decimal

5473-5474 MOA-CAN- 2 Length of the secondary standardized Input FORMAT-SAL2- address without unit information; Packed SA OUT LENGTH decimal

5475-5476 Reserved 2

Release 3.4.0 66 User Guide - Open Systems Chapter 5: Callable and Stand-Alone Programs The Canadian CODE-1 Plus Matching Module

The C6MATCH Match Call Area (Part 16 of 17)

Comments/ Parameter to Position Name Length User Action/Content Reference

5477 MOA-CAN-SS- 1 When the input data record has been 1 alphabetic LVR-FLAG identified as an LVR record (Large Volume character 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. 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. If you enter Y in this field, the Statement of Address Accuracy will not be printed, because this is not a SERP-recognized setting.

5478-5487 MOA-CAN-R- 10 Normalized input house number Output PARSE-HOUSE

5488-5517 MOA-CAN-R- 30 Normalized input street name Output PARSE- STREET

5518-5523 MOA-CAN-R- 6 Normalized input street type Output PARSE- STREET-TYPE

5524-5525 MOA-CAN-R- 2 Normalized input directional Output PARSE- STREET-DIR

5526-5533 MOA-CAN-R- 8 Normalized input apartment number Output PARSE-APT- NUM

5534-5539 MOA-CAN-R- 6 Normalized input apartment identifier Output PARSE-APT- KEYWORD

5540-5544 MOA-CAN-R- 5 Normalized input rural route keyword and Output PARSE-RR- rural route number NUM

5545-5554 MOA-CAN-R- 10 Normalized input lock box number Output PARSE-BOX- NUM

5555-5559 MOA-CAN-R 5 Normalized input delivery installation type Output PARSE-DI- KEYWORD

5560-5574 MOA-CAN-R- 15 Normalized input delivery installation Output PARSE-DI- qualifier QUAL

Release 3.4.0 67 User Guide - Open Systems The Canadian CODE-1 Plus Matching Module

The C6MATCH Match Call Area (Part 17 of 17)

Comments/ Parameter to Position Name Length User Action/Content Reference

5575-5604 MOA-CAN-R- 30 Normalized input delivery installation name Output PARSE-DI- AREA

5605-5632 Reserved 28

5633-5682 MOA-CAN-O- 50 Fixed-fielded analysis codes Output ANAL-CODES AM OUT NOTE: Please review to Chapter 3 of the Reference Guide for a detailed description of this area.

5683-5780 MOA-CAN-O- 98 The complete standardized address line 1. Output STD-ADDR1 SA OUT

5781 MOA-CAN-O- 1 A one-character field indicating address Output SA1-TRUNC truncation SA OUT S Address was split onto address line 2. X Truncation occurred. blank No truncation or splitting occurred.

5782-5879 MOA-CAN-O- 98 The complete standardized address line 2. Output STD-ADDR2 SA OUT

5880 MOA-CAN-O- 1 A one-character field indicating address Output SA2-TRUNC truncation. SA OUT X Truncation occurred blank No truncation occurred.

5881-5978 MOA-CAN-O- 98 The extra information line. Output XTRA-INFO AP OUT

5979 MOA-CAN-O- 1 A one-character field indicating extra Output XTRA-TRUNC information truncation. AP OUT X Truncation occurred. blank No truncation occurred.

5980-6022 MOA-CAN-O- 43 The complete street name Output STRT-NAME SA OUT

6023-6073 MOA-CAN-O- 51 The street address, without apartment Output STRT-ADDR information SA OUT

6074-6116 MOA-CAN-O- 43 Standardized Municipality/Province/Postal Output MUN-PROV-PC Code line, constructed using the long (30- CP OUT byte maximum) municipality name.

6117-6144 MOA-CAN-O- 28 Standardized Municipality/Province/Postal Output MPPC-SHORT Code line, constructed using the short (13- CP OUT byte maximum) municipality name.

6145-6157 MOA-CAN-O- 13 The apartment number, preceded by the Output APT-NM-NUM apartment type. SA OUT

Release 3.4.0 68 User Guide - Open Systems Chapter 5: Callable and Stand-Alone Programs The Canadian CODE-1 Plus Matching Module

The C6PRPT Call Area The C6PRPT Call Area (Part 1 of 2)

Parameter/Co Position Name Length User Action/Content mments

NOTE: The following detail-level parameters are used for all but the last call to C6PRPT.

1-237 Reserved Field 237

NOTE: All of the report flags listed below default to Y.

238 RP-RPANMR 1 A code that indicates whether or not the REPORT Analysis of Matched Records Report should be printed: Y Print the report (default). N Do not print the report.

239 RP-RPSMPR 1 A code that indicates whether or not the REPORT Summary by Province Report should be printed: Y Print the report (default). N Do not print the report.

240 RP-RPSMLC 1 A code that indicates whether or not the REPORT Summary by List Code Report should be printed: Y Print the report (default). N Do not print the report.

241 RP-RPSMFS 1 A code that indicates whether or not the REPORT Summary by FSA Code Report should be printed: Y Print the report (default). N Do not print the report.

242 RP-RPUPLO 1 A code indicating whether or not the REPORT reports should be printed in all upper case: Y Print the reports in all upper-case (default). N Print the reports in mixed-case.

243-252 RP-DATE 10 The date that is to be printed at the top of HEADER the reports.

253-292 RP-HEADER 40 The main header that is to be printed at UHDxx the top of the reports.

293-424 RP-UHD-(1) 132 The first line of the additional header that UHDxx is to be printed at the top of the reports.

425-556 RP-UHD-(2) 132 The second line of the additional header UHDxx that is to be printed at the top of the reports.

557-688 RP-UHD-(3) 132 The third line of the additional header that UHDxx is to be printed at the top of the reports.

689-820 RP-UHD-(4) 132 The fourth line of the additional header UHDxx that is to be printed at the top of the reports.

Release 3.4.0 69 User Guide - Open Systems The Canadian CODE-1 Plus Matching Module

The C6PRPT Call Area (Part 2 of 2)

Parameter/Co Position Name Length User Action/Content mments

821-952 RP-UFT-(1) 132 The first line of the footer that is to be UFTxx printed at the bottom of the reports.

953-1084 RP-UFT-(2) 132 The second line of the footer that is to be UFTxx printed at the bottom of the reports.

1085-1216 RP-UFT-(3) 132 The third line of the footer that is to be UFTxx printed at the bottom of the reports.

1217-1348 RP-UFT-(4) 132 The fourth line of the footer that is to be UFTxx printed at the bottom of the reports.

Calling C6MATCH (All Platforms) Regardless of what platform you are using, you should complete the steps below prior to the first call to C6MATCH. 1. Initialize the entire C6PRPT call area to spaces, but only for the first call. 2. For the first call only, initialize the entire C6MATCH area to spaces and complete the following steps: • Enter Y 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)

• Initialize the 10 MCA-USE-ADR-BLK PIC X area to N. • Enter your data into the input address information fields (listed below) and set options for any other input MOA-fields you wish to change.

After the First Call to C6MATCH (Non-CICS) After you have called C6MATCH for the first time, do not re-initialize the C6MATCH call area. There are internal fields that are set with the first call and not reset with subsequent calls. With those subsequent calls, you should manipulate only the fields noted in the general guidelines.

Calling C6MATCH (Non-Mainframe Only) The instructions in this chapter assume that the application from which you want to call Canadian CODE-1 Plus is written in COBOL. If your application is not written in COBOL, please refer to the programmer documentation for the appropriate language to find instructions for calling programs outside your application. The documentation provided with the COBOL compiler on your system should also be consulted for details on calling COBOL programs from those written in other languages. Call C6MATCH using C6MATPRM

Release 3.4.0 70 User Guide - Open Systems Chapter 5: Callable and Stand-Alone Programs The Canadian CODE-1 Plus Matching Module

Calling C6MATCH (z/OS) When you call Canadian CODE-1 Plus from your own application, there are a few special provisions you may need to make. The following sections discuss things to consider before and after the first call to C6MATCH.

Before the First Call to C6MATCH (Non-CICS) If you are using a programming language other than COBOL II with the COBOL II version of Canadian CODE-1 Plus, the COBOL II run-time environment must be initialized before the first call to the software. You can do this by using either the COB2STUB or the COB2INI program, as described on page 78.

After the First Call to C6MATCH (Non-CICS) After you have called C6MATCH for the first time, do not re-initialize the C6MATCH call area. There are internal fields that are set with the first call and not reset with subsequent calls. With those subsequent calls, you should manipulate only the fields noted in the general guidelines.

Calling C6MATCH (IMS)

Call C6MATCH using DFHEIBLK DFHCOMMAREA C6MATPRM C6PRPT-CALL G1ICGPR-PCB G1ICGLU-PCB G1ICTBL-PCB G1ICMUN-PCB G1ICRST-PCB G1ICSDD-PCB G1ICSTD-PCB G1ICPCD-PCB G1ICPND-PCB G1C6DBI-PCB

DFHEIBLK and DFHCOMMAREA For non-CICS calls, use the following to map the first two call areas: 01 DFHEIBLK PIC(X). 01 DFHCOMMAREA PIC(X). For CICS calls, use the standard CICS definitions for these two areas. You should not use an EXEC CICS LINK; instead use a COBOL call statement, as above. If you still wish to use an EXEC CICS LINK, you can enter the following: 01 WS-C6CICSM PIC X(8) VALUE “C6CICSM”. EXEC CICS LINK PROGRAM (WS-C6CICSM) COMMAND (MATCHER-PARAMETERS) LENGTH (LENGTH OF MATCHER-PARAMETERS) END-EXEC

Release 3.4.0 71 User Guide - Open Systems The Canadian CODE-1 Plus Matching Module

Remaining Parameter Areas For non-IMS calls, 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). For IMS calls, you must also include Program Control Blocks (PCBs) in your 01-level linkage section. When you call any matcher module, you must specify the Canadian Postal Database PCBs that are coded in all of the PCBs distributed with the Canadian CODE-1 Plus IMS system installation/software. The PCB is listed below for your convenience. Replace “xxx” with the appropriate file designator (“LIC,” “GDR,” etc.). 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 72 User Guide - Open Systems Chapter 5: Callable and Stand-Alone Programs Call Areas Call Areas

 TIP: Do NOT change the copybooks.

When you call a Canadian CODE-1 Plus module, you must pass, as parameters (addresses), the name of a pre-defined area. This area contains data that is used by both your driver and the matcher. This call area has a specific copybook with which it is associated. These copybooks describe the data that is stored in each byte of the call area. The copybooks are very specific, so that the driver and called module “know” where each piece of data is stored in the call area. Therefore, the copybooks must not be altered in any way.

The copybook of the call area is supplied to call the Batch Matchers (C6MATCHx) as COBOL (C6MATPRM), Assembler (C6MATPRA), and PL/I (PLIP9I, PLIP9O, and PLIP9A).

Calling Canadian CODE-1 Plus in z/OS When you call Canadian CODE-1 Plus from your own application in the z/OS environment, there are a few considerations:

 LE conforming languages, such as High-Level Assembler, RPG, and C are included for LE. You will not need to initialize the LE Runtime Environment for these languages.

If you are using programming languages (see sidebar), other than COBOL for OS390 or COBOL II with any version of Canadian CODE-1 Plus (other than the Static version), the Language Environment (LE) runtime environment must be initialized prior to the first call to Canadian CODE-1 Plus. You can do this by using either the COBxSTUB, or the COBxINI programs as described on the following page. Or you may write your own routines to perform this task. The sections on the following pages explain how to initialize the runtime environment from programs written in other languages using COBxSTUB and COBxINI.

 When you call Canadian CODE-1 Plus from your own application in a z/OS environment, you must initialize the P9AUDIT and P9IN areas to SPACES before the first call to C6MATCHx. C6MATCHx then initializes all the numeric fields to the proper values. You should not initialize these structures after the initial call (including the last call which terminates the process).

Using COBxSTUB If the non-COBOL user-written program that calls Canadian CODE-1 Plus is a batch program, you can use the appropriate COBxSTUB program, which is shipped with Canadian CODE-1 Plus, to initialize the runtime environment.

Use COBMSTUB to Initialize the LE (for z/OS) Runtime

 This method is easier to use than the method of Using COB2INI to Initialize the COBOL II Run-Time Environment.

Release 3.4.0 73 User Guide - Open Systems Call Areas

Using the COBxSTUB method, Canadian CODE-1 plus passes the name of the user-written program as a parameter, through JCL, and that program is dynamically called. The COBxSTUB program is written in the appropriate COBOL language. In this fashion, COBxSTUB becomes the top program in the calling heap/stack and causes the LE runtime environment to be initialized before the user- written program is executed. We recommend that the user-written program perform a dynamic call to the Canadian CODE-1 Plus matcher.

 The following JCL is a sample, only. This sample may not contain late-breaking changes and may not be up-to-date. Please reference the JCL included with your product installation package.

Sample z/OS JCL

//yourjobcard //yourstep EXEC PGM=COBxSTUB,PARM='your_program_name',REGION=0M //STEPLIB DD DSN=yourhlq.C6P.LOADLIB,DISP=SHR // DD DSN=yourRTlib,DISP=SHR //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=* //********************************************************************** //* CANADIAN CODE-1 PLUS DATABASE FILE DEFINITIONS //********************************************************************** //G1ICTBL DD DSN=yourhlq2.C6P.G1ICTBL,DISP=SHR, AMP=('BUFNI=4,BUFND=4') //G1ICGPR DD DSN=yourhlq2.C6P.G1ICGPR,DISP=SHR, AMP=('BUFNI=4,BUFND=4') //G1ICGLU DD DSN=yourhlq2.C6P.G1ICGLU,DISP=SHR, AMP=('BUFNI=4,BUFND=4') //G1ICSTD DD DSN=yourhlq2.C6P.G1ICSTD,DISP=SHR, AMP=('BUFNI=4,BUFND=4') //G1ICSDD DD DSN=yourhlq2.C6P.G1ICSDD,DISP=SHR, AMP=('BUFNI=4,BUFND=4') //G1ICRST DD DSN=yourhlq2.C6P.G1ICRST,DISP=SHR, AMP=('BUFNI=4,BUFND=4') //G1ICPND DD DSN=yourhlq2.C6P.G1ICPND,DISP=SHR, // AMP=('BUFNI=4,BUFND=4') //G1ICPCD DD DSN=yourhlq2.C6P.G1ICPCD,DISP=SHR, // AMP=('BUFNI=4,BUFND=4') //G1ICMUN DD DSN=yourhlq2.C6P.G1ICMUN,DISP=SHR, // AMP=('BUFNI=4,BUFND=4') //G1C6DBI DD DSN=yourhlq2.C6P.G1C6DBI,DISP=SHR //* //***************************************************************** //* INPUT, OUTPUT, AND PRINT REPORT DEFINITIONS //***************************************************************** //C6BMNAM DD DSN=yourhlq.IVPFILE.NAMEADDR,DISP=SHR //C6BMCOK DD DSN=NULLFILE, // DCB=(RECFM=FBA,LRECL=133,BLKSIZE=133) //PRNTRPT DD SYSOUT=*,DCB=(RECFM=F,LRECL=133,BLKSIZE=133) //PRNTXLG DD SYSOUT=*,DCB=(RECFM=F,LRECL=133,BLKSIZE=133) //PRNTCAS DD SYSOUT=*,DCB=(RECFM=F,LRECL=133,BLKSIZE=133) //***************************************************************** //* CANADIAN CODE-1 PLUS IVP FILE PARAMETER RECORDS //***************************************************************** //C6BMPRM DD DSN=yourhlq.C6P.PARFILE,DISP=SHR /* //

Release 3.4.0 74 User Guide - Open Systems Chapter 5: Callable and Stand-Alone Programs Call Areas

Using COBxINI This section describes the steps for using the COBxINI program.

Initializing the LE Runtime If you are using non-LE-conforming languages, follow the steps below to initialize the LE runtime environment: 1. Add the following to the WORKING STORAGE SECTION:

 Replace the x in the examples below with M for MVS.

10 COBx-RETURN-CODE PIC S9(9) COMP VALUE ZERO. 88 COBxINI-OK VALUE ZERO. 88 COBxINI-ALREADY VALUE +4,

2. Add the following to the PROCEDURE DIVISION to execute once before the first call to C6MATCHx or C6ANZADR:

CALL 'COBxINI' USING COBx-RETURN-CODE. IF COBxINI-OK NEXT SENTENCE ELSE IF COBxINI-ALREADY (display a message “LE already initialized” continue the run) ELSE (handle error-condition and terminate the run).

3. Compile/Assemble your program and link with the library/sublibrary that contains the COBxINI object. If you use another language other than COBOL, you can apply the same techniques described above, simply convert the COBOL language syntax into the syntax of the programming language that you use.

IMS Program Control Blocks (PCBs) In addition to call areas, when you are using C6MATCHx with IMS, you must also include Program Control Blocks (PCB) in your 01-level linkage section. When you call any matcher module, you must include the Canadian CODE-1 Plus database PCBs that are coded in all of the PSBs distributed with the Canadian CODE-1 Plus IMS system installation/software. The PCB is listed next for your convenience.

Batch Process PCB List *------* IMS PSB USED WITH THE C6BM00 BATCH DRIVER PROGRAM *------* G1ICGPR DATA BASE * PCB TYPE=DB,NAME=G1ICGPR,PROCOPT=GO,KEYLEN=141 SENSEG NAME=PRBSEG,PARENT=0 * * G1ICGLU DATA BASE * PCB TYPE=DB,NAME=G1ICGLU,PROCOPT=GO,KEYLEN=108 SENSEG NAME=LKUPSEG,PARENT=0 *

Release 3.4.0 75 User Guide - Open Systems Call Areas

* G1ICTBL DATA BASE * PCB TYPE=DB,NAME=G1ICTBL,PROCOPT=GO,KEYLEN=14 SENSEG NAME=TBLSEG,PARENT=0 * * G1ICMUN DATA BASE * PCB TYPE=DB,NAME=G1ICMUN,PROCOPT=GO,KEYLEN=2 SENSEG NAME=ICPSEG,PARENT=0 * * G1ICRST DATA BASE * PCB TYPE=DB,NAME=G1ICRST,PROCOPT=GO,KEYLEN=2 SENSEG NAME=ICPSEG,PARENT=0 * * G1ICSDD DATA BASE * PCB TYPE=DB,NAME=G1ICSDD,PROCOPT=GO,KEYLEN=2 SENSEG NAME=ICPSEG,PARENT=0 * * G1ICSTD DATA BASE * PCB TYPE=DB,NAME=G1ICSTD,PROCOPT=GO,KEYLEN=2 SENSEG NAME=ICPSEG,PARENT=0 * * G1ICPCD DATA BASE * PCB TYPE=DB,NAME=G1ICPCD,PROCOPT=GO,KEYLEN=4 SENSEG NAME=PCDSEG,PARENT=0 * * G1ICPND DATA BASE * PCB TYPE=DB,NAME=G1ICPND,PROCOPT=GO,KEYLEN=3 SENSEG NAME=PNDSEG,PARENT=0 * * G1C6DBI DATA BASE * PCB TYPE=DB,NAME=G1C6DBI,PROCOPT=GO,KEYLEN=3 SENSEG NAME=DBISEG,PARENT=0 * PSBGEN PSBNAME=C6BM00,LANG=COBOL,CMPAT=YES END

Interactive Process PCB List *------* IMS PSB USED WITH THE ON-LINE IMS PROGRAM G1C6C00 *------* * ALTERNATE PCB USED FOR MSG SWITCH, ERROR MSGS, ETC. * PCB TYPE=TP,MODIFY=YES * * G1ICGPR DATA BASE * PCB TYPE=DB,NAME=G1ICGPR,PROCOPT=GO,KEYLEN=141 SENSEG NAME=PRBSEG,PARENT=0 * * G1ICGLU DATA BASE *

Release 3.4.0 76 User Guide - Open Systems Chapter 5: Callable and Stand-Alone Programs Call Areas

PCB TYPE=DB,NAME=G1ICGLU,PROCOPT=GO,KEYLEN=108 SENSEG NAME=LKUPSEG,PARENT=0 * * G1ICTBL DATA BASE * PCB TYPE=DB,NAME=G1ICTBL,PROCOPT=GO,KEYLEN=14 SENSEG NAME=TBLSEG,PARENT=0 * * G1ICMUN DATA BASE * PCB TYPE=DB,NAME=G1ICMUN,PROCOPT=GO,KEYLEN=2 SENSEG NAME=ICPSEG,PARENT=0 * * G1ICRST DATA BASE * PCB TYPE=DB,NAME=G1ICRST,PROCOPT=GO,KEYLEN=2 SENSEG NAME=ICPSEG,PARENT=0 * * G1ICSDD DATA BASE * PCB TYPE=DB,NAME=G1ICSDD,PROCOPT=GO,KEYLEN=2 SENSEG NAME=ICPSEG,PARENT=0 * * G1ICSTD DATA BASE * PCB TYPE=DB,NAME=G1ICSTD,PROCOPT=GO,KEYLEN=2 SENSEG NAME=ICPSEG,PARENT=0 * * G1ICPCD DATA BASE * PCB TYPE=DB,NAME=G1ICPCD,PROCOPT=GO,KEYLEN=4 SENSEG NAME=PCDSEG,PARENT=0 * * G1ICPND DATA BASE * PCB TYPE=DB,NAME=G1ICPND,PROCOPT=GO,KEYLEN=3 SENSEG NAME=PNDSEG,PARENT=0 * * G1C6DBI DATA BASE * PCB TYPE=DB,NAME=G1C6DBI,PROCOPT=GO,KEYLEN=3 SENSEG NAME=DBISEG,PARENT=0 * * CUSTOMIZATION DATA BASE * PCB TYPE=DB,NAME=G1C6FDF,KEYLEN=16,PROCOPT=A SENSEG NAME=G1C6DFT,PARENT=0,PROCOPT=A * * COMM AREA (TEMP STORAGE) DATA BASE * PCB TYPE=DB,NAME=G1C6COM,KEYLEN=16,PROCOPT=PA SENSEG NAME=LTERMSEG,PARENT=0,PROCOPT=PA SENSEG NAME=TSQSEG,PARENT=LTERMSEG,PROCOPT=PA SENSEG NAME=QUEUESEG,PARENT=TSQSEG,PROCOPT=A * PSBGEN PSBNAME=G1C6C00,LANG=COBOL END

Release 3.4.0 77 User Guide - Open Systems Call Areas

Using COB2STUB to Initialize the COBOL II Run-Time Environment from Batch If the non-COBOL II user-written application that calls Canadian CODE-1 Plus is a batch program, you can use the COB2STUB program, which is shipped with Canadian CODE-1 Plus, to initialize the COBOL II run-time environment. This method is easier to use than the COB2INI method described below. Using the COB2STUB method, the name of the user-written program is passed as a parameter through JCL or by other means to the COB2STUB program. (COB2STUB is a stub program written in COBOL II, hence its name.) COB2STUB becomes the top program in the calling stack, and as such, it causes the COBOL II run-time environment to be initialized before the user- written application is executed. It is recommended that the user-written program perform a dynamic call of the Canadian CODE-1 Plus matcher.

 Sample JCL is provided in the sample library provided with your installation.

Using COB2INI to Initialize the COBOL II Run-Time Environment If you are using an older version of COBOL (pre-COBOL II), follow the steps below: 1. Add the following to the WORKING_STORAGE SECTION: 10 COB2-RETURN-CODE PIC S9 (9) COMP VALUE ZERO 88 COB2INI-OK VALUE ZERO 88 COB2TRM-OK VALUE ZERO

2. Add the following to the PROCEDURE DIVISION to execute once before the first call to C6MATCH: CALL 'COB2TRM' USING COB2-RETURN-CODE. IF NOT COB2TRM-OK (handle error-condition and abend)

3. After the last call to C6MATCH, you can optionally add the following: CALL 'COB2TRM' USING COB2-RETURN-CODE. IF NOT COB2TRM-OK (handle error-condition and abend)

4. Compile the COBOL and link with the COBOL II static link library. If you use another language besides COBOL, you can apply the same techniques described above, but you must convert the COBOL language syntax into the syntax of the programming language that you use.

Using Assembler to Initialize the COBOL II Run-Time Libraries 1. Add the following constants: COB2INIT DC F'0' COB2INI RETURN CODE INITIALIZE COB2TERM DC F'0' COB2INI RETURN CODE TERMINATE

2. Add the following to execute once before the first call to C6MATCH: CALL COB2INI,(COB2INIT) COBOL II INITIALIZATION L 15,COB2INIT C 15,=F'4' CHECK RETURN CODE BNH INITOK . . (Handle bad return-code from COBOL II initialization)

Release 3.4.0 78 User Guide - Open Systems Chapter 5: Callable and Stand-Alone Programs Call Areas

3. After the last call to C6MATCH, you can optionally add the following: CALL COB2INI, (COB2TERM)COBOL II TERMINATION L 15,COB2TERM LTR 15, 15CHECK RETURN CODE BZ TERMOK C 15,=F'16'CHECK RETURN CODE BE TERMOK Handle bad return-code from COBOL II termination

Assemble the program and link with the COBOL II static link library from the distribution.

Release 3.4.0 79 User Guide - Open Systems Using the Reverse Lookup Callable Routine - C6DBRLKP Using the Reverse Lookup Callable Routine - 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.

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

MR Mobile Route

RR Rural Route

SS Suburban Service

PO PO Box

GD General Delivery

Release 3.4.0 80 User Guide - Open Systems Chapter 5: Callable and Stand-Alone Programs Using the Reverse Lookup Callable Routine - C6DBRLKP

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 C6RLKPRM with your installation files. LM-PC-REV-LK Fields

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-ENG 60 LVR or government name in English.

113-172 LM-PC-REV-LK-GOV-FRN 60 Government name in French.

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. GENIOIMS must be specified for processing an IMS database, and GENIOINT must be used for processing under a CICS umbrella.

3752 LM-PC-REV-FUNCTION- 1 Used to indicate whether accented or non-accented REQ data is to be returned. 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.

Release 3.4.0 81 User Guide - Open Systems Using the Reverse Lookup Callable Routine - C6DBRLKP

The output area mentioned above is formatted in one of two ways, depending on whether non-civic or civic data is returned. LM-PC-REV-LK Field Formatting (Part 1 of 2)

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. Position 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. Position 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-KEYWORD 20 The non-civic keyword data for this database entry.

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

Release 3.4.0 82 User Guide - Open Systems Chapter 5: Callable and Stand-Alone Programs Using the Reverse Lookup Callable Routine - C6DBRLKP

LM-PC-REV-LK Field Formatting (Part 2 of 2)

Position Name Length Comments

88-94 LM-PC-REV-LK-ROUTE 7 The associated route information for this database entry.

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

Calling C6DBRLKP (Non-Mainframe Only) Use the basic COBOL call statement for non-mainframe operating systems: Call C6DBRLKP USING LM-PC-REV-LK-AREA

Calling C6DBRLKP on z/OS Call C6DBRLKP using DFHEIBLK DFHCOMMAREA LM-PC-REV-LK-AREA G1ICGPR-PCB G1ICGLU-PCB G1ICTBL-PCB G1ICMUN-PCB G1ICRST-PCB G1ICSDD-PCB G1ICSTD-PCB G1ICPCD-PCB G1ICPND-PCB G1C6DBI-PCB

DFHEIBLK and DFHCOMMAREA For non-CICS calls, use the following to map the first two call areas: 01 DFHEIBLK PIC(X). 01 DFHCOMMAREA PIC(X). For CICS calls, use the standard CICS definitions for these two areas. Do not use an “EXEC CICS LINK”; use a COBOL call statement instead.

Release 3.4.0 83 User Guide - Open Systems Using the Reverse Lookup Callable Routine - C6DBRLKP

Remaining Parameter Areas For non-IMS calls, 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). For IMS calls, you must also include Program Control Blocks (PCBs) in your 01-level linkage section. When you call any matcher module, you must specify the Canadian Postal Database PCBs that are coded in all of the PCBs distributed with the Canadian CODE-1 Plus IMS system installation/software. The PCB is listed below for your convenience. Replace “xxx” with the appropriate file designator (“LIC” or “GDR” for example). 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 84 User Guide - Open Systems Chapter 5: Callable and Stand-Alone Programs Use G1C6LKP to Browse the Database Content Use G1C6LKP to Browse the Database Content

This callable module allows you to browse the contents of the Canadian CODE-1 Plus database. For mainframe platforms, G1C6LP is only available in CICS.

Sample Call for G1C6LKP 01 WS-C6P-DBLOOK-PGM PIC X(8) VALUE ’G1C6LKP’. 01 WS-MISC-LENGTHS. 05 WS-LENGTH-DBLOOK-AREAS PIC S9(04) COMP. . 01 WS-C6P-DBLOOK-AREAS COPY LOOKREQ. . MOVE LENGTH OF WS-C6P-DBLOOK-AREAS TO WS-LENGTH-DBLOOK-AREAS. EXEC CICS LINK PROGRAM(WS-C6P-DBLOOK-PGM) COMMAREA (WS-C6P-DBLOOK-AREAS) LENGTH(WS-LENGTH-DBLOOK-AREAS) END-EXEC. To ensure the integrity of the database to be passed, initialize the following areas in the calling program, along with any other fields that will receive data: • Move spaces to G1C6LKP-USER-REQUEST-AREA • Move all X“00000C” to G1C6LKP-MAX-RETURN-CONTROL fields. We also provide sample programs in source form to use as examples for calling the G1C6LKP subroutine. The sample interactive program, G1C6DSM, demonstrates how to use the G1C6LKP function. In CICS, a transaction ID of G1L6 runs this program.

G1C6LKP-USER-REQUEST-AREA The following table defines the 13,306-byte user input call area for G1C6LKP. We provide a copybook of this area with your installation files.

 This program is set to specific master file references—you cannot manipulate or browse other addresses. Instead, you can display various elements of these particular addresses.

Release 3.4.0 85 User Guide - Open Systems G1C6DSM Sample Program G1C6DSM Sample Program

The C6INQPRM Call Area (Part 1 of 3)

Position Name Length Comments

1-6 G1C6LK-COMMAND 6 This field is required for all G1C6LKP calls, defining 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 86 User Guide - Open Systems Chapter 5: Callable and Stand-Alone Programs G1C6DSM Sample Program

The C6INQPRM Call Area (Part 2 of 3)

Position Name Length Comments

101-118 G1C6LK-MAX- 18 Packed decimal fields (which have an internal length of 5 but RETURN-CONTROL can pack 5-digit numbers) are required for all G1C6LK 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 is to be 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 - It is an illegal command string. 2 - The requested command is not allowed from 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 SIGNATURE “OPEN” 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 87 User Guide - Open Systems G1C6DSM Sample Program

The C6INQPRM Call Area (Part 3 of 3)

Position Name Length Comments

332-410 G1C6LK-LINE- 79 Used by the caller to examine lines returned by the call. Once BREAKDOWN a result set is returned, each line may be moved here from the area starting at position x(25x79) for further analysis.

NOTE: See the provided copybook for examples of the various layouts that can be returned.

411-489 MU-LINE REDEFINE 79

490-564 MPC-LINE REDEFINE 75

565-717 SC-LINE REDEFINE 153

718-796 SPC-LINE REDEFINE 79

797-875 HS-LINE1 REDEFINE 79

876-968 HS-LINE REDEFINE 93

969-1047 LVR-LINE REDEFINE 79

1048-1126 Reserved 79

1127-1128 G1C6LK-POSITION 2 The position of the data returned in relation to all available data: “T” Top “ “ Middle “B” Bottom “TB” All

1129-1131 G1C6LK-LAST-LEVEL 3 Last successful position within the database based on the user’s request.

1132-1228 G1C6LK-RESULT- 97 Data identified by G1C6LKP as required (through G1C6LK- 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-3203 G1C6LK-DATA-TABL 25 (X 25 occurrences of 79 bytes of data returned from the current 79) request. The number of occurrences of valid data depends on the applicable G1C6LK-MAX-RETURN-CONTROL value, but cannot exceed 25.

3204-3306 Reserved 103

3307- G1C6LK-IPC-AREAS 10,000 This area is reserved for inter-program communications. 13306 (THIS FIELD MUST NEVER BE MODIFIED BY THE CALLER)

This sample program is provided to assist you with generating your own calls to G1C6LKP. However, this is simply a sample program that illustrates the minimum functions required to generate the call. This program is written in COBOL and is available for the following environments: • Windows • Unix • z/OS

Release 3.4.0 88 User Guide - Open Systems Chapter 5: Callable and Stand-Alone Programs G1C6DSM Sample Program

On Windows and Unix Follow the instructions in the table below to execute the sample G1C6DSM program.

Platform Command

Windows Double-click the /Canadian CODE-1 Plus/bin/SMPLDSM.BAT file.

Unix Source the setup script and enter RUNDBBROWSE.

Notes on Using G1C6DSM in Windows and Unix Use the following guidelines when working with G1C6DSM: • Available commands include CM, SC, and HS. • All commands must be entered in uppercase. • The DP command invokes the reverse lookup program, equivalent to the DPC command of the Interactive System. • Within a CM, SC, or HS command, page down by entering an asterisk (*) in the fourth position of the command line (for example, “SC *”). • Specify the number of pages to be returned by placing a value in the fifth position of the command line (for example, “SC *2”). • Exit the system by entering blanks in all five positions of the command line.

Sample Screens The following are sample screens for the CM, SC, HS, and DP commands.

CM Sample

SW VERSION: [version] CANADIAN CODE-1 PLUS DB VINTAGE: [vintage] G1S6,CM,BAY,TORONTO,ON,,,,, DATA POSITION: -TOP- RC= LEVEL= CM STREET NAME = ------MUNI= PROV= PCD= ------TORONTO ON TORONTO TORQUAY SK TORQUAY TORRANCE ON TORRANCE TORRINGTON AB TORRINGTON TORS COVE NF TORS COVE TORY HILL ON TORY HILL TOTTENHAM ON TOTTENHAM TOURELLE QC TOURELLE TOUROND MB TOUROND TOURVILLE QC TOURVILLE TOUTES AIDES MB TOUTES AIDES TOWER HILL NB TOWER HILL TOWER ROAD NS TOWER ROAD TOWNSEND ON TOWNSEND TOWNSEND CENTRE ON TOWNSEND CENT

CM___ Enter your command here

Release 3.4.0 89 User Guide - Open Systems G1C6DSM Sample Program

SC Sample

SW VERSION: [version] CANADIAN CODE-1 PLUS DB VINTAGE: [vintage] G1S6,SC,BAY,TORONTO,ON,,,,, DATA POSITION: -TOP- RC= LEVEL= SC STREET NAME = ------MUNI= TORONTO PROV= ON PCD= ------BAY BAYFIELD BEACHVIEW BEACONSFIELD BEATON BEATRICE BEATY BEAUFORT BEAUMONT BEAVER BECK BEDFORD BEDFORD PARK BEECH BELCOURT SC___

HS Sample

SW VERSION: [version] CANADIAN CODE-1 PLUS DB VINTAGE: [vintage] G1S6,HS,BAY,TORONTO,ON,,,,, DATA POSITION: -TOP- RC= LEVEL= HS STREET NAME = BAY ------MUNI= TORONTO PROV= ON PCD= ------BAY ST 10 E TORONTO M5J2R8 10 E 1000- 1000 TORONTO M5J2S3 20 E TORONTO M5J2N8 20 E 400- 400 TORONTO M5J2W1 20 E 600- 600 TORONTO M5J2W3 20 E 1100- 1100 TORONTO M5J2X9 20 E 2000- 2400 TORONTO M5J2N9 40 E 300- 300 TORONTO M5J2X2 50 E TORONTO M5J2X3 50 E 1100- 1100 TORONTO M5J2X8 141 O TORONTO M5J1J5 161 O 100- 299 TORONTO M5J2S1 161 O 301- 399 TORONTO M5J2S1 161 O 400- 400 TORONTO M5J2S8H HS___

Release 3.4.0 90 User Guide - Open Systems Chapter 5: Callable and Stand-Alone Programs G1C6DSM Sample Program

DP Sample

SW VERSION: [version] CANADIAN CODE-1 PLUS DB VINTAGE: [vintage] G1S6,DP,,,,M5J2R8,,,, DATA POSITION: -ALL- RC= LEVEL= SP STREET NAME = ------MUNI= TORONTO PROV= ON PCD= M5J2R8 ------1 BAY ST 000010 -000010 E

DP___

On z/OS Enter the G1L6 transaction ID from an open CICS session. Positional, comma-delimited parameters are as follows: street, city, province, postal code, and firm name.

 Do not insert any spaces that are not already in the address.

Example: g1l6,hs,lower battery,st john’s,nf,a1a1a1

Notes on Using G1C6DSM in z/OS G1C6LKP will attempt to drill down in accordance to the information you enter. • Available commands include CM, SC, and HS. • The DP command invokes the reverse lookup program, equivalent to the DPC command of the Interactive System.

Release 3.4.0 91 User Guide - Open Systems G1C6DSM Sample Program

Sample Screen Below is sample output from an HS command.

SW VERSION: [version] CANADIAN CODE-1 PLUS DB VINTAGE: [vintage] ------Command: G1L6,HS,LOWER BATTERY,ST JOHN'S,NF,A1A1A DATA POSITION: -ALL- RC= LEVEL= HS

STREET NAME = LOWER BATTERY MUNI= ST JOHN'S PROV= NF PCD= ------LOWER BATTERY RD 1-3 O ST. JOHN'S A1A1A1 2-4 E ST. JOHN'S A1A1A1

G1C6DMI - Sample Program Like G1C6DSM, this is a sample program. It provides sample code to link to C6CICSM or call to C6MATCH. This program is written in COBOL and is available for z/OS CICS environments only. Enter the G1M6 transaction ID from an open CICS session: g1m6,1 lower batter rd,st john’s,nf,a1a1a1 Below is a sample screen for the G1M6 command.

Data Returned from: CANADIAN CODE-1 PLUS [version] DATE: [date] 14:37:21

REQUEST: G1M6,1 LOWER BATTERY RD,ST JOHN'S,NF,A1A1A1

** INPUT FIELDS ** ** RETURNED VALUES ** STREET : 1 LOWER BATTERY RD CTY/PR/PCD: ST JOHN'S NF A1A1A1 GEN RETURN CD: FIRM : OVERALL PROB: 5 CPC REC. TYPE: 11 ** OUTPUT FIELDS ** SOURCE OF ADDR: P CORRECTION RC: C STREET : 1 LOWER BATTERY RD CTY/PR/PCD: ST. JOHN'S NF A1A 1A1 FIRM :

Release 3.4.0 92 User Guide - Open Systems Chapter 5: Callable and Stand-Alone Programs Using Program G1G001 to Customize Reports Using Program G1G001 to Customize Reports

G1G001 is a program that you can use to print customized reports from the Canadian CODE-1 Plus output files. (The Canadian CODE-1 Plus output file becomes the G1G001 input file.) Through parameters, you can define which record elements to print on the report, and you can format those input elements with constant data. G1G001 can print multiple 132-character lines per input record. Additionally, G1G001 enables you to print a main header and a date on your reports, as well as up to three lines of additional header text.

You can 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 code). Another way you can select records using G1G001 is 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. You can also include or exclude a specific number of records or limit the report to a specific number of pages.

Using G1G001 To use G1G001, you must define parameters to perform the following functions: • 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.

 When printing multiple lines for each input record, the order of the parameters is important. Parameters that affect a print line should be grouped together.

Parameters This section describes the parameters required to define the customized reports through G1G001. Chapter 1 of the Canadian CODE-1 Plus Reference Guide contains complete parameter descriptions and layouts. Parameters for G1G001

For this step... Use these parameters...

Defining the input file FILEDF

Defining report headers and footers HEADER, UHDxx, UFTxx

Report layout and content control definitions CONSTANT, FORMAT, MOVE, PAGESZ, TESTIT, UNPK

Record selections SELECT, CHANGE

Report definition options HEADER, UHDxx, UFTxx, PAGESZ

Release 3.4.0 93 User Guide - Open Systems Using Program G1G001 to Customize Reports

File Names Regardless of the environment in which you are running Canadian CODE-1 Plus, the following file assignments are used for executing the G1G001 program. File Names for Executing G1G001

File Name Description

G1GPRM The input parameter file

PRNTRPT The output printer file

G1GNAM The input file

IMS Platform To run G1G001 in an IMS environment, modify the EXG1G001 member in the SAMPLIB library according to your site’s needs.

z/OS Platform To run G1G001 in a z/OS environment, modify the EXG1G001 member in the SAMPLIB library according to your site’s needs.

UNIX Platform To run G1G001 under UNIX, you must complete these steps 1. Edit the /data/samprt.g1prm File The /data/samprt.g1prm file contains parameters that you can edit for your G1G001 job. 2. Source the setup Script The setup script sets all the Canadian CODE-1 Plus environment variables. The setup script is in your product $PBC6P\bin folder. 3. Source the samprt Script The samprt job script assigns file names to all the G1G001 file variables. You will need to modify the paths, file names, and record lengths for your site. The setup script is in your product $PBC6P\bin folder. 4. Execute the rung1g001 Script The rung1g001 script executes the G1G001 batch driver. The rung1g001 script is in your product $PBC6P\bin folder.

Windows Platform To run the G1G001 program in a Windows environment, you must complete the following steps: 1. Edit the SAMGRW.BAT File to Create Your Job Pitney Bowes provides the SAMGRW.BAT file, which calls G1G001, in your bin directory. Copy and modify this file to meet your needs. To edit this file, click on the Edit Canadian CODE-1 Plus Job File icon and specify SAMGRW as the job. 2. Edit the SAMGRW.PRM Parameter File Pitney Bowes provides the SAMGRW.PRM file in your DATA directory. Copy and modify this file to meet your needs. To edit this file, click on the Edit Canadian CODE-1 Plus Parameter File icon and specify SAMGRW.

Release 3.4.0 94 User Guide - Open Systems Chapter 5: Callable and Stand-Alone Programs Using C6DBPRT to Print the Database Contents

3. Run the Job To run your job, click the Run Canadian CODE-1 Plus Job icon. When prompted for the name, enter SAMGRW (or the name under which you saved your job file). When the job finishes running, you are prompted to press a key to continue. The window is not refreshed until you command it to do so, allowing you to read any error messages.

Using C6DBPRT to Print the Database Contents

C6DBPRT is a program that you can use to print the contents of the Canadian Postal Database by postal code. Through parameters, you can define which postal code data to print, and you can specify your own header information for the report.

Parameters To use C6DBPRT, you must define parameters to perform the following functions: • Print header information on your report • Select the postal code data you want printed in the report. Once you have defined your parameters, you must write control language and submit the job.

Parameter Reference The table below shows which parameters are required for each step of a Canadian CODE-1 Plus job using C6DBPRT. Please see Chapter 1 of the Canadian CODE-1 Plus Reference Guide for more information on each parameter. Parameters by Job Step

Job Step Parameter(s) Used

Defining the HEADER, UHDxx, UFTxx Header/Footer

Record Selection SELECT

Sample Control Language This section provides platform-specific information on the control language you need to use to run C6DBPRT. Each platform section lists the file(s) (JCL, BAT, CMD, etc.) in your product directories that you should modify according to your site requirements and any procedures to follow to run C6DBPRT.

File Names Regardless of the environment in which you are running Canadian CODE-1 Plus, the following file assignments are used for executing the C6DBPRT program. File Names Used for Executing C6DBPRT

File Name Description

C6DBPRM The input parameter file.

PRNTRPT The output printer file.

PRNTXLG The output log file.

Release 3.4.0 95 User Guide - Open Systems Using C6DBPRT to Print the Database Contents

IMS Platform To run C6DBPRT in an IMS environment, modify the RUNDBPRT member in the SAMPLIB library according to your site’s needs.

z/OS Platform To run C6DBPRT in a z/OS environment, modify the RUNDBPRT member in the SAMPLIB library according to your site’s needs.

UNIX Platform To run C6DBPRT under Unix, you must complete the following steps: 1. Edit the /data/rundbprt.c6dbprm File The $PBC6P/data/rundbprt.c6dbprm file contains parameters that you can edit for your C6DBPRT job.

2. Source the setup Script The setup script sets all the Canadian CODE-1 Plus environment variables. The setup script is in your product $PBC6P/bin folder. 3. Edit the rundbprt Script The rundbprt script assigns file names and job names to C6DBPRT variables. You can customize the job by modifying the paths and variable names in the script. The rundbprt script is located in the $PBC6P/bin folder. 4. Execute the rundbprt Script The rundbprt script also executes the rundbprt batch driver. The rundbprt script is in your product $PBC6P/bin folder.

Windows Platform To run the C6DBPRT program in a Windows environment, you will perform the following steps: 1. Edit the SMPDBPRT.BAT File Pitney Bowes provides the SMPDBPRT.BAT file, which calls C6DBPRT, in your bin directory. Copy and modify this file to meet your needs. To edit this file, click on the Edit Canadian CODE- 1 Plus Job File icon and specify SMPDBPRT as the job. 2. Edit the SMPDBPRT.PRM File Pitney Bowes provides the SMPDBPRT.PRM file in your data directory. Copy and modify this file to meet your needs. To edit this file, click on the Edit Canadian CODE-1 Plus Parameter File icon and specify SMPDBPRT. 3. Run the Job To run your job, click Run Canadian CODE-1 Plus Job. When prompted for the name, enter SMPDBPRT (or the name under which you saved your job file). When the job finishes running, you will see a screen indicating that the job is complete and asking you if you want to view the results.

Release 3.4.0 96 User Guide - Open Systems Index

A LOOKREQ call area 85 Accessing I interactive system 42 IMS environment Address matching function (interactive processing for C1MATCHx 75 environment) program control blocks (PCBs) for C1MATCHx capabilities 34 75 B IMS JCL for G1G001 (report generator) 94 Browsing database Initializing from CICS application 85 COBOL II Run-Time Environments 78 COBOL II Run-Time Environments using C assembler 78 C1PRPT call area pre-COBOL II Run-Time Environments 78 mapped 81 Interactive system RP-DATE 69 accessing 42 RP-HEADER 69 accessing on different platforms 34 RP-RPUPLO 69 address matching 34, 36 RP-RPZ4ST 69 Command field 35 C6MATCH 71 correcting uncoded records 35, 47 Call areas database inquiry 34-35 defined 50, 73 example work session 42 for C1PRPT 81 function keys 35 maps, defined 50, 73 introduction to 34 Calling Canadian CODE-1 Plus match results 35 in z/OS 71 matching an address 47 CICS (z/OS) online help 36 accessing interactive system 34 querying the database 44 COBOL II Run-Time Environment from Batch initializing 78 L initializing, pre-COBOL II 78 LINUX, using the interactive system 34 initializing, using assembler 78 LOOKREQ call area (for G1CPLKC) Command field defined 85 in interactive system 35 Correcting uncoded records M in interactive system 35, 47 Maps D of call areas 73 Maps, of call areas 50 Database Match results browsing from CICS application 85 in interactive system 35 Database inquiry function (interactive system) Matching a corrected address 47 capabilities 34 Moving to a line in interactive system 35 in interactive system 38 information displayed 34 Define 10 O Postal code 10 Online help F interactive system 36 Field 35 P File names Parameter records for G1G001 (report generator) 94 defined 28 Function keys PCBs (program control blocks), IMS in interactive system 35 for C1MATCHx 75 G point of call data 34 Postal Code 10 G1CPLKC browsing database (from CICS) Parts of 11

Release 3.4.0 97 User Guide - Open Systems Index

Postal code data files What are they? Windows 18 z/OS 24-25 Program Control Blocks, IMS for C1MATCHx 75 Q Querying the database in interactive system 38, 44 R RP-DATE call area field 69 RP-HEADER call area field 69 RP-RPS4ST call area field 69 RP-RPUPLO call area field 69 U UNIX platform getting started on 22-23 Unix/LINUX accessing the interactive system 34 W Windows platform accessing the interactive system 34 getting started on 19-22 Z z/OS environment calling Canadian CODE-1 Plus 71 Getting started on 24 JCL for G1G001 (report generator) 94

Release 3.4.0 98 User Guide - Open Systems