|
Marc Zylka wrote: I've been trying to print to an HP 2235 (an old printer) but I haven't had much luck. I can send it a text string and it'll print but I've also been trying to send Escape sequence to change the printer settings. This hasn't worked, yet. Here is the current setup: * printer is hooked up to the serial port of an HP Jetdirect * I've created an output on the AS/400 to be used over TCP/IP. I forget what I used as a manufacturer's model, I think HP500. * I've created a printer file defined as *USERASCII * My program does the following: * for each escape sequence, I've output X'1B' + the codes on 1 or more lines. * Printer only prints one line with mostly @ signs. Anyone have any ideas on what else I need to do? As I mentioned earlier, I can print straight text with Escape codes. TIA, Marc Zylka (mzylka@netpath.net) Dear Marc, The AS/400 supports a feature called ASCII transparency. It is the foundation which the Host Print Transform facility was built upon. The SCS code 03 followed by a count byte invokes the feature. As an example, if you wanted to send the HP PCL laser printer language command for portrait orientation, you could code the values 03 05 1B 26 6C 30 4F into your application. The values must be coded using the hex insert capability (ie display session operating in hex mode, not in text mode) of AS/400 programming languages like RPG. The command prefix 03 05 tells the AS/400 operating system that the following 5 bytes are ASCII binary data which is not viewable on a 5250 terminal. When you return to text mode, you will not be able to view the 5 bytes of data that you just entered on your screen as characters. The ASCII Transparency feature will allow you to pass the control codes in your program to the TCP/IP attached printer. Also, you might need to change the printer file back to *SCS from *USERASCII. The AS/400 has the intelligence to know that TCP/IP attached printers using LPD/LPR need EBCDIC to ASCII conversion of data being sent to them. The Host Print Transform feature accommodates this requirement and the ASCII Transparency feature works well in this condition. I'm not sure how OS/400 handles data transfer to TCP/IP printers when the print file is specified as *USERASCII. HTH, /Paul -- Paul Tykodi, Technical Director E-mail: pault@praim.com Praim Inc. Tel: 603-431-0606 140 Congress St., #2 Fax: 603-436-6432 Portsmouth, NH 03801-4019 +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to "MIDRANGE-L@midrange.com". | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.