How it Works - Code-1_Plus - 5.0

CODE-1 Plus Guide for IBM i

Product type
Product family
Data Quality - Postals
CODE-1 Plus
Product name
CODE-1 Plus
CODE-1 Plus Guide for IBM i
First publish date

When you enter the UR command, the user exit program G1CPBNC is invoked and the functionality supplied by the UR command is contained within this program. The same situation applies to the UW command. You must customize the G1CPBNC to suit the need of your specific environment. A sample user exit program that you can customize is supplied as part of the product.

In addition to the input and output addresses, the complete Command field containing the UR or UW command is passed to the user exit so that additional command parameters can be required as part of the UR or UW commands (for example, record number of the address being corrected). You can specify several screen presentation options to control how the screen appears upon command completion. These screen presentation options control:

  • Message that appears

  • Clearing of the Command field to blanks

  • Sounding of an audible alarm

  • Clearing of the address area to blanks

  • Cursor position upon the completion of the UR and UW commands

A sample program, G1CPBNC, is supplied with the CODE-1 Plus software. The program is written to read the supplied IVPFILE and write the coded records to a user-defined output file. Your input file may have different attributes (for example, record length or address element location) and will need to be modified accordingly.

In the following section, the required functionality for both the UR and UW commands is described, the calling interface for G1CPBNC is explained, and excerpts from the sample G1CPBNC program are shown. The UR and UW commands are enabled simply by making G1CPBNC available in the runtime environment.

Note: iThe remaining sections in this chapter are intended for programmers writing the G1CPBNC user-exit program.