Compile and install your user-exit program

To compile and install your user-exit program, follow these steps:
Note: You must have root authority to use the make command in this directory.
  1. If you already have an existing executable user-exit program in the /usr/lpp/psf/bin directory for the user-exit program you are adding, do these steps first; otherwise, go to step 2.
    1. Disable all the logical destinations associated with the queues that are to receive jobs that will use the new user-exit program.
    2. Delete the executable user-exit program from the /usr/lpp/psf/bin directory.
  2. To make the directory in which the user-programs are stored the current directory, enter:
    cd /usr/lpp/psf/exits
  3. On the command line, enter:
    make
    The make command reads the Makefile file supplied with InfoPrint Manager, compiles and generates the user-exit program.
  4. On the command line, enter:
    make install
    The make install command copies the executable user-exit program from the /usr/lpp/psf/exits directory into the /usr/lpp/psf/bin directory so that the code executes with InfoPrint Manager.
  5. Enable all of the logical destinations that you disabled.
    Note:
  1. If you do not want to copy the executable user-exit program into the /usr/lpp/psf/bin directory, you can copy them into another directory. However, if you do this, you need to add the path to the PATH statement in the /etc/environment file so that InfoPrint Manager can locate the module.
  2. You can only specify one user-exit program for each function name provided by InfoPrint Manager per queue.
  3. Make sure the function name of the user-exit is one of the following where the name is in uppercase letters, because that is the entry point in the module:
    • ACCOUNTING
    • AUDIT
    • JOBCOMPLETION
    • HEADER
    • SEPARATOR
    • TRAILER
    • INDATA
    • OUTDATA
  4. If you do not want to use the same name for the user-exit program, you must edit the Makefile file and change the name of the user-exit program supplied with InfoPrint Manager to the new name. For example, to call your new header user-exit program header, you must edit the Makefile file and change the name of the existing header user-exit program, ainuxhdr to header. In addition, you must change the source code file name from ainuxhdr.c to header.c. You can also add new exit targets in the Makefile file.
  5. You must mark the function as an exported symbol during the link-editing step. See the InfoPrint Manager supplied /usr/lpp/psf/exits/Makefile for more information.