gnucobol-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [open-cobol-list] ASSIGN TO PRINTER.


From: Vince Coen
Subject: Re: [open-cobol-list] ASSIGN TO PRINTER.
Date: Mon, 29 Mar 2010 15:39:31 +0000
User-agent: KMail/1.12.4 (Linux/2.6.31.12-desktop-3mnb; KDE/4.3.5; i686; ; )

On Monday 29 Mar 2010, John Culleton wrote:
> If a line sequential file is assigned to PRINTER how is the output actually
> assigned to lpr or lp or whatever the printer spooler on the system is
> called? One can always do a system call at the end of the program to send
> the document named PRINTER to the print spooler but it seems to me there
> should be a more direct and COBOLish way to do it. The very excellent
> "OpenCOBOL 1.1 Programmer's Guide" does not address this problem.
> 

I create a temp and named LS file after closure I then issue:

           call     "SYSTEM" using Print-Report.



having defined:

       77  Print-Report        pic x(95) value
           "lpr -r -o 'orientation-requested=4 page-left=18 " &
           "page-right=18 sides=two-sided-long-edge' prt-1".


Even if OC worked similar to MF you still have to spool the print job.
This way it should work across compilers as most have a system call procedure.

Vince




reply via email to

[Prev in Thread] Current Thread [Next in Thread]