× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.




Hello Mitch,


Greetings Scott!



Personally, when I have problems like this, I prefer to try
doing things one step at a time to see where they break, and
what sort of information I can get.

Consequently, I'd set up my outputcommand to look like this:

outputcommand=cat - > /home/myuserid/test.scs

The idea is that lp5250d will write the raw SCS data to a
file in your home directory. Then I'd run:

cat test.scs | scs2ascii > test.asc

And

cat test.asc | enscript -B -f Courier7 --margins=36::36: -r
--output=- > test.ps

cat test.ps | gs -q -dNOPAUSE -dBATCH -sDEVICE=tiffg4 -r300
-sOutputFile=/home/user/test.tiff - > test.tiff

You'll note that I used 'cat' to send the file to each
program, so that it's reading the data from a pipe, the way
it would be if you were using
it in production. I also used > to direct it to a file for the same
reason.

This way, you can see any messages printed to stderr at each
step of the way, and hopefully see where things are going
wrong, and correct them, etc. And since you have a file at
each step of the way, you can repeat each test with different
options, if needed.


I understand your troubleshooting logic and agree with you completely.
I went through your steps as listed and each file was created without
errors. It's just that when my complete command is placed within the
.tn5250rc file that the shell seems to be interpreting something
differently that would be expected.




If you still can't get this to work, I'd suggest creating the
TIFF on the System i, and just using lp5250d to download it
to the Linux box.
That should be extremely easy to do...

tiff {
host = systemi.example.com
env.DEVNAME=TIFF
env.IBMMSGQNAME=QSYSOPR
env.IBMMSGQLIB=*LIBL
env.IBMMFRTYPMDL=*WSCST
env.IBMWSCSTNAME=QWPTIFFG4
env.IBMWSCSTLIB=*LIBL
outputcommand=scs2ascii>/home/myuserid/test.tiff
}

The trouble you'll have with this 2nd method is tuning all of
the parameters (page size, size of each character, etc).
Those tunings need to be made in the individual print files,
and a lot of people aren't willing to undertake the process
of changing all of their print files (despite that this is
the way that OS/400 was designed to work). It's enough to
make you want to chew your own foot off.


Yeah... I want to chew my foot off just thinking about having to learn
the process you just described. ;) As I stated in my original post, I
know very little about the iSeries OS but I do hope to get more involved
in the future.



But, that would be the advantage to your enscript/gs
solution, if you can get it working... you wouldn't have to
adjust all of the print files.


I still want to work towards this goal as I feel it is the best option
for me at this time and allows me to use my, somewhat better, knowledge
of Linux vs OS/400. We have so many different reports, etc., that are
being generated and this would give me a little more flexibility under
my control.



I don't understand why James suggested adding quotes. Seems
to me that the quotes he suggested are pretty much guaranteed
to make the process fail, because it completely changes the
meaning of the string.


Although his suggestion didn't work, it possibly could be a matter of
getting the command line quoted differently that would allow the shell
to read it correctly. Just a guess as I am not a Linux guru!! :)

Thank you both for your assistance and I welcome further comments.


Regards,
Mitch



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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

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

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.