Seth Rothenberg wrote:
> David,
> We use Perl on Unix, with the NET:FTP module, and I was
> able to download a GDG just now.....
> 
> The Script I used is attached....the transcript is below....
> 
        I looked at your script and tried the following(changing ip addr and login 
info):
#!perl -w
use Net::FTP;

$ftp = Net::FTP->new("999.999.999.999");
$ftp->login("drwxxx","drwxxx");
$ftp->cwd('abc.EC650050.');
$ftp->get("DETRPT(0)", 'c:/currwrka/06plxxxxData/zpl014/rp03112601.pl014.txt');

if ( ! $ftp->ok() ) {
    my $MyMsg  = $ftp->message() ;
    my $MyCode = $ftp->code();
    printf "MyCode/MyMsg: %-s/%-s\n",
                                $MyCode,
                                $MyMsg;
 }
$ftp->quit;
        If I try the above, I get the following error:
MyCode/MyMsg: 550/Data set CFXXX.abc.EC650050.DETRPT(0) not found

        If I change the get to:
$ftp->get('abc.EC650050.' . "DETRPT(0)", 
'c:/currwrka/06plxxxxData/zpl014/rp03112601.pl014.txt');

        Then I get:
MyCode/MyMsg: 501/Invalid data set name "abc.EC650050.DETRPT(0)".  Use MVS Dsname 
conventions.

If I go to FTP in shell and do:

ftp> get 'abc.EC650050.DETRPT(0)' c:/junker1
125 Sending data set abc.EC650050.DETRPT.G0135V00 FIXrecfm 87
250 Transfer completed successfully.
ftp: 4993 bytes received in 0.40Seconds 12.48Kbytes/sec.
ftp> get 'abc.EC650050.DETRPT(-2)' c:/junker2

        It does the get correctly and I verified the two files, but still am at a loss 
for the Perl processing? I got another response to use system command, but this is 
within a farily complicated script to pull down data and then do two pass processing 
on the files downloaded with the second pass actually doing a send of emails within 
our company.

        I appreciate the response, but still cannot get the file.  If there is 
something I am missing in your script you sent me, please elaborate and I will attempt 
to use it more directly.

        Thanks for your time.

Wags ;)


**********************************************************
This message contains information that is confidential
and proprietary to FedEx Freight or its affiliates.
It is intended only for the recipient named and for
the express purpose(s) described therein.
Any other use is prohibited.
****************************************************************

Reply via email to