Sending output to a print spool

Sending output to a print spool

Post by Dunn Tire MIS Dept » Sat, 10 Apr 1999 04:00:00



I am currently using SCO Unix 5.0.4 and developing software with Microfocus
Cobol. All of my files reference the environment variables as shown below:

Source Code (Printer output)

SELECT PRNT ASSIGN TO PRNTDEV
ORGANIZATION SEQUENTIAL
ACCESS SEQUENTIAL
STATUS PRNT-STAT.

Shell variable assigned

PRNTDEV=/dev/lp0;export PRNTDEV

In the program, I write each line to the printer.

Ex: WRITE PRNT-REC FROM REPORT-LN1 AFTER 1 LINE.

I would like to change the shell variable in order to print to the spooler
(lp) as apposed to my current method of sending data directly to the device.

Could anyone shine some light on a way to do this. I have tried PRINTDEV=lp
along with trying to pipe the output into the spooler but I haven't had any
success.

Thanks.

 
 
 

Sending output to a print spool

Post by Kurt J. Lanz » Sat, 10 Apr 1999 04:00:00



Quote:

> I am currently using SCO Unix 5.0.4 and developing software with Microfocus
> Cobol. All of my files reference the environment variables as shown below:

> Source Code (Printer output)

> SELECT PRNT ASSIGN TO PRNTDEV
> ORGANIZATION SEQUENTIAL
> ACCESS SEQUENTIAL
> STATUS PRNT-STAT.

> Shell variable assigned

> PRNTDEV=/dev/lp0;export PRNTDEV

> In the program, I write each line to the printer.

> Ex: WRITE PRNT-REC FROM REPORT-LN1 AFTER 1 LINE.

> I would like to change the shell variable in order to print to the spooler
> (lp) as apposed to my current method of sending data directly to the device.

> Could anyone shine some light on a way to do this. I have tried PRINTDEV=lp
> along with trying to pipe the output into the spooler but I haven't had any
> success.

Program your COBOL to write to a file. Wrap it in a shell script which
lp's the file (and deletes it) when your program is finished. Or are
you only allowed to use one language?

 
 
 

1. Print spool files filling /var/spool/printer

Solaris 2.6

I have started getting complaints from users that old documents are
being printer from one of our network printers.

Looking at the /var/print/spool directory I see that there are 100's of
spool files. The 10th file , date wise, is .printd.lock
doing a ps -ef also shows a printd process running
also there are about 20 lpr processes

I have no idea whats going on. Is it possible that this printd process
was interfeering with the spool directory ?
What does printd do ?

how can I investigate why spool files for this one particular printer
are filling up the spool directory ?

any suggestions would be appreciated and yes I am in RTFM mode.........

Thanks,
Mike.

2. Zip drive setup

3. printing to (I'm sorry) NT print spool

4. Solaris x86 security settings

5. Cannot Print to /var/spool/print??

6. Optimal setup of swap space on 2-drive system

7. printing from windows to a linux print spool

8. Drive Image?

9. where does cron spool the output???

10. wanted: output spooling system

11. cannot create /var/spool/output/lpd/.seq

12. How do you spool output from terminal into file?

13. lpd cannot send to remote spool