Brian Volk wrote:
> Hi All,
>  
> I would like to issue a command to an AS/400 using Net:FTP -> quot(CMD
> [,ARGS]) but I'm having a little trouble.  Has anyone ever done this before?
> Any help would be greatly appreciated.
>

I have done this before but couldn't find the sample code.

> Here is what I would type on a 400 cmd line.  
>  
> quote rcmd pgm(kieth/quotetest)
>  
> Below is what I have so far.... 
>  
>  
> #!/usr/bin/perl 
>  
> use strict;
> use warnings;
> use Net::FTP;
>  
> my $hostname = '10.3.1.3';
> my $username = 'username';
> my $password = 'password';
>  
> # Open the connection to the host
> 
> my $ftp = Net::FTP->new($hostname);    
> $ftp->login($username, $password);     
>  
> # this does not work
> ftp->quot(rcmd pgm["kiethb", "quotetest"]);   

The above might need to be quoted differently so that Perl interprets it
correctly. I thought it would throw a compile time error, but it
doesn't. Not to mention the missing sigil in front of 'ftp'. Did you try
correcting the missing '$', and explicitly quoting the parts:

$ftp->quot('rcmd','pgm["kiethb","quotetest"]');

??

>  
> # I tried using the system cmd as well ...no luck
> system "quote rcmd pgm(kieth/quotetest)";
>

This is unrelated. That is sending it to your local shell, not the
remote system.

> $ftp->quit;
>  
> Thanks!
>  
> Brian Volk
> HP Products
> 317.298.9950 x1245
>  <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]
>  

You should be able to get it to work with Net::FTP, I have in the past.
Obviously if you can get any sort of logging on teh AS400 side to tell
you what is happening during your session you should.  You can also turn
on the 'Debug' option to the constructor to get more verbosity on the
client side.

HTH,

http://danconia.org

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to