![]() |
![]() HP OpenVMS Systemsask the wizard |
![]() |
The Question is: I have inherited an in-house application that uses sys$qiow to dump serial data down to a printer from a VAX COBOL program. The printers are being replaced, and the new printers were detecting unknown characters in the text string. Using a serial data a nalyzer, I could see that the characters were a carriage return and line feed, inserted randomly through my text string. However, about 50% of the time the text comes down to the printer clean. I do an on-screen display of the text string right before t he qio call, so I know that it is ok going into the qio. My question: Have you heard of a sys$qiow inserting a CR/LF before, and is there a way of preventing it? The client is pushing hard for this to be resolved. I would appreciate any help you could give me quickly. Thanks Steve Browning The Answer is : Rather than using a datascope, the OpenVMS Wizard would monitor what was passed into the $qio call, and what is different between the case(s) that work and the case(s) that fail. $qio is a low-level raw I/O call, and only performs the formatting that is explicitly requested, either by formatting that is directly embedded in the data written via the $qio call, or by explict specification of the terminal driver carriage forms control mechanisms in the $qio call. $qio is the interface into OpenVMS device drivers, and it underlies the vast majority of OpenVMS I/O operations. Any prevelent or any common problem with the $qio call itself would thus tend to appear in a wide variety of areas and a wide variety of components. While this does not rule out bugs in $qio, the first assumption would be bugs in the application code or in another part of the I/O configuration -- in the site-specific I/O configuration, in (for the largest I/O buffer permitted) the setting of the system parameter MAXBUF, in the device driver or device-specific configration, etc. In particular, you will want to determine the difference -- the input data file contents, the record lengths, the target device, the printer settings, the terminal server port characteristcs, IP vs LAT, terminal port settings, etc -- between the fifty percent of the calls that reportedly succeed and the fifty percent of the calls that reportedly fail. If, for instance, the specific terminal line is set up to wrap the output based on the width of the terminal (or printer), you will the terminal driver -- though not $qio -- insert a carriage return and line feed as required to manage the width. For some of the more typical programming errors that the OpenVMS Wizard is familiar with, please see topic (1661). Use of $sndjbc, a print queue, and a (temporary) file may provide an alternative approach to the $qio to the printer device.
|