2.37 CUSEREXIT

Valid for

Extract, Replicat

Description

Use CUSEREXIT to call custom C routines at different points during processing. If your user exit is written in COBOL, see "COBOLUSEREXIT" for information on the COBOLUSEREXIT parameter.

If CUSEREXIT is specified in the parameter file, but a user exit is not bound to the Extract or Replicat object, the process will abend.

The paramfile syntax change for native mode Extract/Replicat is

CUSEREXIT <DLL filename> [, DEBUG | VERBOSE]

Syntax

Build a C userexit as a DLL:

#frame
#push _options
#set _options -l rld -l cre -l crtl -unres_symbols warn
#set _options [_options] -export_all -b semi_globalized
<linker> -ul -o <DLL filename> <linkable C userexit> [_options]
<linker>-change floattype tandem_float <DLL filename>
#unframe

In native mode the userexit code can be a DLL

When using a DLL there is no need to link the userexit into Extract or Replicat.

The DLL gets dynamically loaded when the parameter is seen.

Example

Cuserexit [<DLL filename>] [,DEBUG] [,VERBOSE]
<DLL filename>  -- Native mode Userexit DLL
[,DEBUG]        -- sets dlopen() mode flag to RTLD_VERBOSE(8)
[,VERBOSE]      -- sets dlopen() mode flag to RTLD_VERBOSE(8)