# SCO Unix run interactive script when sending a print job

I'm working with (read, "around") a proprietary ERP system on top of SCO Unix. It has several "query at print time" reports where you can assign a printer to send your job to.

You usually input something like "%lp5", which spools your job to printer lp5.

If I want to create a pseudo-printer that will interact with the user and then return control to the ERP how would I go about it? I have manipulated the LP interfaces scripts in the vein of this article, to include dynamic data into the reports and flow control to a print server. But now I want to do actual interaction with the user to connect print jobs with a separate HylaFax server that I've built, so I need a way of triggering a shell script and asking the user for fax coversheet information.

Our system has a built in fax system using VsiFax (which I'm trying to subvert), but I don't see how it is performing the same function I'm trying to do. You usually send your job to the VsiFax system by printing to "@fax" which I don't know if it's a hardcoded printer on the ERP side or if there is some Unix convention that is being used to call a shell script.

I guess what I'm looking for is a resource or some help on what the SCO Unix printer assignment conventions might be related to syntax of printer names (what does "@" and "%" mean and are there other special characters, and how I could call a shell script when sending that print job?

-
After reading I still cannot figure out the question you are asking. Are you looking for "SCO Unix printing conventions"? –  phunehehe Nov 12 '10 at 16:45
What the @ or % mean in my example of printing to an assigned printer on Unix, would be a place to start I suppose. I edited my wording of the phrase you mentioned. –  jjclarkson Nov 12 '10 at 21:23

So far as I know (as a regular user of SCO Unix) the "@" and "%" prefixes have no meaning in SCO Unix and are probably something used by the ERP system. You can list printers using the command lpstat -pDl. If, as I suspect, you see lp5 and not %lp5 that would confirm that the prefix is something used by the application.
If the application invokes lp or lpr - you could probably replace those with a suitable shell script.