To access this port from the iSeries, you would either have to write a driver in a workstation customization object (*WSCST), for which you would need good luck (!!), or you could pretend that the device you have hooked up actually is a printer.
NOTE: If it's any easier electronically, there should also be a serial port on the terminal, and the signal is switchable at the terminal between the parallel and serial ports.
Anyway, your hardware would provide printer-like signals to the port -- I am sure you know or can find out what is required -- and must respond like a printer when it receives signals from the iSeries. These signals would in fact be a file being sent to the device for printing.
To view parallel port pin assignments, click here.
To view serial, click here.
As to how to send when an error occurs, you should create an exit program that is triggered when a message is received on the display device's message queue. When an error occurs in your application, it would trigger a program that 'prints' to that 'printer'. Do this by getting the exit program to submit the print program, and then if anything goes wrong you have not hung up or crashed your session.
On receipt of the data your hardware can do what it likes. So long as it responds correctly to the handshaking, it shouldn't cause any problems on the iSeries.
Let me know how you get on -- we can attach a coffee maker to our old 5250 and get some more use out of it!
================================== MORE INFORMATION ON THIS TOPIC ==================================
The Best Web Links: tips, tutorials and more.
Visit the ITKnowledge Exchange and get answers to your developing questions fast.
Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.
This was first published in May 2005