Writing User Exits
The user exit API functions allow you to write custom programs to use with IBM® Connect:Direct®. The user exit programs are used by IBM Connect:Direct to invoke user-specific logic at strategic points within IBM Connect:Direct execution. User exit programs must be C or C++ language programs and cannot be shell scripts. The PMGR invokes the Statistics user exit program when you start IBM Connect:Direct and the exit runs as long as IBM Connect:Direct runs. The SMGR invokes the File Open and Security user exits for each session and stops them when the particular session terminates.
The user exit programs are described in the following:
|File Open Exit||
IBM Connect:Direct sends a message to this user exit program to open the source or destination file during processing of the copy statement. The File Open Exit opens the source file and identifies the file descriptor. This exit can perform any sort of processing to file names or directory names. It can also redirect the open request to other files as needed.
The File Open Exit program (named “exit_skeleton” in this example) must be owned by root and the setuid bit must be set. Use the following commands:
% chown root exit_skeleton
% chmod u+s exit_skeleton
The Security Exit enables you to implement your own security system or provide access to a third-party security system.
The Statistics Exit is a notification to the user exit program after any record is written to the statistics file. Whenever a statistics record is written to the statistics file, an exact copy is passed to this exit.