z/OS DFSORT Application Programming Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


EFS02 user exit routine

z/OS DFSORT Application Programming Guide
SC23-6878-00

Including or omitting records based on user-defined data types with the EFS02 user exit routine requires using the function of altering control statements. EFS program requirements at Major Calls 1 and 2 are:
  • At Major Call 1, the EFS program must provide the control statement request list with the INCLUDE or OMIT operation definer. See Control statement request list for further details.
  • At Major Call 2, the EFS program must return a new format, D2, on the INCLUDE or OMIT control statement that informs DFSORT to call the EFS02 routine (the fields defined with the D2 format are also known as EFS compare fields). See EFS formats for SORT, MERGE, INCLUDE, and OMIT control statements for further details. The EFS program must also return the final length and, in place of the position value, must send an identifier (known as a correlator identifier) that identifies a specific relational condition. For each relational condition containing EFS fields, there must be a unique correlator identifier to identify the particular relational condition. See EFS formats for SORT, MERGE, INCLUDE, and OMIT control statements for further details.

At Major Call 3, the EFS program must return the address of the EFS02 routine to DFSORT.

The EFS02 routine is called to perform the INCLUDE or OMIT comparison logic for each relational condition containing an EFS field. During the input phase, DFSORT will call the EFS02 exit routine one or more times for each input record according to the evaluation defined by the AND, OR, or parentheses. The EFS02 exit routine must use the correlator identifier to determine the current relational condition being performed. EFS02 must perform the comparison logic for the current relational condition as identified by the correlator identifier. Figure 1 repeats Table 1 to illustrate an example of the calling sequences to an EFS02 by DFSORT.

Figure 1. Calling Sequence to EFS02 by DFSORT

Original INCLUDE control statement sent to EFSPGM

INCLUDE COND=(15,4,FF,EQ,20,4,FF,AND,40,7,FF,NE,50,7,FF,OR, 30,2,FF,NE,35,2,FF)

Altered INCLUDE control statement returned by EFSPGM

INCLUDE COND=(1,4,D2,EQ,1,4,D2,AND,2,7,D2,NE,2,7,D2,OR, 3,2,D2,NE,3,2,D2)

Where: the calling sequence to EFS02 may be summarized with the following tables: The calling sequence to EFS02 summarized with tables

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014