On Mon, 24 Jun 2002, David Coello wrote:
>
> I load lp5250 with outputcommand='scs2ascii > /as400/scs$$$.txt'
>
> but when i print i get a file scs623.txt (for example) sized 0 bytes.
>
I can't think of anything that would cause the exact symptom you're
posting. If you told me that the 0 byte file was actually called
scs623.txt' (with a quote at the end) then it would make sense.
I do see something wrong with your syntax, so I'll try to explain it:
If you're doing a command line:
lp5250d outputcommand='scs2ascii > /as400/scs$$$.txt'
Then, (at least on my system) the shell is passing the following arguments
to lp5250d:
arg 0: lp5250d
arg 1: outputcommand='scs2ascii
arg 2: >
arg 3: /as400/scs$$$.txt'
This works out this way because the quote is not at the beginning of the
argument, but rather in the middle. That problem can be easily fixed
simply by typing:
lp5250d 'outputcommand=scs2ascii > /as400/scs$$$.txt'
by surrounding the entire argument with the quotes, the shell passes the
whole thing as one arguemnt to the program (which is what we're looking
for)
However, if you're putting this in a ~/.tn5250rc or ${prefix}/etc/tn5250rc
config file, it creates a completely different problem. Those config
files do not observe shell syntax (since they're not handled by the shell)
The entire argument gets passed to popen() verbatim.
Therefore, it ends up trying to execute a program called
'scs2ascii > /as400/scs$$$.txt' (it thinks that all of that, including the
spaces, etc, are part of the program name) and can't find it, so it fails.
At any rate, the quoting is not needed in the config file, so if this
is going into a tn5250rc, just omit the quoting:
outputcommand = scs2ascii > /as400/scs$$$.txt
_______________________________________________
This is the Linux 5250 Development Project (LINUX5250) mailing list
To post a message email: [EMAIL PROTECTED]
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/linux5250
or email: [EMAIL PROTECTED]
Before posting, please take a moment to review the archives
at http://archive.midrange.com/linux5250.