LegacyJ CICS and COBOL technology for the J2EE Enterprise Environment

Products     Services     Support     Sales     News     Partners

  

Academic
Programs

Customer
Information

News &
Information

Technical
Information

White
Papers

About Us

LegacyJ FAQ

What methods can be used to Print from an application compiled with PERCobol on NT?

Windows NT direct printing:

There are three known printer types in Windows NT, and the direct printing is done differently for the three.

Windows NT Network Printers:

In Windows NT, go to Start|Settings|Printers, double-click on the desired printer. Go to the menu Printer|Properties. Under the Port tab, there is a list of available ports for the printer. There will be one like 192:168.0.1:MY_PRINTER. This is the name in two parts which the 'lpr' (included with NT) utility requires.

To print to this device, a file must be created and then the file must be printed; the temporary file may be deleted afterwards:

ASSIGN TO "printfile.txt"
...
CALL PROGRAM "lpr -S192.168.0.1 -PMY_PRINTER nc101a.txt".
DELETE FILE "printfile.txt"

This device may be inquired 'lpq -S192.168.0.1 -PMY_PRINTER'.

Windows LPT port:

Another way of printing in Windows is through the lpt port. This would be assigned directly, as in ASSIGN TO "lpt". This only works when the statement 'COPY /b printfilename lpt' works from the DOS prompt.

Windows Samba port:

It may be setup in some instances by using the 'net use' command; this may be done when the printer is known by '//machine/name'. This must be setup prior to execution. It would then done in code the same way as the LPT port.

PERCobol

Home         About Us         Privacy        Legal        
© Copyright LegacyJ Corp. 1998, 2005
All Rights Reserved.

All trademarks are the properties of their respective owners or licensers.