Compile and link procedures

Overview

The compiling and linking procedures are provided as examples and can be adapted according to the machine options. They can be used to compile the exits that you have developed and to link them with the product.

Depending on the session type you have installed, you must use a specific procedure.

Platform Directory MQSeries mode File mode JMS mode

MVS

&RDJEXEC..JCLLIB

CLEXIT

CLEXIT

 

UNIX

$RDJ_EXEC/exit

exitmqs.mak

exitfic.mak

exitjms.mak

Windows

%RDJ_EXEC%\exit

DLL_MQS.sln

DLL_FIC.sln

DLL_JMS.sln


These procedures contain the elements required to compile all exits (C and COBOL).

Two methods are available where scripts are:

  • Either adapted so as to compile only the required modules
  • Or executed as they have been delivered and all modules are recompiled

It is recommended to use the second method.

MVS implementation

The CLEXIT procedure enables you to compile and link to both C and COBOL exits.

Run the procedure

To use the available exits in COBOL and C:

  1. Update the variables :
    • COBLIB: Name of system COBOL compiler library
    • VERLGC: Version of system C compiler (current by default)
    • LKDLIB: Name of system linker library
    • MQC370: Name of system MQSeries compiler library
    • MQLOAD: Name of system MQSeries linker library
  2. Remove the comment marks on the corresponding compilation and printing instructions in the procedure.
  3. Modify the execution library name in the RDJEXP JCL (located in the &RDJEXEC..JCLLIB library) to use the exits during the transformation process.

Example:

//STEPLIB   DD DSN= &RDJEXEC..EXELIB,DISP=SHR
// …...     DD DSN= &RDJHOME..EXELIB,DISP=SHR

Caution   By default, the DLL option is set in both C and COBOL compilation procedures that are called by the CLEXIT procedure. To disable this option, replace the:
  • OLCDLL variable with the NODLL value in the ZCPLGC procedure of the C exits.
  • OCBDLL variable with NODLL value in the ZCPLGC procedure of the COBOL exits.

Results

Exit modules are built in the &RDJEXEC..EXELIB library. Executables are DLLs.

C program COBOL program Executable Comments

EXAEENC ( + EXIDLLH)

 

EXAEENDL

File mode only

EXAEMEC + EXIDLLH)   EXAEMEDL File mode only

EXIEENC ( + PLGDLLH)

EXIEEN

EXIEENDL

 

EXIEMEC ( + PLGDLLH)

EXIEME

EXIEMEDL

 

EXIERGC ( + PLGDLLH)

EXIERG

EXIERGDL

 

EXIRMEC (+ EXIDLLH)

 

EXIRMEDL

File mode only

EXIRSTC (+ EXIDLLH)

EXIRST

EXIRSTDL

File mode only

EXITMQC (+ EXITMQH)

 

EXITMQDL

MQSeries mode only

 

ITR025

ITR025DL

File mode only

ITR501C (+ ITR501)

 

ITR501DL

 

 

ITR501

ITR501DL

 

 

ITR506

ITR506DL

 

 

ITR615

ITR615DL

File mode only

UNIX implementation

Run the procedure

Set the environment variables in the $RDJ_EXEC/script directory:

  • Execute the script: rdjenv
  • If COBOL cobolit execute the script: cobol-it-setup-Axway.sh

Run the makefile in the $RDJ_EXEC/exit directory to:

  • Delete the executable and exit objects: make -f exitxxx.mak clean
  • Compile the exits and build the executable: make -f exitxxx.mak <Target>

Where:

  • xxx is set to:
      • fic to indicate File mode.
      • mqs to indicate MQSeries mode.
      • jms to indicate JMS mode.
  • Target is set to one of the values listed in the table.

The exitfic.mak, exitjms.mak and exitmqs.mak makefiles include targets that call sub-targets for each exit and build the executables.

When you select a target, all exits in C and COBOL language relating to the xxx mode are built. However, the ITR501 external call is built according to the target.

makefile Target External call

exitfic.mak

FIC_C

ITR501 in C

 

FIC_COB

ITR501 in COBOL

 

ORA_C

ITR501 in C
with access to Oracle database

exitmqs.mak

MQS_C

ITR501 in C

 

MQS_COB

ITR501 in COBOL

 

ORA_C

ITR501 in C
with access to Oracle database

exitjms.mak JMS_C ITR501 in C
  JMS_COB ITR501 in COBOL
  JMS_ORAC ITR501 in C with access to Oracle database

Results

Exit modules are built in the $RDJ_EXEC/exit directory. Executables are shared libraries whose suffix suff (sl, so), set in the CONFIG.MACHINE delivered file, depends on the operating system.

Sub-target C program COBOL program Executable Comment

Libexaeen

exaeenc.c ( + exidllh.h)

 

libexaeen.suff

File mode only

Libaxaeme

exaemec.c ( + exidllh.h)

 

libaxaeme.suff

File mode only

Libexieen

exieenc.c ( + plgdllh.h)

EXIEEN.cbl

libexieen.suff

 

Libexieme

exiemec.c ( + plgdllh.h)

EXIEME.cbl

libexieme.suff

 

Libexierg

exiergc.c ( + plgdllh.h)

EXIERG.cbl

libexierg.suff

 

Libexirme

exirmec.c ( + exidllh.h)

 

libexirme.suff

File mode only

Libexirst

exirstc.c ( + exidllh.h)

EXIRST.cbl

libexirst.suff

File mode only

Libexitmq

exitmqc.c ( + exitmqh.h)

 

libexitmq.suff

JMS mode and MQSeries mode only

