Process Input-Events (EXIERG)

Characteristics

This exit is available in COBOL and C language.

Description

This exit is used to enrich or check the content of Input-Event segments during processing, and immediately prior to a Transformation- or Enrichment-Rule.

This feature is also provided in the ITR506 module (version RDJ 1.5.3.2). For more information, refer to section ITR506 compatibility with EXIEEN, EXIERG, and EXIEME.

Operating principle

The exit is called for each segment to be processed and for each transformation (or change) rule to be applied to the segment.

Specific features

When a segment is checked, the Input-Event that contains the segment may be set to the anomaly state. The subsequent transformation (or change) rule in the phase processes the enriched data in the segment. The enrichment is then lost when applying another rule to the current segment.

When a segment is checked in this exit, the Input-Event may be set to the anomaly state (as it was before  this exit was called) or the session may be closed.

Exchanged Data

Alphanumeric fields may have different descriptions depending on the programing language and the Latin or UTF-16 format used. For more information, refer to Manage exits and external calls.

INPUT data

Name in C Name in COBOL Characteristics / Length Use

szSourceCode

 

Alphanumeric / 25

Processing-Context-In code associated with the session (only data available on initialization)

 

nEntryCode

L10TYPTRT

Numeric / 1

Entry point code

szSegtCode

 

Alphanumeric / 25

 

Name of the type of segment to be processed

szIEventCode

 

Alphanumeric / 25

Name of the Input-Event containing the type of segment to be processed

szIEventVersion

 

Alphanumeric / 25

Reference value that defines the version of the processed Input-Event:

  • Date in the YYYYMMDD format
  • Three-digit number

nIEventVersionType

 

Numeric / 1

Version identification type of the processed Input-Event:

  • 1: Version defined by number
  • 2: Version identified by the date value (above)

szIEventInstCode

 

Alphanumeric / 34

Instance code of the Input-Event that contains the segment to be processed

szCodePhase

 

Alphanumeric / 25

Name of the phase during which the processing is performed

szCodeRegle

L10CDREGL

Alphanumeric / 5

(25 en COBOL ???)

  • Name of the Transformation
  • Enrichment-Rule to be applied to the segment

lDateDebRegle

 

Numeric / 8

Validity start date (YYYYMMDD format) of the rule to be applied

lDateFinRegle

 

Numeric / 8

Validity end date (YYYYMMDD format) of the rule to be applied

nSegmentNumber

 

Numeric / 4

Number of the segment to be processed in the IEvent

nSegtLenght

L10LGCRE

Numeric / 4

Length of the segment to be processed

sSegt

F8CRE

Alphanumeric / 4000 max.

Content of the segment to be processed

 

OUTPUT data

Name in C Name in COBOL Characteristics Use

szErrorLabel

L10ZONERR

Alphanumeric / 50

Description of the anomaly detected

nSegtLenght

L10LGCRE

Numeric / 4

Length of the segment optionally enriched

sSegt

F8CRE

Alphanumeric / 4000 max.

Content of the segment optionally enriched

Return value

L10RETOUR

 

  • 0, zero (PLG_nNOERREUR)
  • 1 (PLG_nANOMALIE), request to set the Input-Event to the anomaly state
  • 9 (PLG_nERREURSYSTEME), if a set system error is detected, in which case the session is closed

Implementation

Description conventions

  Description

1.

You must specify the output data via the function that you have developed at the selected entry point

2.

By default, the return code is zero (OK)
If you change it, it must be set to one of the values shown in the preceding table

3.

The Input-Event has already been assigned an identifier when it is passed to this exit
You cannot modify the identifier values using this exit

However, changes to the content are taken into account during any subsequent transformations

The system keeps the initial values of the identifiers when calling $ENV

4.

If you request that the Input-Event be set to the anomaly state (return code = 1) or there is a program error, you must set the error message field

Parameter settings

This exit can be executed during step T

script.ges file

Keyword Description/ Value to be Defined
>Configuration< Section

 

Turnoff_Exit_Rule

  • No: Do not cancel exit execution
  • Yes: Cancel exit execution

sys.dat file

Keyword Description/ Value to be Defined
Section >Enrich_ Exit <

 

Rule

  • Yes_C: Execute EXIERG
  • Yes_Cobol: Execute EXIERG.cbl
  • No: Do not execute the exit

Module names

Implementation

Platform Directory Name C Program COBOL Program  Equivalent to C Program

Windows

%RDJ_EXEC%\exit

EXIERGC.c

plgdllh.h header file

EXIERG.cbl

UNIX

$RDJ_EXEC/exit

EXIERGC.c

plgdllh.h header file

EXIERG.cbl

MVS

&RDJEXEC..SRCLIB

EXIERGC.c

plgdllh.h header file

EXIERG

 

Processing Type Entry Point Label

Open

PLG_nINIT

TRT-INIT (typtrt = 1)

Close

PLG_nFERM

TRT-FIN (typtrt = 3)

Check and enrich a segment before applying a Rule

PLG_nIDENT_

ENRICHISSEMENT

TRT-CRE (typtrt = 2)

Related Links