Sample MFT on IBM i user exits

Managed File Transfer provides sample user exits specific to IBM i with your installation. The samples are in the directories MQMFT_install_dir/samples/ioexit-IBMi and MQMFT_install_dir/samples/userexit-IBMi.

    com.ibm.wmqfte.exit.io.ibmi.qdls.FTEQDLSExit
    The com.ibm.wmqfte.exit.io.ibmi.qdls.FTEQDLSExit sample user exit transfers files in the QDLS file system on IBM i. After the exit is installed, any transfers to files that begin with /QDLS automatically use the exit.

    To install this exit, complete the following steps:

    1. Copy the com.ibm.wmqfte.samples.ibmi.ioexits.jar file from the WMQFTE_install_dir/samples/ioexit-IBMi directory to the agent's exits directory.
    2. Add com.ibm.wmqfte.exit.io.ibmi.qdls.FTEQDLSExit to the IOExitClasses property.
    3. Restart the agent.

    com.ibm.wmqfte.exit.user.ibmi.FileMemberMonitorExit
    The com.ibm.wmqfte.exit.user.ibmi.FileMemberMonitorExit sample user exit behaves like an MFT file monitor and automatically transfers physical file members from an IBM i library.

    To run this exit, specify a value for the "library.qsys.monitor" metadata field (using the -md parameter, for example). This parameter takes an IFS-style path to a file member and can contain file and member wildcards. For example, /QSYS.LIB/FOO.LIB/BAR.FILE/*.MBR, /QSYS.LIB/FOO.LIB/*.FILE/BAR.MBR, /QSYS.LIB/FOO.LIB/*.FILE/*.MBR.

    This sample exit also has an optional metadata field "naming.scheme.qsys.monitor", which we can use to determine the naming scheme that is used during the transfer. By default, this field is set to "unix,", which causes the destination file to be called FOO.MBR. We can also specify the value "ibmi" to use the IBM i FTP FILE.MEMBER scheme, for example, /QSYS.LIB/FOO.LIB/BAR.FILE/BAZ.MBR is transferred as BAR.BAZ.

    To install this exit, complete the following steps:
    1. Copy the com.ibm.wmqfte.samples.ibmi.userexits.jar file from the WMQFTE_install_dir/samples/userexit-IBMi directory to the agent's exits directory.
    2. Add com.ibm.wmqfte.exit.user.ibmi.FileMemberMonitorExit to the sourceTransferStartExitClasses property in the agent.properties file.
    3. Restart the agent.

    com.ibm.wmqfte.exit.user.ibmi.EmptyFileDeleteExit
    The com.ibm.wmqfte.exit.user.ibmi.EmptyFileDeleteExit sample user exit deletes an empty file object when the source file member is deleted as part of the transfer. Because IBM i file objects can potentially hold many members, file objects are treated like directories by MFT. Therefore, we cannot perform a move operation on a file object using MFT; move operations are supported at the member level only. Consequently, when you perform a move operation on a member, the now empty file is left behind. Use this sample exit if we want to delete these empty files as part of the transfer request.

    If you specify "true" for the "empty.file.delete" metadata and transfer an FTEFileMember, the sample exit deletes the parent file if the file is empty.

    To install this exit, complete the following steps:
    1. Copy the com.ibm.wmqfte.samples.ibmi.userexits.jar file from WMQFTE_install_dir/samples/userexit-IBMi to the agent's exits directory.
    2. Add com.ibm.wmqfte.exit.user.ibmi.EmptyFileDeleteExit to the sourceTransferStartExitClasses property in the agent.properties file.
    3. Restart the agent.

Parent topic: Customizing MFT with user exits


Related reference


Related information