Name
lsjes — display JES job and spool file status
Synopsis
lsjes [-t
[delim_char
]] [-o
userid
] [-p
jobname-pattern
] [-s
a|i|o
] lsjes [-t
[delim_char
]]-i
jobid ... lsjes [-t
[delim_char
]] [-S
]-d
jobid ...
Description
This z/OS Co:Z utility uses the Extended Status Subsystem Interface to query the status of jobs in the primary JES2 or JES3 subsystem.
The first form displays a list, one line per job, all jobs that match optional filter criteria. If no arguments are specified, then all jobs owned by the current userid are displayed.
The second form displays one or more specific jobs, along with their spool files.
Options
-t
Requests output in delimited format. If
delim_char
is supplied, it is used as a delimiter, otherwise a tab character (\t
) is used. If this option is used, then header lines are not displayed in the listing.-o
useridFilters the job listing to include only jobs whose owner is the given z/OS userid. If this option is omitted, then jobs are filtered using the current userid.
-p
jobname-patternFilters the job listing to include only jobs with a name matching the given pattern. Valid generic pattern characters include '*' and '%'.
-s
a|i|oFilters the job listing to include only jobs whose status is either "ACTIVE", "INPUT", or "OUTPUT".
-i
Filters the job listing to include only the job(s) specified. One or more jobids must follow, where each jobid is 2-8 characters that starts with one of the prefixes "J/JO/JOB/T/TS/TSU/S/ST/STC/I/IN/INT" followed by a number.
-d
This option indicates the second form of the command (detail mode), in which specific jobs and their spool files are listed. One or more jobids must follow, where each jobid is 2-8 characters that starts with one of the prefixes "J/JO/JOB/T/TS/TSU/S/ST/STC/I/IN/INT" followed by a number.
-S
This option may be precede the
-d
option to indicate that the listing of spool files should also include SYSIN files, including JESJCLIN. This feature is only available on z/OS 1.10 or later.
Examples
This example lists all jobs owned by the current userid.
>lsjes Jobid Jobname Owner Status Class Completion TSU02611 KIRK KIRK OUTPUT TSU ABEND=622 JOB02663 KIRKJ1 KIRK OUTPUT A RC=0000 JOB02662 KIRKJ1 KIRK OUTPUT A RC=0000 JOB02661 KIRKJ1 KIRK OUTPUT A RC=0000 JOB02660 KIRKJ1 KIRK OUTPUT A RC=0000 JOB02659 KIRKJ1 KIRK OUTPUT A RC=0000 JOB02462 COZOOM KIRK OUTPUT A RC=0000 JOB02460 COZOOM KIRK OUTPUT A RC=0255
As above, but with delimiters (and without a header).
>lsjes -t'|' TSU02611|KIRK|KIRK|OUTPUT|TSU|ABEND=622 JOB02663|KIRKJ1|KIRK|OUTPUT|A|RC=0000 JOB02662|KIRKJ1|KIRK|OUTPUT|A|RC=0000 JOB02661|KIRKJ1|KIRK|OUTPUT|A|RC=0000 JOB02660|KIRKJ1|KIRK|OUTPUT|A|RC=0000 JOB02659|KIRKJ1|KIRK|OUTPUT|A|RC=0000 JOB02462|COZOOM|KIRK|OUTPUT|A|RC=0000 JOB02460|COZOOM|KIRK|OUTPUT|A|RC=0255 JOB02447|COZOOM|KIRK|OUTPUT|A|RC=0255 JOB02446|COZOOM|KIRK|OUTPUT|A|RC=0255 JOB02334|KIRKSLP|KIRK|OUTPUT|A|RC=0000 JOB02333|KIRKSLP|KIRK|OUTPUT|A|RC=0000 JOB02332|KIRKSLP|KIRK|OUTPUT|A|RC=0000 JOB02331|KIRKSLP|KIRK|OUTPUT|A|RC=0000 JOB02306|KIRKSLP|KIRK|OUTPUT|A|RC=0000 JOB02123|KIRKCB|KIRK|OUTPUT|B|RC=0001 JOB02070|KIRKCT|KIRK|OUTPUT|A|RC=4000
Tabbed delimiters can used with the Unix cut to select a field:
>lsjes -t | cut -f1 TSU02611 JOB02663 JOB02662 JOB02661 JOB02660 JOB02659 JOB02462 JOB02460 JOB02447 JOB02446 JOB02334 JOB02333 JOB02332 JOB02331 JOB02306 JOB02123 JOB02070
This example lists all active jobs (any owner).
>lsjes -o'*' -sa Jobid Jobname Owner Status Class Completion STC02691 BPXAS OMVSKERN ACTIVE STC STC02689 BPXAS OMVSKERN ACTIVE STC STC02688 BPXAS OMVSKERN ACTIVE STC ...
To list all jobs using a jobname pattern (any owner).
>lsjes -o '*' -p 'T*' Jobid Jobname Owner Status Class Completion STC02556 TCPIP TCPIP OUTPUT STC RC unknown STC02579 TCAS STRTASK OUTPUT STC RC unknown STC02093 TCPIP TCPIP OUTPUT STC -HELD- STC02608 TCAS STRTASK ACTIVE STC STC02605 TN3270 TCPIP ACTIVE STC STC02586 TCPIP TCPIP ACTIVE STC ...
To display the status of a job and list its spool files:
>lsjes -d J2333 Jobid Jobname Owner Status Class Completion JOB02333 KIRKSLP KIRK OUTPUT A RC=0000 Id Stepname Procstep DDName C Owner Recfm Lrecl Bytes 002 JES2 JESMSGLG H KIRK FA 133 1313 003 JES2 JESJCL H KIRK V 136 253 004 JES2 JESYSMSG H KIRK VA 137 823 102 UNIX SYSOUT H KIRK FBA 121 428