First; in the INPUT-OUTPUT SECTION, do:
4.3 INPUT-OUTPUT SECTION.
4.4 FILE-CONTROL.
4.5 SELECT PRINTER ASSIGN TO "PRINTER,,,LP(CCTL)"
4.6 FILE STATUS IS PRINTER-STATUS.
The in the DATA DIVISION, FILE section do:
5.1 DATA DIVISION.
5.2 FILE SECTION.
5.3 FD PRINTER RECORD CONTAINS 132 CHARACTERS
5.4 DATA RECORD IS LP-REC.
5.5 01 LP-REC PIC X(132).
Then in the Procedure division, do:
OPEN OUTPUT PRINTER.
IF PRINTER-STATUS NOT = "00"
DISPLAY "Open Printer failed!"
** You can also display the status value, or even EVALUATE the STATUS
and display the appropriate error msg.
GO TO 9999-RETURN.
Once Opened, the you can do:
MOVE values into LP-REC, and then Use the WRITE verb, see the HP COBOL
II/XL Reference manual at:
http://www.docs.hp.com/cgi-bin/doc3k/B3150090013.11820/1
--
Michael Anderson
Spring Independent School District
16717 Ella Boulevard
Houston, Texas 77090-4299
office: 281.586.1105
fax: 281.586.1187
-
>>> Peter Smithson <[log in to unmask]> 08/28/03 08:47AM >>>
How do I open a printer in MPE? I've tried a google search but can't
find anything. I'd appreciate a link to some documentation ideally.
Thanks.
Peter
--
http://www.beluga.freeserve.co.uk
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|