× 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 Tue, 19 Mar 2002, Scott Klement wrote:

> > So I didn't think at all about porting until you mentioned that pipes in
> > Windows really suck and that you had an alternate way of doing things.  I
>
> In the Windows version, I have a function like:  scs2ascii(printer, byte);
> it gets called with each new byte retrieved from the AS/400.   What makes
> this different from the scs2xxx programs is that it can't go back and
> read more from the stream, it can only get its input from what's passed to
> it. -- so it has to remember where it left off so it knows what the next
> byte it's given will be used for...

Would porting to windows be easier if the following could be done:

1.  lp5250d always writes the SCS stream received from the iSeries to a
temporary file, say c:\tn5250\tmp\lp5250d123.scs

2.  After writing to the temp file is complete, lp5250d calls the
appropriate conversion program with the temp file name as an argument and
the destination file name as another argument, something like:

scs2ascii --infile=c:\tn5250\tmp\lp5250d123.scs
--outfile=c:\tn5250\tmp\lp5250d123.txt

3.  scs2* work basically unchanged from what they are now, except that
they can read from a file in addition to stdin and output to a file in
addition to stdout.

4.  After scs2* is done, lp5250d deletes the temporary file

I have no idea if these suggestions are any good, or if performance would
be any better or worse than using a pipe.  I also have no idea how to do
step 2 on windows (how do you pass arguments to programs on windows?).
But if these steps are possible I think they would make porting far easier
since scs2* would be basically unchanged.

James Rich
james@eaerich.com



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.