showjobs
For information about how to use wildcards to filter jobs and the folders within which they are defined, see Wildcards.
The displayed information is updated
only as long as HCL Workload Automation (batchman) is
running. Whether batchman is up or down is confirmed on screen by the Batchman
LIVES
or Batchman down
message when you issue the conman
start
command.
You must have list access to the object being shown if the enListSecChk option was set to yes on the master domain manager when the production plan was created or extended.
Syntax
{showjobs | sj} [jobselect]
[;keys | info | step | logon | crit | keys retcod]
[;short | single]
[;offline]
[;showid]
{showjobs | sj} [jobselect]
[;keys]
[;extended]
[;short | single]
[;offline]
[;showid]
{showjobs | sj} [jobselect]
[;deps[;keys | info | logon]]
[;short | single]
[;offline]
[;showid]
[;props]
{showjobs | sj} [jobselect |
[[folder/]workstation#]jobnumber.hhmm]
[;stdlist[;keys]]
[;short | single]
[;offline]
[;showid]
[;props]
Arguments
- crit
- Displays information in the crit format.
- deps
- Displays information in the deps format;
that is, the jobs used in follows dependencies are listed followed
by the dependent jobs and job streams. Jobs are listed in the basic
showjobs
format. Job streams are listed in the basicshowschedules
format. Use "keys", "info", or "logon" to modify the "deps" display. - hhmm
- The time the job started. Use this, together with the stdlist and single arguments, to display a specific instance of the job.
- info
- Displays information in the info format. Note: When displaying the output for a job, the job definition is not displayed correctly in USERJOBS and the output conditions are not displayed. However, the correct information can be seen in the stdlist.
- jobnumber
- The job number.
- jobselect
- See Selecting jobs in commands.
- keys
- Displays a single column list of the objects selected by the command.
- logon
- Displays information in the logon format.
- offline
- Sends the output of the command to the conman output device. For information about this device, see Offline output.
- props
- Displays the following information about the specified job instance,
you must have display access to the props of the specified job instance
being shown:
- General Information
- Job
- Workstation Folder
- Workstation
- Task
- Task Type
- Job Stream
- Job Stream Workstation Folder
- Job Stream Workstation
- Scheduled Time
- Priority
- Login
- Monitored
- Requires Confirmation
- Interactive
- Critical
- Runtime Information
- Actual Workstation
- Status
- Internal Status
- Not Satisfied Dependencies
- Job Number
- Rerun Options
- Information
- Promoted
- Return Code
- Return Code Mapping Expression
- Successful output conditions related to a SUCC job status
- Other output conditions
- Time Information
- Actual Start
- Earliest Start
- Latest Start
- Latest Start Action
- Maximum Duration
- Maximum Duration Action
- Minimum Duration
- Minimum Duration Action
- Critical Latest Start
- Deadline
- Repeat Range
- Actual Duration
- Estimated Duration
- Confidence Interval
- Recovery Information
- Action
- Message
- Job Definition
- Workstation Folder
- Workstation
- Retry after
- Number of attempts
- Current attempt
- Run on same workstation
- Extra Information
- This section shows additional properties specific for shadow jobs
and jobs defined by JSDL. For shadow jobs it contains the following
information:
- For distributed shadow jobs:
- Remote Job Scheduled Time
- Remote Job
- Remote Job Stream
- Remote Job Stream Workstation
- For z/OS shadow jobs:
- Remote Job Scheduled Time
- Remote Job
- Remote Job Workstation
- Remote Job Error Code
For more information, see How the shadow job status changes after the bind is established.Note: Information on archived jobs is not retrievable using the props option.Note: When displaying the output for a job, the job definition is not displayed correctly in USERJOBS and the output conditions are not displayed. However, the correct information can be seen in the stdlist.
- retcod
- Displays the return code for the job. This argument must be used in conjunction with
the keys argument, for example:
%sj @; keys retcod
- short
- Shortens the display for every and rerun jobs to
include only the following:
- The first iteration
- Jobs in different states
- Exactly matched jobsNote: This field shows the specific properties if the job is a shadow job or a job defined by JSDL.
- showid
- Displays for each job stream the job stream identifier.
- single
- Selects only the parent job in a chain that can include reruns, repetitions, and recovery jobs. The job must be identified by job number in jobselect. This is useful with the stdlist option.
- stdlist
- Displays information in the stdlist format. Use the keys argument
to modify the display. Note: Information on archived jobs is not retrievable using the stdlist option.
- step
- Displays information in the step format.
- workstation
- The name of the workstation on which the job runs. Wildcard characters are permitted.
Comments
If a job fails because the agent is not available, the job is automatically restarted and set to the READY status, waiting for the agent to connect again. As soon as the agent connects again, the job is submitted.
Results
The output of the showjobs command is produced in eight formats: standard, keys, info, step, logon, deps, crit, and stdlist. The keys, info, crit, and logon arguments modify the displays.
Examples
-
To display the status of all jobs in the
acctg
job stream defined in the folderecho
on workstationsite3
, stored in foldermyfolder,
you can run theshowjobs
command in one of these two formats:
or:showjobs /myfolder/site3#/echo/acctg.@
showjobs /myfolder/site3#/echo/acctg
-
To display the status of job
JBA
belonging to job streamTEST1
on workstationCPUA
, on which you are running conman, and ask to show the job stream identifier for the job stream, run the following command:
A sample output for this command is the following:sj CPUA#TEST1(0900 02/19/18).JBA
Workstation Job Stream SchedTime Job State Pr Start Elapse ReturnCode Dependencies CPUA #TEST1 0900 02/19 *** HOLD 0(02/19) {02/20/18}; -TEST- JBA HOLD 66(14:30) J2(0600 02/24/18).JB1
- The at dependency is shown as
(14:30)
in the Start column and the follows dependency from the jobJ2(0600 02/24/18).JB1
for jobJOBA
is shown in the Dependencies column. - In the Dependencies column the date enclosed in braces,
{02/20/15}
, indicates that the job stream instance has been carried forward and the date indicates the day when the job stream instance was added to the production plan for the first time.
- The at dependency is shown as
-
The following output example displays the status of all jobs, including predecessors and, in particular, job,
JOBVACS
, defined in job stream,JSHOLIDAYS1
, that has a conditional dependency on predecessor job,JOBCHECKCALC
, that specifies thatJOBVACS
runs ifJOBCHECKCAL
goes into eitherABEND
orFAIL
state:S_MDM #JSHOLIDAYS 0600 09/23 ********************************** READY 10 (00:01) (S_AGT#)JOBCHECKCAL HOLD 19 (S_AGT#)JOBVACS HOLD 10 JOBCHECKCAL IF ABEND | FAIL
-
To display the status of jobs belonging to job stream
JSDOC
on workstationsite3
, on which you are running conman, and ask to show the job stream identifier for the job stream, run the following command:
A sample output for this command is the following:%sj JSDOC.@;showid
The job stream identifierWorkstation Job Stream SchedTime Job State Pr Start Elapse ReturnCode Dependencies site3 #JSDOCOM 0600 11/26 *** SUCC 10 11/26 00:01 {0AAAAAAAAAAAACRZ} JDOC SUCC 10 11/26 00:01 0 #J25565
0AAAAAAAAAAAACRZ
for job streamJDOCOM
is shown in the Dependencies column.Note: The time or date displayed in the Start column is converted in the time zone set on the workstation where the job stream is to run. -
To display the status of jobs belonging to job stream
JSDOCOM
on workstationsite3
, and ask to show the information about the user ID under which the job runs, run the following command:
A sample output for this command is the following:sj site3#JSDOCOM.@;logon
Workstation Job Stream SchedTime Job State Job# Logon ReturnCode site3 #JSDOCOM 0600 11/26 JDOCOM SUCC #J25565 me10_99 0
-
To display the status of all jobs in the HOLD state on all workstations, in the deps format, run the following command:
a sample output is the following:sj @#@.@+state=hold;deps
Workstation Job Stream SchedTime Job State Pr Start Elapse RetCode Dependencies CPUA#JS2.JOBB Dependencies are: CPUA #JS21 0900 02/19 ***** HOLD 0(02/19) {02/20/18}; -TEST- JOBA HOLD 66(14:30) JS22(0600 02/24/18).JOBB CPUA#JS25.JOBC Dependencies are: CPUA #JS25 0600 02/24 ***** HOLD 10(02/24) {02/20/18} jobaa HOLD 10(02/24)(00:01) TEST1; JOBC TEST2; JOB1 JS18(0600 02/24/18).@ CPUA#JS25.JOB1 Dependencies are: CPUA #JS25 0600 02/24 ***** HOLD 10(02/24) {02/20/18} JOBC HOLD 10(02/24)(00:01) JOB1 jobaa HOLD 10(02/24)(00:01) TEST1; JOBC TEST2; JOB1 JS18(0600 02/24/18).@
-
To display the log from the standard list files for the job
JOBC
in the job streamJS25(0600 09/24/23)
on workstationCPUA
, running in a UNIX® environment, run the following command:
The output is the following:sj CPUA#JS25 (0600 09/24/23).JOBC;stdlist
where:=============================================================== = JOB : CPUA#JS25[(0600 09/24/23),(0AAAAAAAAAAAABQM)].JOBC = USER : mdm93mdm = JCLFILE : ls = TWSRCMAP : = AGENT : CPUA = Job Number: 987278608 = Sun Sep 24 17:06:27 CEST 2023 =============================================================== AE CAP IMShared TWA WebSphere =============================================================== = Exit Status : 0 = SC STATUS_OK : true = OC OUTPUTCOND2 : false = OC OUTPUTCOND1 : true = System Time (Seconds) : 0 Elapsed Time (hh:mm:ss) : 00:00:01 = User Time (Seconds) : 0 = Job CPU usage (ms) : 20 = Job Memory usage (kb) : 1272 = Sun Sep 24 15:16:25 CEST 2023
- Exit Status
- Is the status of the job when it completed.
- OC <output_condition_name>
- The result of the evaluation of the output conditions that when satisfied,
determine which successor job runs. Output conditions that are satisfied display
true
, and output conditions that are not satisfied displayfalse
. Successful output conditions are represented by thesc
flag in the ;stdlist output. - System Time
- Is the time the kernel system spent for the job.
- Elapsed Time
- Is the elapsed time for the job.
- User Time
- Is the time the system user spent for the job.
Note: The System Time and User Time fields are used only in UNIX®. Their values in Windows® are always set to 0. This is because, in Windows®, the joblnch.exe process runs in a very short time, which can be considered null.For an explanation of the Estimated Duration and Confidence Interval job properties, see The logman command.
-
To display the properties of the job with job number
227137038
, run the following command:
A sample output for this command is the following:sj 227137038;props
sj SMA1964199;props General Information Job = JOBAUTO Workstation = NC005090_1 Task = <?xml version="1.0" encoding="UTF-8"?> <jsdl:jobDefinition xmlns:jsdl="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdl" xmlns:jsdle= "http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdle"> <jsdl:application name="executable"> <jsdle:executable interactive="false"> <jsdle:script>ping -n 180 localhost</jsdle:script> </jsdle:executable> </jsdl:application> </jsdl:jobDefinition> Task Type = executable Job Stream = SMA1964199 Job Stream Workstation = NC005090_1 Scheduled Time = 11/20/2023 16:57:00 TZ CET Priority = 50 Login = Monitored = No Requires Confirmation = No Interactive = No Critical = No Runtime Information Status = Running Internal Status = EXEC Not Satisfied Dependencies = 0 Job Number = 227137038 Rerun Options = Information = Promoted = No Return Code = Success Output Conditions STATUS_OK = true “RC=0” Other Output Conditions STATUS_ERR1 = false “RC=2” STATUS_ERR2 = false “RC=3” Time Information Actual Start = 11/20/2023 16:57:36 TZ CET Earliest Start = Latest Start = Latest Start Action = Maximum Duration = Maximum Duration Action = Minimum Duration = Minimum Duration Action = Critical Latest Start = Deadline = Repeat Range = Actual Duration = Estimated Duration = 00:03:02 (hh:mm:ss) Confidence Interval = 00:00:00 (hh:mm:ss) Recovery Information Action = Stop Message = Job Definition = Workstation = Retry after = Number of attempts= Current attempt = Run on same workstation = Extra Information PID = 3132
-
The following example displays the status of the job
dbseload
with a return code of 7 and a state of SUCCESSFUL:$conman sj workstation#DAILY_DB_LOAD #################################################################### # Licensed Materials - Property of IBM* and HCL** # 5698-WSH # (C) Copyright IBM Corp. 1998, 2016 All rights reserved. # (C) Copyright HCL Technologies Ltd. 2016, 2024 All rights reserved. # * Trademark of International Business Machines # ** Trademark of HCL Technologies Limited ################################################################### Installed for user "tme10_99". Locale LANG set to the following: "en" Scheduled for (Exp) 02/20/18 (#35) on CPUA. Batchman LIVES. Limit:50,Fence:0,Audit Level:0 sj workstation#DAILY_DB_LOAD (Est) (Est) CPU Schedule Job State Pr Start Elapse Dependencies Return Code WORKSTATION #DAILY_DB_LOAD ****************************** SUCC 10 22:11 00:04 DATASPLT SUCC 10 22:11 00:01 #J17922 0 DATAMRGE ABEND 10 22:12 00:01 #J17924 1 CHCKMRGE SUCC 10 22:12 00:01 #J17926 0 DATACLNS SUCC 10 22:12 00:01 #J17932 0 DATARMRG SUCC 10 22:13 00:01 #J18704 0 DBSELOAD SUCC 10 22:13 00:01 #J18706 7 DATAREPT SUCC 10 22:13 00:01 #J18712 0 DATARTRN SUCC 10 22:14 00:01 #J18714 0 $
-
The following example displays the return code for a specific job named
workstation#daily_db_load.dbseload
:$ conman sj workstation#daily_db_load.dbseload\;keys\;retcod #################################################################### # Licensed Materials - Property of IBM* and HCL** # 5698-WSH # (C) Copyright IBM Corp. 1998, 2016 All rights reserved. # (C) Copyright HCL Technologies Ltd. 2016, 2024 All rights reserved. # * Trademark of International Business Machines # ** Trademark of HCL Technologies Limited ################################################################### Installed for user "tme10_99". Locale LANG set to the following: "en" Scheduled for (Exp) 02/20/19 (#35) on CPUA. Batchman LIVES. Limit:50,Fence:0,Audit Level:0 sj workstation#daily_db_load.dbseload;keys;retcod 8 $
The retcod feature when integrated into a script can become quite powerful.
-
The following example shows a job stream containing a job (named RE_ACCOUNTS_JOB) which ends in ABEND state. After the parent RE_ACCOUNTS_JOB job fails, the recovery job starts. When the recovery job completes in success state, the parent job waits a minute, then reruns. The sequence is repeated for three times, if the parent job keeps failing. If the parent job completes successfully, the rerun sequence is interrupted at the first successful run of the parent job:
SCHEDULE NC053009#RE_JS_04 ON RUNCYCLE RC1 "FREQ=DAILY;INTERVAL=1" : NC053009_1#JOB_2 FOLLOWS RE_ACCOUNTS_JOB NC053009_1#RE_ACCOUNTS_JOB END NC053009_1#RE_ACCOUNTS_JOB DOCOMMAND "sleep 60; exit 5" STREAMLOGON bankmngr TASKTYPE UNIX RECOVERY RERUN REPEATEVERY 0001 FOR 3 AFTER NC053009_1#RECOVERY_JOB
-
The following is the output of the sj command at the end of the sequence:
NC053009 #RE_JS_04 0000 01/24 ***************************************STUCK 10 17:40 (NC053009_1#)JOB_2 HOLD 10 RE_ACCOUNTS_JOB (NC053009_1#)RE_ACCOUNTS_JOB ABEND 10 17:40 00:01 5 #J277948077 >>recovery (NC053009_1#)RECOVERY_JOB SUCC 10 17:42 00:01 0 #J277948082 >>rerun 1 of 3 (NC053009_1#)RE_ACCOUNTS_JOB ABEND 10 17:44 00:01 5 #J277948085 >>recovery (NC053009_1#)RECOVERY_JOB SUCC 10 17:45 00:01 0 #J277948087 >>rerun 2 of 3 (NC053009_1#)RE_ACCOUNTS_JOB ABEND 10 17:47 00:01 5 #J277948089 >>recovery (NC053009_1#)RECOVERY_JOB SUCC 10 17:48 00:01 0 #J277948090 >>rerun 3 of 3 (NC053009_1#)RE_ACCOUNTS_JOB ABEND 10 17:50 00:01 5 #J277948092 [Recovery]
- To show job streams defined in the folder named
FOLDJS_API on all workstations in all folders using an absolute path, submit
the following command:
The following is the output of this command:conman ss /@/@#/FOLDJS_API/@
Optionally, you can obtain this same result, by submitting the command using a relative path. To submit the command using a relative path, use the -cf option to change the current folder from root (/) to /FOLDJS_API/ as follows:%ss /@/@#/FOLDJS_API/@ (Est) (Est) Jobs Sch Workstation Job Stream SchedTime State Pr Start Elapse # OK Lim >> /FOLDJS_API/ EU-HWS-LNX127 #JS_API_132A 1155 07/31 READY 10 0 0 EU-HWS-LNX127 #JS_API_132B 1543 07/31 ABEND 10 15:44 00:00 1 0 /US/ US-HWS-WIN10 #JS_API_144C 0000 07/31 HOLD 20 1 0
An additional way to obtain the same result is to change the current folder in conman first, then submit the command:conman -cf /FOLDJS_API/ ss /@/@#@
%cf /FOLDJS_API/
%ss /@/@#@
See also
- In the navigation bar at the top, click .
- Select an engine.
- In Object Type, select Workstation/Job/Jobstream.
- From the Query drop-down list, select All Jobs in plan or another task to monitor jobs.
- Click Run to run the monitoring task.