Calling CODE-1 Plus on z/OS - Code-1_Plus - 5.0

CODE-1 Plus Reference for all Platforms

Product type
Software
Portfolio
Verify
Product family
Data Quality - Postals
Product
CODE-1 Plus
Version
5.0
Language
English
Product name
CODE-1 Plus
Title
CODE-1 Plus Reference for all Platforms
Copyright
2024
First publish date
1998
ft:lastEdition
2024-05-15
ft:lastPublication
2024-05-15T00:07:55.920704

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

If you are using non LE-programming languages, the Language Environment (LE) runtime environment must be initialized prior to the first call to 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 following sections explain how to initialize the runtime environment from programs written in other languages using COBxSTUB and COBxINI.

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

Note: iWhen you call 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 C1MATCHx. C1MATCHx 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 CODE-1 Plus is a batch program, you can use the appropriate COBxSTUB program, which is shipped with CODE-1 Plus, to initialize the runtime environment. Use COBMSTUB for initializing the LE (z/OS) Runtime.

This method is easier to use than the COBxINI method described later. Using the COBxSTUB method, the name of the user-written program is passed 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 CODE-1 Plus matcher.

Sample z/OS JCL

 
 
//yourjobcard
//yourstep EXEC PGM=COBxSTUB,PARM='your_program_name',REGION=0M
//STEPLIB  DD DSN=yourhlq.CODE1P.LOADLIB,DISP=SHR
//         DD DSN=yourRTlib,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSOUT   DD SYSOUT=*
//**********************************************************************
//* CODE-1 Plus DATABASE FILE DEFINITIONS
//**********************************************************************
//CITYDB   DD DSN=yourhlq.CODE1P.CITYDB,DISP=SHR
//COUNTY   DD DSN=yourhlq.CODE1P.COUNTY,DISP=SHR
//DTLDB    DD DSN=yourhlq.CODE1P.DTLDB,DISP=SHR
//G1C1AUX  DD DSN=yourhlq.CODE1P.G1C1AUX,DISP=SHR
//LCLDB    DD DSN=yourhlq.CODE1P.LCLDB,DISP=SHR
//LTMASTR  DD DSN=yourhlq.CODE1P.LOTDB,DISP=SHR
//ZIPIDX   DD DSN=yourhlq.CODE1P.ZIPIDX,DISP=SHR
//*****************************************************************
//* DPV FILES
//*****************************************************************
//DPVDB    DD DSN=yourhlq.GROUP1.DPVE,DISP=OLD   for Flat DPV DB
//DPVHDB   DD DSN=yourhlq.GROUP1.DPVHE,DISP=OLD  for Full DPV DB
//DPVSDE   DD DSN=yourhlq.GROUP1.DPVSE,DISP=OLD  for Split DPV DB
//
*****************************************************************
//* GROUP 1 LICENSE FILE
//*****************************************************************
//G1LICEN  DD DSN=yourhlq.GROUP1.G1LICEN,DISP=OLD
//*****************************************************************
//* STATISTICAL FILE
//*****************************************************************
//G1STAT   DD   DSN=yourhlq.CODE1P.G1STAT,DISP=(,CATLG,DELETE),
//         UNIT=SYSDA,
//         DCB=(RECFM=U,RECL=1024,BLKSIZE=8192),
//         SPACE=(CYL,(1,1))
//*****************************************************************
//* INPUT, OUTPUT, AND PRINT REPORT DEFINITIONS
//*****************************************************************
//C1BMNAM  DD DSN=yourhlq.CODE1P.IVP.NAMEADDR,DISP=SHR
//C1BMCOK  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)
//*****************************************************************//* CODE-1 Plus IVP FILE PARAMETER RECORDS//*****************************************************************//C1BMPRM  DD DSN=yourhlq.CODE1P.PARFILE,DISP=SHR/*//

 

Using COBxINI

This section provides information 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:

    Note: iReplace the x in the examples below with M for z/OS.
    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 C1MATCHx or C1ANZADR:

    CALL 'COBxINI' USING COBx-RETURN-CODE.IF COBxINI-OK  NEXT SENTENCEELSEIF 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 or sublibrary that contains the COBxINI object. If you use another language other than COBOL, you can apply the same techniques described above by converting the COBOL language syntax into the syntax of the programming language that you use.