CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
FTP class: how to get the output of the put command

 



basti2013
New User

Aug 2, 2006, 2:46 PM

Post #1 of 2 (362 views)
FTP class: how to get the output of the put command Can't Post

I try to send batch files remotly to a z/os system

If I use ftp from command line on unix I am getting this output when using the put command:

ftp> quote site filetype=jes
200 SITE command was accepted
ftp> put LI4212IN
200 Port request OK.
125 Sending Job to JES internal reader FIXrecfm 80
250-IT is known to JES as J0078968
250 Transfer compleed successfully

In my program I am using the FTP class....so I have:

my $ftp = Net::FTP->new($host, Debug => 0, Passive => 0)
or die "can't open an FTP connection to $host";
$ftp->login($user, $password)
or die "can't authenticate with given username and password.\n";
$ftp->ascii();
$ftp->site("filetype=jes");
$ftp->put("LI4212IN", "LI4212IN") or die "can't upload file $! $?";

unfortunately put returns only the remote filename but I need something like the output if I use ftp from command line "250-IT is known to JES as J0078968" because J0078968 is the JOBID (like a PID) that I need to track

Does anybody know how I can do this with perl?

Thanks!!


KevinR
Veteran


Aug 2, 2006, 8:57 PM

Post #2 of 2 (358 views)
Re: [basti2013] FTP class: how to get the output of the put command [In reply to] Can't Post

the answer is on the other forum you posted this same question on.
-------------------------------------------------

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives