Manage Learn to apply best practices and optimize your operations.

Using the parallel port on a remote terminal

How can I use the parallel port on a remote terminal? For example, I need to send an alarm if my program displays an error message, and then build a based electronics interface to catch the parallel port signals. Any idea as to how I can make this work?
This port is intended for the attachment of a local printer. If the port is active, it will be auto-configured when the workstation is attached to the iSeries, if auto-configure is allowed -- if not, it can be manually configured.

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!


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.

Dig Deeper on Remote Access to iSeries

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.