Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Line print commands with newer printers 1

Status
Not open for further replies.

Bruce92318

Programmer
Jun 4, 2000
2
US
I am working with an older COBOL program (that works in a DOS environment only) that needs to tweaked so newer printers i.e. HP 600, 700, and 800 series, can print legal size paper. Is there a way I can manipulate the DOS line print commands?<br><br>Thanks!
 
You can create a binairy output file from COBOL which contains all the things you want to send to the printer. If you need binairy values, you can create something like this:<br><br>01&nbsp;&nbsp;temp.<br>&nbsp;&nbsp;&nbsp;&nbsp;03&nbsp;&nbsp;filler&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pic x value low-value.<br>&nbsp;&nbsp;&nbsp;&nbsp;03&nbsp;&nbsp;binairy-byte pic x.<br>01&nbsp;&nbsp;binairy-value redefines temp <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pic s9(4) comp.<br><br>Now you can fill the binairy-value with the special values you need like 27. Then you write your binairy-output-byte from binairy-byte containing the x'1B' starting the general escape-sequence. In dos it is also possible to write once with a binairy editor the special settings for the printer you need and put it with a COPY /B BINFILE LPT1 to the printer. <br><br>The codes you need are in the printer manual.<br><br>I hope this answers your question.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top