If You are Not Using COBOL II... - GeoTAX_Premium - 7 - 7.7

GeoTAX Premium for Windows, UNIX/Linux, and z/OS

Product type
Software
Portfolio
Verify
Product family
Geo Addressing
Product
GeoTAX Premium
Version
7.7
Language
English
Product name
GeoTAX Premium
Title
GeoTAX Premium for Windows, UNIX/Linux, and z/OS
Copyright
2023
First publish date
1998
ft:lastEdition
2023-10-19
ft:lastPublication
2023-10-19T16:49:54.924301

If you are using a programming language other than COBOL II to call GeoTAX, you must first initialize the COBOL II runtime environment using the COBMSTUB or COBMINI program. The following sections describe these methods.

Using COBMSTUB to Initialize the COBOL II Runtime Environment

If the non-COBOL II user-written program that calls GeoTAX is a batch program, you can use COBMSTUB to initialize the runtime environment. COBMSTUB is a stub program that ships with GeoTAX. With this method, the name of the user-written program is passed as a parameter, through JCL or other means, to COBMSTUB. COBMSTUB becomes the top program in the calling stack and causes the COBOL II run-time environment to initialize before the user-written program executes. We recommend that the user-written program perform a dynamic call to the GeoTAX callable.

Note: Sample JCL is provided in the sample library on your installation media.

Using COBMINI to Initialize the COBOL II Runtime Environment

If you are using an older version of COBOL (pre-COBOL II), complete the following to initialize the COBOL II runtime libraries.

  1. Add the following to the WORKING_STORAGE SECTION:

    10 COBM-RETURN-CODE PIC S9 (9) COMP VALUE ZERO
    88 COBMINI-OK VALUE ZERO
    88 COBMTRM-OK VALUE ZERO
  2. Add the following to the PROCEDURE DIVISION to execute once before the first call to a GeoTAX callable:

    CALL ‘COBMINI’ USING COBM-RETURN-CODE.
    IF NOT COBMINI-OK
    (handle error condition and abend)
  3. After the last call, you can optionally add the following:

    CALL ‘COBMTRM’ USING COBM-RETURN-CODE.
    IF NOT COBMTRM-OK
    (handle error condition and abend)
  4. Compile the COBOL and link with the COBOL static link library.

If you use a language other than COBOL, you can apply the same techniques as described above, but you must convert the COBOL language syntax into your programming language’s syntax.

Using Assembler to Initialize the COBOL II Runtime Libraries

If you are using Assembler, complete the following to initialize the COBOL II runtime libraries.

  1. Add the following constants:

    COBMINIT DC F’0’ COBMINI RETURN CODE INITIALIZE
    COBMTERM DC F’0’ COBMINI RETURN CODE TERMINATE
  2. Add the following to execute once before the first call to a GeoTAX callable:

    CALL COBMINI, (COBMINIT) COBOL II INITIALIZATION
    L 15,COBMINIT
    C 15,=F’4’ CHECK RETURN CODE
    BNH INITOK
    .
    .
    .
    (handle bad return code from COBOL II initialization)
  3. After the last call, you can optionally add the following:

    CALL COBMINI, (COBMTERM) COBOL II TERMINATION
    L 15,COBMTERM
    LTR15, 15 CHECK RETURN CODE
    BZ TERMOK
    C 15,=F’16’ CHECK RETURN CODE
    BE TERMOK
    (handle bad return code from COBOL II termination)
  4. Assemble the program and link with the COBOL II static link library from the distribution media.