elmars.ositis | 6 Dec 2005 14:19
Picon

split output file with tn5250d

Hello-

Recently we have started using lp5250d to output as400 spool files to 
text, which we then process for use in another manner. Since the Linux 
process does not know whent the complete spool file has been received, it 
checks the end of the file for specific content. If the content exists 
(*** END OF REPORT ***) then it assumes the document has been spooled and 
is ready for further processing.

What we have found is that for some reason lp5250d sometimes does a 
newfile on a page break. This happens both with small three page reports, 
as well as 1000 page reports.

The config we use is:

prlit03-f {
        host = rtb48.baltic
        env.DEVNAME = prlit03
        env.IBMMFRTYPMDL = *WSCST
        env.IBMWSCSTNAME = QWPDEFAULT
        env.IBMWSCSTLIB = *LIBL
        outputcommand = scs2ascii > 
/var/spool/lp5250d/prlit03/prlit03-`date +%y%m%d.%H`-$$.txt
}

This gives the generated file the date and hour when the file was created, 
as well as the process number. In the split file cases, the first half of 
the file is with one process number and the second half of the file is 
with another process number.

(Continue reading)

James Rich | 7 Dec 2005 23:41

Re: split output file with tn5250d

On Tue, 6 Dec 2005, elmars.ositis@... wrote:

(sorry to be slow in responding, I've been consumed in work these last few 
days)

> Recently we have started using lp5250d to output as400 spool files to
> text, which we then process for use in another manner. Since the Linux
> process does not know whent the complete spool file has been received, it
> checks the end of the file for specific content. If the content exists
> (*** END OF REPORT ***) then it assumes the document has been spooled and
> is ready for further processing.

Are you saying that you modified lp5250d?  lp5250d certainly does know 
when the end of the spool file has been reached.  What makes you believe 
that it doesn't?  The following outputcommand works perfectly for me:

outputcommand = scs2pdf> /home/samba/STSE09-`date +%Y-%m-%d-%H-%M-%S`.pdf

James Rich

It's not the software that's free; it's you.
 	- billyskank on Groklaw
--

-- 
This is the Linux 5250 Development Project (LINUX5250) mailing list
To post a message email: LINUX5250@...
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/linux5250
or email: LINUX5250-request@...
Before posting, please take a moment to review the archives
at http://archive.midrange.com/linux5250.
(Continue reading)

Uwe Maier | 8 Dec 2005 09:05
Picon
Picon

Re: split output file with tn5250d

Hi,
sorry to jump in  there - I've curiously waited for an answer on Elmars 
question.

I've seen these interrupts too. But unfortunately I haven't found any 
critieria to reproduce it (our application does just one print and 
people using it just tell me that it "happened" again (they can glue the 
two pieces together by a text editor) - but too late to reproduce it). 
Size doesn't seem to matter at all.

For the command I use something like

outputcommand=/bin/cat > /tmp/as400.printout.txt; 
/usr/local/bin/as400printout.sh print /tmp/as400.printout.txt

printout.sh does some streamlining of the output. No big deal. But the 
"outputcommand" is definitely called twice (probably more - but never 
occurred here).

Regards,
uwe

James Rich wrote:

> On Tue, 6 Dec 2005, elmars.ositis@... wrote:
>
> (sorry to be slow in responding, I've been consumed in work these last 
> few days)
>
>> Recently we have started using lp5250d to output as400 spool files to
(Continue reading)

James Rich | 8 Dec 2005 19:06

Re: split output file with tn5250d

On Thu, 8 Dec 2005, Uwe Maier wrote:

> I've seen these interrupts too. But unfortunately I haven't found any 
> critieria to reproduce it (our application does just one print and people 
> using it just tell me that it "happened" again (they can glue the two pieces 
> together by a text editor) - but too late to reproduce it). Size doesn't seem 
> to matter at all.

Hmm... if two people are having the same problem then it must be real :) 
But I need to know how to reproduce the problem.  I use lp5250d with 
scs2pdf to create output several thousands of pages long and it has never 
once given me any trouble.  I also use lp5250d to send directly to a 
printer using lpr.  Using lpr would probably mask the kind of problem 
described, though.  If size doesn't matter, does a particular spooled file 
cause the problem?  If the problem occurs, can you recreate by sending the 
exact same spooled file to lp5250d again?

James Rich

It's not the software that's free; it's you.
 	- billyskank on Groklaw
--

-- 
This is the Linux 5250 Development Project (LINUX5250) mailing list
To post a message email: LINUX5250@...
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/linux5250
or email: LINUX5250-request@...
Before posting, please take a moment to review the archives
at http://archive.midrange.com/linux5250.

(Continue reading)

elmars.ositis | 9 Dec 2005 09:28
Picon

Re: split output file with tn5250d

James-

Hmm.. I must have been a bit unclear. We have not made any changed to the 
lp5250d. We are taking the text output as generated by outputcommand and 
doing additional processing on the file. If the report is broken in two 
bits, we cannot determine whether the file has been fully spooled, as we 
check for the last line in the report for completion. I am trying to 
understand what would cause lp5250d to split the file on a page break.

There are other times, when lp5250d concatenates two very short reports 
into one file/page. This only seems to happen if there are two reports, 
one after the other which have only a 1/4 page of data and are wider than 
130 columns. 

A factor to consider may be that lp5250d and the as400 are on opposite 
ends of a 256k wan link. Could there be a timeout issue between pages? I 
this something we can adjust?

Thanks

Elmars

