× 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.




On Fri, 1 Mar 2002, James Rich wrote:
>
> Yeah, on further testing I discovered that it failed only when I tried to
> run it as described in the man page:
>
>        lp5250d    env.DEVNAME=PSPRT    outputcommand='scs2ps    >
>        scs$$.ps' as400sys
>
> It seems that the two $$ cause problems.  Since I'm looking for a way to
> make the filename change as different files are printed I thought I'd give
> the $$ a try.  Try running with the $$ and see what happens.


The man page is wrong.

It's not the $$ that causes it to fail, its the quotes.   When you specify
outputcommand='scs2ps > scs$$.ps'  then your shell may be doing one of two
things:
     a)  It's passing argv's of "outputcommand='scs2ps", ">" and
            "scs$$.ps'" seperately to lp5250d.
     b)  or, it's lumping the whole thing together as one argv of
            "outputcommand='scs2ps > scs$$.ps'" and then tn5250
            passes the entire string "'scs2ps > scs$$.ps'" as a program
            name to the shell.  (i.e. it thinks the spaces, >, etc are
            all part of the name of the executable you want the output
            piped to)

I'd guess the (a) is the case from the command line, and (b) is the case
from a tn5250rc file.

Instead, try specifying it like this:
    lp5250d env.DEVNAME=PSPRT 'outputcommand=scs2ps > scs$$.ps' as400sys

The idea is that the shell should put the entire "outputcommand" keyword
into one argument vector.  If you need to do the same thing in a tn5250rc
file, omit the quotes completely.

>
> > lp5250d env.DEVNAME=PRTTOUNIX "outputcommand=scs2ascii>/tmp/testme.txt" 
>as400
>
> Yup, this works fine for me, too.
>
> > Oh, BTW, scs2pdf doesn't work, and isn't finished.  Use scs2ps instead,
> > and pipe that to ps2pdf or similar...
>
> and lp5250d exits when outputcommand uses scs2pdf, even after I worked on
> scs2pdf :(  We did use scs2ps followed by ps2pdf and shortly discovered
> that the resulting pdf was not searchable.  I *think* I'm finding out that
> newer versions of ghostscript and ps2pdf fix that but it is still unclear.
> The trouble is that the resulting pdf is bitmapped, not text.

Hmmm... can't help you there.  I guess you'd have to finish scs2pdf to
solve that problem :(

> Unrelated to tn5250 but relevant to my project:  anyone know how big (in
> megabytes) of a file can be loaded into acrobat reader?

No idea... I doubt they'd put any limit on it, but I really don't know.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.