Use MFT transfer I/O user exits
We can use Managed File Transfer transfer I/O user exits to configure custom code to perform the underlying file system I/O work for Managed File Transfer transfers.
Usually for MFT transfers, an agent selects from one of the built-in I/O providers to interact with the appropriate file systems for the transfer. Built-in I/O providers support the following types of file system:- Regular UNIX-type and Windows-type file systems
- z/OS sequential and partitioned data sets (on z/OS only)
- IBM i native save files (on IBM i only)
- IBM MQ queues
- Remote FTP and SFTP protocol servers (for protocol bridge agents only)
- Remote Connect:Direct nodes (for Connect:Direct bridge agents only)
For file systems that are not supported, or where you require custom I/O behavior, we can write a transfer I/O user exit.
Transfer I/O user exits use the existing infrastructure for user exits. However, these transfer I/O user exits differ from other user exits because their function is accessed multiple times throughout the transfer for each file.
Use the agent property IOExitClasses (in the agent.properties file) to specify which I/O exit classes to load. Separate each exit class with a comma, for example:IOExitClasses=testExits.TestExit1,testExits.testExit2The Java interfaces for the transfer I/O user exits are as follows:
- IOExit
- The main entry point used to determine if the I/O exit is used. This instance is responsible for
making IOExitPath instances.
You need specify only the IOExit I/O exit interface for the agent property IOExitClasses.
- IOExitPath
- Represents an abstract interface; for example, a data container or wildcard representing a set of data containers. We cannot create a class instance that implements this interface. The interface allows the path to be examined and derived paths to be listed. The IOExitResourcePath and IOExitWildcardPath interfaces extend IOExitPath.
- IOExitChannel
- Enables data to be read from or written to an IOExitPath resource.
- IOExitRecordChannel
- Extends the IOExitChannel interface for record-oriented IOExitPath resources, which enables data to be read from or written to an IOExitPath resource in multiples of records.
- IOExitLock
- Represents a lock on an IOExitPath resource for shared or exclusive access.
- IOExitRecordResourcePath
- Extends the IOExitResourcePath interface to represent a data container for a record-oriented file; for example, a z/OS data set. We can use the interface to locate data and to create IOExitRecordChannel instances for read or write operations.
- IOExitResourcePath
- Extends the IOExitPath interface to represent a data container; for example, a file or directory. We can use the interface to locate data. If the interface represents a directory, you can use the listPaths method to return a list of paths.
- IOExitWildcardPath
- Extends the IOExitPath interface to represent a path that denotes a wildcard. We can use this interface to match multiple IOExitResourcePaths.
- IOExitProperties
- Specifies properties that determine how Managed File Transfer handles IOExitPath for certain aspects of I/O. For example, whether to use intermediate files or whether to reread a resource from the beginning if a transfer is restarted.
Parent topic: Customizing MFT with user exits
Related concepts
Related information
- IOExit.java interface
- IOExitChannel.java interface
- IOExitLock.java interface
- IOExitPath.java interface
- IOExitProperties.java interface
- IOExitRecordChannel.java interface
- IOExitRecordResourcePath.java interface
- IOExitResourcePath.java interface
- IOExitWildcardPath.java interface
- The MFTagent.properties file