Appendix B - Application Integration
A
ppendix B describes the various options and what is involved with integrating LP Plus with your system. After setting up your printers and getting LP Plus to perform to your satisfaction, you will then want to send your applications reports to the LP Plus queue system and perhaps give your users access to the Status and Control menu (dccstat). Appendix B addresses integration issues including:Running UNIX and LP Plus together.
Having LP Plus replace (link itself to) UNIX lp.
Application access to the Status and Control menu.
After printers are added and tested, the next step is usually to integrate the new printing system with applications. The two aspects of this are getting print reports to spool into LP Plus instead of UNIX lp, and potentially giving users access to "dccstat" in order to let them manage their own printing. There are two basic methods of doing this:
Running LP Plus and UNIX lp Together
The existing UNIX lp system and LP Plus can coexist. An example of this would be if there is a total of 12 printers, using LP Plus to print to 4 printers and the existing lp system for the others. When LP Plus is first installed it is a separate printing system. The only time lp and LP Plus conflict is if two printers are printed to simultaneously. The method of segregating where the print jobs go is by sending LP Plus print jobs to "dcclp" and UNIX lp print jobs to lp, lpr, or enq.
Printer Program to Run
system1 | dcclp -d system1
laser7 | dcclp -d laser7
printer2 | lp -d printer2
If the applications currently print to "lp" and the printers have the same virtual name in LP Plus as they do in UNIX lp, then it is likely that adding a "dcc" prefix to the existing lp command will work.
An issue when running dcclp from an application is the environment variables "LPHOME" and the "PATH". These must be set correctly in order for LP Plus to function properly. Some applications do not pass the users environment when an external program is executed or the current "PATH" of the user may be changed. Make sure these variables are set or your application may not find the dcclp command. An example of these follows.
LPHOME=/usr/lpplus;export LPHOME
PATH=$PATH:/usr/lpplus/bin;export PATH
If you do not know how to set up printers in your application software, consult your applications administration guide or your software provider.
Note: If it is necessary to install some printer devices on LP Plus and leave others on lp, call technical support.
Having LP Plus Replace (link itself to) UNIX lp
If you cannot change (or do not want to) the command that your application software prints to and it is printing to "lp -d printer_name", then linking LP Plus to lp is the method of integration.
After you have installed, configured, and tested LP Plus, you have the option to have it replace (link) itself with the lp system. This is only an option if the lp command (or lp front end for AIX users) is currently in use. If, for example, you are running IBM AIX and are using enq or lpr as a front end this does not apply. Linking makes LP Plus transparent to any existing programs that call the UNIX lp command.
The script "$LPHOME/bin/dcclplink" copies the existing UNIX lp, lpstat, and lpadmin commands and adds an ".lpp" extension to them. It then links the above commands to the LP Plus supplied commands "$LPHOME/bin/dcclp, lpstat, and lpadmin". The script "$LPHOME/bin/dcclpunlink" unlinks LP Plus from lp and therefore enables the UNIX lp system.
You may want to look at these shell scripts before running them to see how they perform the link and unlink.
Application Access to the Status and Control Menu
One of the many reasons for using LP Plus is to give users the power and flexibility to control their own printing. This allows the users to manage the print queues and relieves the system administrator from always having to solve problems and manage the queues for the users. By setting up an application menu item such as "Print Management", you can give your users access to LP Plus and use your applications menu security for access to the program.
The only issue when running the LP Plus Status and Control menu (dccstat) from an application menu are the environment variables "LPHOME" and the "PATH". These must be set correctly in order for LP Plus to function properly. Some applications do not pass the users environment when an external program is executed or the current "PATH" of the user may be changed.
If this is the case, you can make a shell script that sets these variables, runs dccstat, and then returns the user to the application menu when they quit dccstat. An example of such a script follows.
LPHOME=/usr/lpplus;export LPHOME
PATH=$PATH:/usr/lpplus/bin;export PATH
dccstat
exit.