Ah, you got me farther along...even though the line:

 $browser->send($asc) or die $@;

appears to be writing to the socket connection and not dying on me, nothing
is ever received by the target web server.  I tried both EBCDIC and
ASCII-based web servers as targets.  I also tried writing converted and
unconverted strings by removing the call to iconv.  In no case did I ever
get even so much as a blip in the web server log.

My guess is that either the write to the socket failed early on and/or the
TCPIP packet was malformed enough that the stack could not deliver it.  My
next stop is to ask our TCPIP support fellow to run a packet trace and see
if the packet ever left our mainframe system's OSA card (the NIC). If it did
I need to see if the packet is formed properly and if it didn't leave the
box then we have a very low-level TCPIP issue with our Perl 5.8.0 build.

This is so odd since we had over 97% of the test suite passing...I am
beginning to wonder about the quality of the tests that are running and
whether they are actually running properly on EBCDIC-based systems or not.

Unfortunately, our 5.6.1 build only works in a static configuration and we
had really hoped to deploy the dynamic support in 5.8.0 which appears to
work ok.  But in the interest of time we may have to ship 5.6.1 with our new
z/OS system when it goes out in 2 weeks.

Thanks for your help.


Brad Van Duser
EDS - BellSouth Account
MS 6J72 BSC
675 West Peachtree Street
Atlanta, GA  30308

* phone: +01-404-529-2923
* mailto:[EMAIL PROTECTED]
* pager: +01-800-862-0399 PIN 17311309
* pager mailto:[EMAIL PROTECTED]




-----Original Message-----
From: Peter Prymmer [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 11, 2003 7:23 PM
To: Van Duser, Brad
Cc: [EMAIL PROTECTED]
Subject: Re: TCPIP Sockets Under Perl 5.8.0



On Mon, 6 Jan 2003, Van Duser, Brad wrote:

> I hope everyone had a Happy New Year and all that jazz.
>
> Does anyone have Perl 5.8.0 up and running on MVS yet?  We cannot get
TCPIP

Several people have reported successful builds.  Noone has reported 100%
regression tests passed, but 5.8.0 came in over 90 or 95% passing on most
reports.  I am not sure if anyone bothers to report their production
deployments.

> sockets to work under Perl 5.8.0 and we have tested this on OS/390 2.10
> (31-bit mode), OS/390 2.10 (64-bit mode), and z/OS 1.2 (64-bit).  Attempts
> to read from a socket using IO::Socket all hang.
>
> Our socket test scripts work fine using the Perl 5.6.1 build on all 3 of
> these MVS levels.  Both the 5.6.1 and 5.8.0 builds pointed to the same
/etc
> configuration and we have double-checked all of the items identified in
the
> readme files (including README.os390).  I have built both the static and
> dynamic loading versions of 5.8.0 with the same results.  On the surface
our
> builds look pretty clean with 97-99% of tests passing.
>
> In previous discussions, Mr. Prymmer indicated that the I/O model changed
> dramatically in this new release.  I wonder if that is where the problem
> lies.

Given the nature of the problem as you presented it I doubt that it is the
I/O  model per se that might have caused trouble.  The UTF-8 internal
representation underwent some additional work going from perl 5.6.1 to
perl 5.8.0 and that is where I might suspect a problem.  On EBCDIC
platforms utf-ebcdic (rather than utf-8) is the internal representation of
strings for much perl code.

> Here is a snippet of code from my main test script:
>
> #!/usr/local/bin/perl
> my ($browser,$asc,$stk1,$stk2,@resp);
> use IO::Socket;
>
> $browser = IO::Socket::INET->new(
>
>   Proto => "tcp",
>
>   PeerAddr => "90.70.104.64",
>
>   PeerPort => "http(8080)" )   or die $@;
>
> $asc="GET http://quote.yahoo.com/d/quotes.csv?s=eds&f=sl1d1t1c1ohgv&e=.csv
> HTTP/1.0\n\n";
>
> $asc=`echo '$asc'|iconv -f IBM-1047 -t ISO8859-1`;
>
> $browser->autoflush(1);
>
> $browser->send($asc) or die $@;
>
> my @resp=<$browser>;
>
> $stk1=`echo '@resp'|iconv -f ISO8859-1 -t IBM-1047|grep EDS`;
> print "Content-type: text/html\n\n";
> print "<html><pre>";
> print $stk1,"\n";
> print "</html>\n";
> close $browser;
>
> PeerAddr and PeerPort hit our corporate proxy so you may need to adjust
> accordingly.  On Perl 5.6.1 I get back my stock quote but on 5.8.0 the
> script hangs on line 12 - the "my @resp=<$browser>;" - and a netstat shows
> the socket connection as Established but it never completes.
>
> We had hoped to be able to deploy Perl 5.8.0 with our z/OS 1.2 system
around
> Feb 1.  Any help is appreciated.

I guess I would recommend that you set up a web server that you have
control and access to (perhaps behind the firewall if necessary). Then
rather than:

$asc="GET http://quote.yahoo.com/d/quotes.csv?s=eds&f=sl1d1t1c1ohgv&e=.csv
HTTP/1.0\n\n";

you might instead try:

$asc="GET http://ourserver.eds.com/ HTTP/1.0\n\n";

then run the script from the mainframe and log in to ourserver.eds.com and
take a look at the access log file and/or the error log file for the web
server.  They should be able to provide clues about what sort of web
client protocal message got to the web server.  If there is a problem with
utf-ebcdic you might see some odd 8 bit chars in the log file(s).

Peter Prymmer

Reply via email to