On Dec 5, 3:54 pm, [EMAIL PROTECTED] (Mariusz) wrote: > Hello list, > > I am able to send a JOB to z/OS usinf Net::FTP. But I would like to > receive the job output of the submitted job too. > Do you know how should be used Net::FTP to achieve this ? > > Best regards > > Mariusz
You can use the MVS::JESFTP package by Mike Owens to achieve this. There you can find some useful methods and also you can use the inherited methods of Net::FTP and Net::Cmd if you need more control over your job execution. #Sample code use MVS::JESFTP; my $jes = MVS::JESFTP->open($host, $logonid, $password) or die; $jes->submit($job); #$job is the absolute name of a valid jcl file my $message = $jes->message; # this will retrieve the submit message where you can find the job number my $jobNumber = substr($message,index($message,"JOB"),8); # this could be changed by a RE but ... it works my $aref = $jes->wait_for_results($jobname, $timeout); #jobname is the name of your JOB card. Timeout is 60 by default $jes->get_results($aref); #you can use $jes->get($jobNumber,"DIRECTORY/ $jobNumber.out"); $jes->delete_results($aref); # you can use $jes->delete($jobNumber); $jes->quit; If you need more help on using this, do not hesitate in contact me. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/