This document explains how it is possible to invoke type 7 processing logic for record not found conditions (0326), when a KEY FILE is being used in CULPRIT.
Release: All supported releases.
Component: Culprit.
In order to invoke type 7 code when one of the entries in a culprit KEY FILE is not found (error-status 0326) it is necessary to use an ALTERNATE PATH ID.
In the following example, the automatic path is 01 and the alternate path is 02:
IN DB SS=EMPSS01
PATH01 EMPLOYEE(02)
KEYFILE 80 KF=1,4
01510001 EMP-ID-0415
01510010 EMP-FIRST-NAME-0415
01510030 EMP-LAST-NAME-0415
01520001 EMP-ID-0415
01520010 '** EMPLOYEE NOT FOUND **'
017 IF PATH-ID EQ '01' 100
017 IF PATH-ID EQ '02' 200
017 DROP
017100 TAKE 1
017200 TAKE 2
The above source produces output like this:-
2 INPUT RECORDS READ
23 KATHERINE O'HEARN
4,321 ** EMPLOYEE NOT FOUND **