You can submit a job by using the JCL that you
have built on the FTP server rather than on the FTP client. Automatic
retrieval of jobs works only if the file contains a single job. It
does not work for files that include more than one job (multiple JOB
cards).
Procedure
Perform the following steps to submit a job using
FTP.
- Create the JCL and data that you want to submit and save
it on the MVS™ host where the
FTP server resides.
The JCL can reside in a sequential
data set, or partitioned data set, or z/OS® UNIX file. If JESINTERFACELEVEL=1,
then the job name in the JCL must be USERIDx, where x is a 1-character letter or number.
Additionally, the output class for any data sets you want to retrieve
(MSGCLASS or SYSOUT files) contained in your JCL must specify a JES
HOLD output class. If JESINTERFACELEVEL=2, then the JESJOBNAME and
JESJOBOWNER must match the jobname and jobowner. Additionally, JESSTATUS
must be set to ALL or OUTPUT and the logged in FTP user ID must have
access to nodeid.userid.jobname.jobid.
_________________________________________________________________
- Start a session with the FTP server on the MVS system to which you want to submit the job.
_________________________________________________________________
- After you have logged into the server, specify that you
want to interface to JES with a site parameter by entering the following
code:
SITE FILEtype=JES NOJESGETBYDSN
_________________________________________________________________
- Submit the JCL file you have created by entering the following
command:
GET jclfilename.jclfiletype outputfilename.outputfiletype
The outputfilename.outputfiletype defines
the data set at the FTP client site that is to contain the HELD job
output when the job completes. _________________________________________________________________
Results
The MVS FTP server
reads the data set jclfilename.jclfiletype and submits it to the JES internal reader.
You know you
are done when you see the following replies. The next two replies
indicate that the job has been submitted and the MVS FTP server is waiting for it to complete.
The third reply indicates that the job has finished and the files
have been copied to your output data set:
125 Submitting job outputfilename.outputfiletype FIXrecfm 80
125 When JOB05125 is done, will retrieve its output250 Transfer completed successfully.
Note: When submitting a job and automatically receiving the output,
remember that your session is suspended. You should use care, based
on the anticipated run time of your job, when using this function.
If your session times out, you must restart FTP and manually retrieve
your output. Session timeouts are caused by the following cases:
- The FTP Server does not wait long enough for the job that is executing
to end. Increase the JESPUTGETTO interval in the FTP.DATA data statement
on the server. This defaults to 10 minutes and defines the amount
of time FTP waits for the submitted job to complete before timing
out.
- The FTP client does not wait long enough for the job to complete
and the server to retrieve the output. Increase the DATACTTIME timer
value in the client. This defaults to two minutes and defines the
amount of time the client waits for a response from the server.
- The control or data connection is closed. This is usually caused
by a firewall that timed out the session because of inactivity. Add
FTPKEEPALIVE (control connection) and DATAKEEPALIVE (data connection)
statements in the FTP.DATA data file.
- FTP client and FTP Server receive resets. This is usually caused
by a firewall that timed out the session because of a lack of activity.
Add an FTPKEEPALIVE statement or decrease the time interval on the
current FTPKEEPALIVE statement in the FTP.DATA data file. The keepalive
value on FTPKEEPALIVE must be less than the expected value of the
server.