When writing a custom file handler you must ensure that it:
- conforms to the standard
Micro Focus Call Handler interface. See the section
Calling the File Handler for more information.
Additionally, once a custom file handler has determined whether or not it will perform the I/O operations for a file, it must set the RETURN-CODE to 1 (to indicate that it will perform the file's I/O operations) or to 0 (to indicate that it will not).
If a custom file handler sets RETURN-CODE to 0, the next specified custom file handler is tried. If no other custom file handler has been specified, the file's I/O operations are processed by the File Handler.
- is compiled with CALLFH(EXTFH), CALLFH(MFFH) or CALLFH(FHREDIR). See
The CALLFH Directive for more information.
- does not call the
Micro Focus File Handler (in order to avoid problems with recursion).
Note: For concatenated files, custom file handlers that use DYNREDIR are called for each part of the concatenated file. In such cases, the custom file handler is called using the original unmapped name. A file handler that uses DYNREDIR must handle the opening and closing of each individual file that creates the concatenated file.
The final CLOSE operation is called with the initial file handle that was returned by the first OPEN operation.