From: Roland G. <RGi...@cp...> - 2003-08-09 09:09:32
|
> I'm on a WinNT box with IIS webserver using PHP. I'm trying to make a > connection to a mainframe os/390 to be able to "browse" a VSAM file and load > an array with data that I need. I can currently log into the mainframe > using a JAVA telnet client tn3270, and can use PHP (or PERL) to FTP test > files. FTP is out of the question since this file I need to work with is > enormous. This sounds like you are trying to run activestate perl directly under winnt. You sould look into cygwin, which gives you a pretty good unix system on windows. Cygwin comes with its own perl and pseudo-tty-emulation and IO::Tty and Expect works on it AFAIK, so Net::Telnet probably will also work within cygwin. Apart from that, what is running on the OS/390? Linux? Z/OS? If that is the case, you should have rsh or better ssh capabilities. Then I'd do it like this: open3(\*WTR, \*RDR, \*ERR, "ssh $os390host perl"); print WTR $remote_script; while(<RDR>) { # process result line by line } This spawns a perl interpreter on the remote host, sends it a script to do some work (in that case, extracting some part of the huge file) and reads back the result. No need to install something on the remote side, no need for Expect. Hope this helps. Roland |