HCL Workload Automation, Version 9.4

showjobs

Displays information about jobs.

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]
     [;deps[;keys | info | logon]]
     [;short | single]
     [;offline]
     [;showid]
     [;props]

{showjobs | sj} [jobselect |
[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 basic showschedules 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
  • Task
  • Task Type
  • Job Stream
  • 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
  • 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 jobs
    Note: 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 on workstation site3, you can run the showjobs command in one of these two formats:
showjobs site3#acctg.@
or:
showjobs site3#acctg
To display the status of job JBA belonging to job stream TEST1 on workstation CPUA, on which you are running conman, and ask to show the job stream identifier for the job stream, run the following command:
sj CPUA#TEST1(0900 02/19/15).JBA
A sample output for this command is the following:
Workstation Job Stream SchedTime Job State Pr Start Elapse ReturnCode Dependencies

CPUA        #TEST1    0900 02/19 *** HOLD   0(02/19)                 {02/20/15}; -TEST-
                                 JBA HOLD  66(14:30)                 J2(0600 02/24/15).JB1  
  • The at dependency is shown as (14:30) in the Start column and the follows dependency from the job J2(0600 02/24/15).JB1 for job JOBA 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 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 that JOBVACS runs if JOBCHECKCAL goes into either ABEND or FAIL 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 workstation site3, on which you are running conman, and ask to show the job stream identifier for the job stream, run the following command:
%sj JSDOC.@;showid
A sample output for this command is the following:
Workstation 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
The job stream identifier 0AAAAAAAAAAAACRZ for job stream JDOCOM 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 workstation site3, and ask to show the information about the user ID under which the job runs, run the following command:
sj site3#JSDOCOM.@;logon
A sample output for this command is the following:
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:
sj @#@.@+state=hold;deps
a sample output is the following:
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/15}; -TEST- JOBA HOLD 66(14:30)
                                                                                 JS22(0600 02/24/15).JOBB

CPUA#JS25.JOBC Dependencies are:


CPUA       #JS25      0600 02/24 ***** HOLD 10(02/24)               {02/20/15}
                                 jobaa HOLD 10(02/24)(00:01)        TEST1; JOBC          TEST2; JOB1
                                                                                 JS18(0600 02/24/15).@

CPUA#JS25.JOB1 Dependencies are:


CPUA       #JS25      0600 02/24 ***** HOLD 10(02/24)                {02/20/15}
                                 JOBC  HOLD 10(02/24)(00:01)         JOB1
                                 jobaa HOLD 10(02/24)(00:01)         TEST1; JOBC         TEST2; JOB1
JS18(0600 02/24/15).@
To display the log from the standard list files for the job JOBC in the job stream JS25(0600 09/24/15) on workstation CPUA, running in a UNIX environment, run the following command:
sj CPUA#JS25 (0600 09/24/15).JOBC;stdlist
The output is the following:
===============================================================
= JOB : CPUA#JS25[(0600 09/24/15),(0AAAAAAAAAAAABQM)].JOBC
= USER : mdm93mdm
= JCLFILE : ls
= TWSRCMAP :
= AGENT : CPUA
= Job Number: 987278608
= Thu Sep 24 17:06:27 CEST 2015
===============================================================
AE
CAP
IMShared
InstallationManager
tsamp
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
= Thu Sep 24 15:16:25 CEST 2015
where:
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 display false. Successful output conditions are represented by the sc 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 workstations running an agent version earlier than 9.3, the Elapsed Time is expressed in Hours: Minutes and is calculated as the execution time rounded up to one minute, regardless of seconds. For example, an execution time of 4 minutes 20 seconds would be rounded up to 5 minutes, or an execution time of 10 minutes would be rounded up to 11 minutes. For workstation running agent version v9.3 or later, the Elapsed Time is expressed in Hours: Minutes: Seconds, however, if the workstation is under a master domain manager version earlier than 9.3, only Hours: Minutes are shown by showjob.

To display the properties of the job with job number 227137038, run the following command:
sj 227137038;props
A sample output for this command is the following:
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/2014 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/2014 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 

For an explanation of the Estimated Duration and Confidence Interval job properties, see The logman command.

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 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/16 (#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 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/16 (#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]

See also

From the Dynamic Workload Console you can perform the same task as follows:
  1. In the navigation bar at the top, click System Status and Health > Workload Monitoring > Monitor Workload.
  2. Select an engine.
  3. In Object Type, select Job.
  4. From the Query drop-down list, select All Jobs in plan or another task to monitor jobs.
  5. Click Run to run the monitoring task.