
problem invoking readline
I'm trying to create an application that will take line printer output
that prints 1-up continuous labels, and print 33 labels per page label
sheets. The data is created on a VAX running VMS 6.2 and printed on a
Xerox N32 connected as an lpd printer via Multinet tcp/ip software.
If I print the postscript code and print data as one file, everything
works.
[prior code snipped...]
/getline {
currentfile 80 string readline
{scanline} {eof} ifelse
Quote:
} def
%
/dolabel {{getline} loop} bind def
dolabel
99999 XX 999999
[more data lines...]
When I place the postscript code in a device control library, and allow
the system to prefix the postscript code to the file, postscript
interprets the first line of data as part of the postscript code thus
causing an error. This probably happens because VMS appends the first
line of the data file to the setup file. I hard coded a line-feed at
the end of the postscript code, but that had no effect. In the fragment
following the + is actually a line-feed character.
[...]dolabel + 99999 XX 999999 [+ more data lines]
This gives the error: undefined, offending command XX, stack 999999
Clearly the interpreter is not invoking readline and is cheerfully
trying to interpret the data as postscript code. A hex dump of the file
done on the printer shows that dolabel is followed by 200d0a0c0d0a2039.
I was expecting that when the code arrived at dolabel, the interpreter
would start reading from currentfile from that point, even if the next
record is in the same physical record.
Does anyone have a workaround suggestion for this?
Regards,
Don Lewis