IMHO, the stuff related to parsing SCS should remain in the SCS programs. Remember: SCS is not the only printer language that the system supports. We'll want to support AFP, IPDS, USER-ASCII, etc in the long run.

Plus, I think it's really handy for debugging and development to be able to dump the SCS data to a file and be able to analyze that file, and run it through other tools like scs2ascii or scs2pdf later on.

Can scs2pdf simply save the settings it needs into a file on disk?

James Rich wrote:
I recently committed several changes to cvs to vastly improve SCS
support and PDF output support. It now follows the host's requests
for page size, margins, and CPI, as well as a few other fixes for SCS
codes we weren't handling before.

But I've run into a significant problem. Suppose you have a 17 CPI
print job that is 198 columns wide. Because these are not the
default sizes of 10 CPI and 80 columns the iSeries will send the Set
Page Presentation Size command and a few other commands for font and
margins. The scs code we now have will correctly parse these command
and set the page size, fonts, and margins correctly. If when you
print this job you save the spool file and then immediately send it
again, the page size, font, and margin commands are not sent. The
iSeries expects the printer to remember what the last settings were
for these attributes. The iSeries only sends those parameters for
print jobs whose attributes differ from the previous print job sent.

We do print processing via two components: lp5250d and the
outputcommand parameter in ~/.tn5250rc of the print session (usually
one of scs2ascci, scs2pdf, or scs2ps). lp5250d does not have any SCS
code and simply passes on the print stream to the outputcommand via a
pipe. Each time a print job is processed the command specified in
outputcommand is started, attached to the pipe, and then exits when
the job is complete. All the SCS processing is done in this second
part. Because of this, the only programs that are aware of the
current page size, fonts, and margins are scs2ascii, scs2pdf, and
scs2ps. But because they exit at the end of each job, there is no
way for them to remember what the page, font, and margin settings
were from the previous job. So a job such as I described above would
print incorrectly the second time it is sent to be printed.

lp5250d could potentially remember these attributes and pass them to
scs2pdf as defaults. I've been experimenting with adding SCS code
to lp5250d but so far I'm just duplicating all the work that is in
scs.c and scs2pdf.c. Somehow I need to get lp5250d to know what
these attributes are so it can remember them between print jobs.

One of my thoughts is to integrate the scs2* programs into lp5250d,
but that would result in a big mess it seems like. Output format
could be chosen via a command line switch.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2020 by 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].