Elmars Ositis
Head of IT
HVB Bank Latvia AS
Elizabetes iela 63
Riga, LV-1050
Latvia
tel:+371 708 5531
fax: +371 708 5507
(Continue reading)

James Rich | 9 Dec 2005 22:31

Re: Re: split output file with tn5250d

On Fri, 9 Dec 2005, elmars.ositis@... wrote:

> Hmm.. I must have been a bit unclear. We have not made any changed to the
> lp5250d. We are taking the text output as generated by outputcommand and
> doing additional processing on the file. If the report is broken in two
> bits, we cannot determine whether the file has been fully spooled, as we
> check for the last line in the report for completion. I am trying to
> understand what would cause lp5250d to split the file on a page break.
>
> There are other times, when lp5250d concatenates two very short reports
> into one file/page. This only seems to happen if there are two reports,
> one after the other which have only a 1/4 page of data and are wider than
> 130 columns.

It would be very helpful if you have a case that is reproducible.  Does a 
certain report always result in the described behaviour?  If yes, then 
another test would be useful.  Try the following outputcommand:

outputcommand = cat > output$$.scs

If multiple output files are created by one print job then that would help 
me figure out where the problem lies.  If only one output file is created, 
then run it through the rest of your normal outputcommand like this:

cat output<pid>.scs | scs2ascii > /var/spool/lp5250d/prlit03/prlit03-`date 
+%y%m%d.%H`-$$.txt

> A factor to consider may be that lp5250d and the as400 are on opposite
> ends of a 256k wan link. Could there be a timeout issue between pages? I
> this something we can adjust?
(Continue reading)

Jack Woehr | 12 Dec 2005 05:57
Picon

AUTOCONF_VERSION

$ ./autogen.sh
Provide an AUTOCONF_VERSION environment variable, please

??? Did a mailing list archive search, didn't find this.
Hope this ain't a FAQ. If it is, bet it was me who asked it over the 
past 7 or so years :-)

-- 
Jack J. Woehr                 # "I never played fast and loose with the
PO Box 51, Golden, CO 80402   # Constitution. Never did and never will."
http://www.well.com/~jax      # - Harry S Truman

--

-- 
This is the Linux 5250 Development Project (LINUX5250) mailing list
To post a message email: LINUX5250@...
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/linux5250
or email: LINUX5250-request@...
Before posting, please take a moment to review the archives
at http://archive.midrange.com/linux5250.

Carey Evans | 12 Dec 2005 09:21
Picon

Re: AUTOCONF_VERSION

Jack Woehr wrote:
> $ ./autogen.sh
> Provide an AUTOCONF_VERSION environment variable, please
> 
> ??? Did a mailing list archive search, didn't find this.
> Hope this ain't a FAQ. If it is, bet it was me who asked it over the 
> past 7 or so years :-)
> 

If this broke recently and the commands below do work, then it's my 
fault.  I'd be interested to know on which system plain "autoreconf" 
fails, in this case.

   aclocal
   autoconf
   autoheader
   libtoolize --automake --force
   automake --add-missing --include-deps

However, it looks like you get this message if you have multiple 
versions of autoconf, etc., installed, and you need to pick one.  TN5250 
should work with the most recent version.

--

-- 
This is the Linux 5250 Development Project (LINUX5250) mailing list
To post a message email: LINUX5250@...
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/linux5250
or email: LINUX5250-request@...
Before posting, please take a moment to review the archives
(Continue reading)

Jack Woehr | 12 Dec 2005 22:41
Picon

Re: Re: AUTOCONF_VERSION

Carey Evans wrote:

> However, it looks like you get this message if you have multiple 
> versions of autoconf, etc., installed, and you need to pick one.  
> TN5250 should work with the most recent version.

Acutally, turns out that what I had was a stub script and NO versions of 
automake on my
OpenBSD 3.8-current system. My mistake, I thought I had installed all 
those ports.

So after setting some vars for versions and running the steps by hand, I 
was able
to build ... but:

$ nslookup netshare400.com
Server:         192.168.0.114
Address:        192.168.0.114#53

Non-authoritative answer:
Name:   netshare400.com
Address: 63.167.147.10

$ tn5250 netshare400.com
Could not start session: Invalid argument

--

-- 
Jack J. Woehr                 # "I never played fast and loose with the
PO Box 51, Golden, CO 80402   # Constitution. Never did and never will."
http://www.well.com/~jax      # - Harry S Truman
(Continue reading)

Carey Evans | 15 Dec 2005 10:59
Picon

Re: AUTOCONF_VERSION

Jack Woehr wrote:
> Acutally, turns out that what I had was a stub script and NO versions of 
> automake on my
> OpenBSD 3.8-current system. My mistake, I thought I had installed all 
> those ports.

It looks like an OpenBSD thing for getting the ports that need different 
versions or autoconf to all work properly.  I've found references to 
something called metaauto that runs the right version automatically, but 
I've never used OpenBSD myself so I can't suggest anything else.

Out of interest, does 'autoreconf -i' work as well if you set the right 
variables?

> $ tn5250 netshare400.com
> Could not start session: Invalid argument

Unfortunately, there's quite a few places this could be coming from. 
Could you try creating a trace file to see if it includes any 
information about the source of the error?  Something like:

$ tn5250 trace=log.txt netshare400.com

Alternatively, you could try 'ktrace -tc tn5250 netshare400.com' and 
kdump to find out which system call is failing.

-- 
Carey Evans

--

-- 
(Continue reading)


Gmane