The following examples show how to submit a job for execution and receive a
notification of the ID assigned to the submitted job. In the examples it is assumed that
the JCL script br14.jcl
with the following contents is stored in the
directory /home/user1/src/jcl/
on a Unix host:
//USERJ0 JOB ,,CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1), // NOTIFY=&SYSUID //* //STEP00 EXEC PGM=IEFBR14 //
Example 1. Interface with JES using a file transfer advice string:
$ sftpg3 user1@mf_server sftp> sput /home/user1/src/jcl/br14.jcl /ftadv:filetype=jes,c=ISO8859-1,d=IBM-1047/ br14.jcl | 100B | 29B/s | TOC: 00:00:03 | 100% 07.57.19 JOB03198 $HASP100 USERJ0 ON INTRDR FROM STC03197 USER17 07.57.20 JOB03198 IRR010I USERID USER1 IS ASSIGNED TO THIS JOB. JOBID=JOB03198
Example 2. Interface with JES using the site command:
$ sftpg3 user1@mf_server sftp> ascii File transfer mode is now ascii. sftp> site filetype=JES sftp> sput /home/user1/src/jcl/br14.jcl br14.jcl | 100B | 33B/s | TOC: 00:00:02 | 100% 06.54.20 JOB03384 $HASP100 USERJ0 ON INTRDR FROM STC03354 USER16 06.54.21 JOB03384 IRR010I USERID USER1 IS ASSIGNED TO THIS JOB. JOBID=JOB03384
To retrieve the spool output of a submitted job, run the get command with the job's ID.
Example 1. Interface with JES using a file transfer advice string to specify the file type and code set conversion:
sftp> get /ftadv:filetype=JES,C=ISO8859-1,D=IBM-1047/JOB03198 JOB03198 | 1.1kB | 431B/s | TOC: 00:00:02 | 100%
Example 2. Interface with JES using the site command:
sftp> ascii File transfer mode is now ascii. sftp> site filetype=JES sftp> get JOB03384 JOB03384 | 2.2kB | 831B/s | TOC: 00:00:02 | 100% sftp> site filetype=SEQ
To delete a job (in this example JOB03198
), use the rm command and
an advice string to set file type to JES:
sftp> rm /ftadv:filetype=JES/JOB03198
Example 1. To display the status of all the jobs that are on the JES spool for your user ID, enter the following command:
sftp> ls /ftadv:filetype=JES/
Example 2. To list jobs in the long name format, enter:
sftp> ls -l /ftadv:filetype=JES/
Example 3. To list the contents of a specific job (in this example
JOB03419
) in the long name format:
sftp> ls -l /ftadv:filetype=JES/JOB03419/ /FTADV:filetype=JES//u/home/user1/JOB03419/: Volume Referred Recfm Lrecl BlkSz Dsorg Space Dsname JOB03419 USER1 USERJ0 A J 0000 0002 JES2 JESMSGLG 18 1048 UA 133 0003 JES2 JESJCL 6 299 V 136 0004 JES2 JESYSMSG 9 559 VA 137