Compile and install your user-exit program
Note: You must have root authority to use the make command in this directory.
- 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.
- Disable all the logical destinations associated with the queues that are to receive jobs that will use the new user-exit program.
- Delete the executable user-exit program from the /usr/lpp/psf/bin directory.
- To make the directory in which the user-programs are stored the current directory,
enter:
cd /usr/lpp/psf/exits
- On the command line, enter:
make
The make command reads the Makefile file supplied with InfoPrint Manager, compiles and generates the user-exit program. - 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. - Enable all of the logical destinations that you disabled.
- Note:
- 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.
- You can only specify one user-exit program for each function name provided by InfoPrint Manager per queue.
- 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
- 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.
- 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.