Figure 1. Sample Fixed-Length Records - Function Definition
The following describes the parameters used in the preceding definition.
- exit_status
This parameter points to a variable containing one of the following exit status codes:
- 00
- First record. MFX uses this code to indicate the first call to the C exit and that the first record from SORTIN is in the record_up area. If the SORTIN is empty or does not exist, a 08 status will be passed the first time.
- 04
- Most records. This is used for all calls except the first one when there are records in the record_up area. After Code 00 has been issued, Code 04 is passed to the exit until there is no record for the sort to pass to the record_up area.
- 08
- All records passed. This indicates that the last SORTIN record has already been processed by the exit. Do not attempt to reference the record again. No more records will be passed to the exit routine. Note that if the SORTIN data set is empty or does not exist, 08 will be passed every time including the first time.
- record_up
- The record_up parameter contains a pointer to the record being passed to the E15 from the SORTIN. The struct_ru data type represents a structure that describes the fields within the SORTIN record.
- work
- The work parameter contains a pointer to a work area that is to be used to hold an inserted or replaced record returned from the E15. The struct_ins_rep data type represents a structure that describes the fields within the inserted or replaced record.
- dummy1 - dummy5
- These parameters define unused place holders. They are used with variable-length E15 and E35 communication. Their definition here allows a common parameter list for fixed-length and variable-length C E15 and E35 exits.
- comm_len
- This parameter points to a variable that defines the communication area length.
- communication_area
- The communication_area parameter contains a pointer to the communication area. The struct_ca data type represents a structure that describes the fields in the communication area.