Skip to content

Latest commit

 

History

History
83 lines (74 loc) · 2.91 KB

README.md

File metadata and controls

83 lines (74 loc) · 2.91 KB

jesclient

Overview

z/OS JCL job submit utility. It uses FTP to communicate with JES. The JAR file includes all dependencies.

Features

  • Lists jobs using JOBNAME and/or OWNER filters.
  • Lists job spool files.
  • Reads and prints job spool files.
  • Submits both local and remote JCL jobs.
  • Cancels/purges jobs.

Command-line options

 -h,--help             print this help and exit
 -s,--hostname <arg>   FTP hostname
 -u,--username <arg>   FTP username
 -p,--password <arg>   FTP password
 -o,--owner <arg>      job owner filter
 -j,--jobname <arg>    job name filter
 -l,--list-jobs        list jobs
 -e,--detailed         detailed jobs list
 -i,--list-spool       list spool files
 -r,--read-spool       read spool files
 -b,--submit           submit job
 -f,--filename <arg>   filename
 -d,--dataset <arg>    dataset
 -w,--wait             wait
 -g,--purge            purge

Examples

The following example submits job from a file, waits for job completion, prints job spool and automatically purges it:

$ java -jar jesclient.jar -s"server address" -u"FTP username" -p"FTP password" -b -f IEFBR14.txt -rg
connecting to 'server address'
logging in 'server address' as 'FTP username'
submitting job
job J0134465 submitted
waiting for J0134465 job to complete
job ended with CC=0
reading 'IEFBR14' (J0134465) job spool
<spool output here>
purging J0134465 job
logging out 'server address'

Example of listing jobs by search criteria:

$ java -jar jesclient.jar -s"server address" -u"FTP username" -p"FTP password" -o"*" -j"SSID*" -le 
connecting to 'server address'
logging in 'server address' as 'FTP username'
listing jobs
+----------+------------+----------+--------+-------+------------+-------------+
| Name     | Identifier | Owner    | Status | Class | Completion | Spool files |
+----------+------------+----------+--------+-------+------------+-------------+
| SSIDWLM1 | S0131873   | DB2USER  | ACTIVE | STC   |            |             |
| SSIDADMT | S0094394   | DB2USER  | ACTIVE | STC   |            |             |
| SSIDDIST | S0094361   | DB2USER  | ACTIVE | STC   |            |             |
| SSIDDBM1 | S0094357   | DB2USER  | ACTIVE | STC   |            |             |
| SSIDIRLM | S0094352   | DB2USER  | ACTIVE | STC   |            |             |
| SSIDMSTR | S0094347   | DB2USER  | ACTIVE | STC   |            |             |
+----------+------------+----------+--------+-------+------------+-------------+
logging out 'server address'

Source code

Source code contains 2 implementations of a JES client - one uses FTP to communicate with JES (jes.ftp package) and another uses DB2 stored procedures (jes.db2 package).

Dependencies

jesclient depends on the following libraries: