NAME MVS::JESFTP - Perl extension for submitting JCL to MVS systems through FTP. SYNOPSIS use MVS::JESFTP; $jes = MVS::JESFTP->open($host, $logonid, $password) or die; $jes->submit($job); $aref = $jes->wait_for_results($jobname, $timeout); $jes->get_results($aref); $jes->delete_results($aref); $jes->quit; DESCRIPTION IBM mainframe MVS systems accept job input through the Job Entry Subsystem (JES). This input is in the form of 80-byte *card images* that correspond to the punch cards of ancient times. The new releases of MVS can accept this input via FTP to the MVS *internal reader* (equivalent to the physical card readers of older systems). This module uses the Net::FTP module under the hood to handle the FTP chores. METHODS $jes = MVS::JESFTP->open($host, $logonid, $password); This method creates a connection to the MVS system JES. If the connection is made, "open" returns a reference $jes to the JES connection; otherwise "open" returns "undefined". "open" takes three arguments: $host The IP address or DNS name of the MVS system. $logonid A valid FTP logon ID for the host. $password A valid FTP password for the host. $jes->submit($job); This method submits the jobstream contained in the file $job. If the submission is successful, "submit" returns true; otherwise "submit" returns "undefined". $aref = $jes->wait_for_results($jobname, $timeout); This method waits for the output of the submitted job to arrive in the JES *hold queue*. "wait_for_results" returns an array reference $aref to the a list of output files for the job suitable for input to "get_results", or "undefined" if NO results could be obtained. (1) "wait_for_results" takes two arguments: $jobname The name of the job you presumedly submitted with the "submit" method. $timeout How many seconds to wait for the job output to arrive; defaults to 60. $result = $jes->get_results($aref); This method retrieves the output of the submitted job from the JES *hold queue*. "get_results" returns "undefined" if successful; otherwise it returns a reference to an array of names of the files it could NOT retrieve. (1) "get_results" takes one argument: $aref An array reference to the a list of output files from the job, such as "wait_for_results" generates. "get_results" will retreive (via FTP) each output file in turn and store them in the current subdirectory; file names will be preserved. $result = $jes->delete_results($aref); This method deletes the output of the submitted job from the JES *hold queue*. "delete_results" returns "true" if successful; otherwise it returns a reference to an array of names of the jobs it could not delete. "delete_results" takes one argument: $aref An array reference to the a list of output files from the job, such as "wait_for_results" generates. "delete_results" will delete each job in turn. $jes->quit; This method closes the connection to JES. It is just the Net::FTP "quit" method. (1) To use this method, your JCL *JOB* card must specify a *MSGCLASS* that directs its output to the JES *hold queue*. If you don't understand what this means, don't use this method, or you will hang your calling program. PREREQUISITES You have to have Net::FTP installed. INSTALLATION tar xzf MVS-JESFTP-1.00.tar.gz perl Makefile.PL make # # Edit TEST.SEQ to contain your site-specific logonid, # password, account, & node in the appropriate places. # make test make install For Win32 systems, after unarchiving the the package, copy JESFTP.pm to C:\Perl\site\lib\MVS (modifying this path for your installation of Perl). AUTHOR Mike Owens mike.owens@state.nm.us Copyright (c) 2000 Mike Owens. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the GNU General Public License or the Artistic License for more details. SEE ALSO perl(1) "Net::FTP"