libitr025*

 

ITR025.cbl

libitr025.suff

File mode only

libitr501Cob

 

ITR501.cbl

libitr501.suff

 

libitr501C

ITR501.c
(ITR501.h)

 

libitr501.suff

 

libitr501OraC

ITR501.c
(ITR501.h)

 

libitr501.suff

 

libitr506

 

ITR506.cbl

libitr506.suff

 

libitr615

 

ITR615.cbl

libitr615.suff

File mode only

Windows implementation

Prerequisites

  • Microsoft Visual Studio 2010
  • Visual Cobol 2.1

You can use either the graphical method or the manual method.

Graphical method

  1. Double-click the DLL_FIC.sln, , DLL_JMS.sln or DLL_MQS.sln file in the %RDJ_EXEC%\exit directory.
    Visual Studio displays the project exit modules.
  2. Check the compilation settings in Solutions Configurations and Solutions Platforms tabs.
  3. Select the module to compile in the list of available modules.
  4. Execute the Build (or Re-Build).

Manual method

Run the corresponding makefile located in the %RDJ_EXEC%exit directory for the File, JMS or MQSeries mode.

Both procedures are common to all uses and do not have to be modified.

You can compile the exit in:

  • Debug mode to test it

msbuild DLL_FIC.sln /p:Configuration=Debug /p:Platform=x64

msbuild DLL_MQS.sln /p:Configuration=Debug /p:Platform=x64

msbuild DLL_JMS.sln /p:Configuration=Debug /p:Platform=x64

  • Normal mode

msbuild DLL_FIC.sln /p:Configuration=Release /p:Platform=x64

msbuild DLL_MQS.sln /p:Configuration=Release /p:Platform=x64

msbuild DLL_JMS.sln /p:Configuration=Release /p:Platform=x64

Results

Exit modules are built in the %RDJ_EXEC%\exit directory. Executables are DLLs.

Exit / External call C program COBOL program Executable Comment

EXAEEN*

exaeenc.c ( + exidllh.h)

 

EXAEEN.dll

File mode only

EXAEME*

exaemec.c ( + exidllh.h)

 

EXAEME.dll

File mode only

EXIEEN

exieenc.c ( + plgdllh.h)

EXIEEN.cbl

EXIEEN.dll

 

EXIEME

exiemec.c ( + plgdllh.h)

EXIEME.cbl

EXIEME.dll

 

EXIERG

exiergc.c ( + plgdllh.h)

EXIERG.cbl

EXIERG.dll

 

EXIRME*

exirmec.c ( + exidllh.h)

 

EXIRME.dll

File mode only

EXIRST*

exirstc.c ( + exidllh.h)

EXIRST.cbl

EXIRST.dll

File mode only

EXITMQ**

exitmqc.c ( + exitmqh.h)

 

EXITMQ.dll

JMS mode or MQSeries mode only

ITR025*

 

ITR025.cbl

ITR025.dll

File mode only

ITR501_C

ITR501.c
(ITR501.h)

 

ITR501.dll

 

ITR501_COB

 

ITR501.cbl

ITR501.dll

 

ITR506

 

ITR506.cbl

ITR506.dll

 

ITR615*

 

ITR615.cbl

ITR615.dll

File mode only

Migrate to a DLL version

Restrictions: This migration is only available for customers with:

  • Latin encoding
  • Previous versions that the ones specified by platform in the following sections

Migration procedure

This procedure applies to all platforms.

COBOL exits

Source names have not changed.

  1. Copy the exit sources from the current to the new environment without changing the names.
  2. Build the exit sources in the new environment.

C exits

The name of sources and functions have changed as indicated in the OS-specific tables.

  1. Copy the content of functions of exit sources from the current environment into the corresponding functions of exit sources in the new environment.
  2. Build the exit sources in the new environment.

Migration  to a DLL version on MVS

Restriction: Rule Engine V1.1.0 and previous

Cross-reference table for C exit sources

Previous New
Exit source in C Exit function in C Exit source in C Exit function in C

EXITC ( + EXITH)

EXAEEN

EXAEENC

EXAEEN_C

EXITC ( + EXITH)

EXAEME

EXAEMEC

EXAEME_C

PLGC ( + PLGH)

EXIEEN

EXIEENC

EXIEEN_C

PLGC ( + PLGH)

EXIEME

EXIEMEC

EXIEME_C

PLGC ( + PLGH)

EXIERG

EXIERGC

EXIERG_C

EXITC ( + EXITH)

EXIRME

EXIRMEC

EXIRME_C

EXITC ( + EXITH)

EXIRST

EXIRSTC

EXIRST_C

Migration  to a DLL version on Windows,  shared libraries on UNIX

Restrictions:

  • Windows : Rule Engine V1.1.0 and previous
  • UNIX : Rule Engine V1.3.0 and previous

Cross-reference table for C exit sources

Previous New
Exit source in C Exit function in C Exit source in C Exit function in C

exitc.c ( + exith.h)

EXAEEN

exaeenc.c

EXAEEN_C

exitc.c ( + exith.h)

EXAEME

exaemec.c

EXAEME_C

plgc.c ( + plgh.h)

EXIEEN

exieenc.c

EXIEEN_C

plgc.c ( + plgh.h)

EXIEME

exiemec.c

EXIEME_C

plgc.c ( + plgh.h)

EXIERG

exiergc.c

EXIERG_C

exitc.c ( + exith.h)

EXIRME

exirmec.c

EXIRME_C

exitc.c ( + exith.h)

EXIRST

exirstc.c

EXIRST_C

Related Links