ACTIVE-JOBS

File 29
Op-Sys z/OS, z/VSE, BS2000
Statement FIND
Task Retrieve the tasks that are currently active in the system and get information about them; for example, the amount of CPU time already used by the tasks.

Under BS2000: corresponds to BS2000 command /sta p: retrieve tasks of Type 2 or 3.

 


Common Fields for all Operating Systems

Dictionary Field Name F/L Mu DE Remarks
ERROR-CODE N3      
ERROR-TEXT A58      
NODE N5   D  
NODE-NAME A16   D  
CPU-USED N7.2   D  
DISPATCHING-PRIORITY B1   D  
JOB-ID A8   D  
JOB-NAME A8   D  
JOB-NUMBER N7   D  
STATUS A8   D  
SYSTEM-MESSAGE-CODE A10      
TYPE A6   D  

Additional Fields Supported for z/OS and z/VSE

Dictionary Field Name F/L Mu DE Remarks
REGION-ALLOCATED-BELOW N7   D  
REGION-LIMIT-BELOW N7   D  
REGION-ALLOCATED-ABOVE N7   D  
REGION-LIMIT-ABOVE N7   D  

Additional Fields Supported for z/OS s

Dictionary Field Name F/L Mu DE Remarks
ADDRESS B4      
ASID N4   D  
CLASSES A6   D Relevant wirh TYPE=JOB
DISPATCHABLE A3   D  
ECPU-USED N7.2   D  
JES-INIT-ID A4   D Relevant with TYPE=JOB
PROC-NAME A8   D  
QUESCE A3      
REGION N7   D  
RESOURCE-GROUP A8      
SERVER A3      
SERVICE-CLASS A8      
SERVICE-CLASS-PERIODE N3      
SIO-CUNT N11   D  
STEP-NAME A8   D  
TCB B4   D  
WORKLOAD A8      

Additional Fields Supported for z/VSE

Dictionary Field Name F/L Mu DE Remarks
ADDRESS B4      
CLASSES A6   D  
PARTITION A2   D  
PROC-NAME A8   D  
REGION N5   D  
REPLY-ID A3   D  
SIO-COUNT N11   D  
STEP-NAME A8   D  
VSIZE N5   D  

Additional Fields Supported for BS2000

Dictionary Field Name F/L Mu DE Remarks
ACCOUNT-NUMBER A8      
CPU-MAX N7.2      
HOLD A3      
SYSTEM-CODE B2      
TYPE-NUMBER N1      
USER A8      

Relevant Error Codes

Code Text z/OS z/Vse BS2000
699 Not enough main storage available.     X
728 You are not allowed to see this job.     X
750 Invalid operand within operand list.     X
751 Not enough memory to execute the function.     X
799 Entire System Serer internal error.     X
830

z/OS: JES interface is not active.

z/VSE: POWER interface not active.

X X  
831 Error during queue initialization X X  
988 Invalid task type detected.     X

Field Descriptions

Field Name Format/Length Operating System
ACCOUNT-NUMBER (A8) BS2000

Account number of the job.

Field Name Format/Length Operating System
ADDRESS (B4) z/OS, z/VSE

ASCB address.

Field Name Format/Length Operating System
ASID (N4) z/OS

Address space identifier.

Field Name Format/Length Operating System
CLASSES (A6) z/OS Relevant when TYPE=JOBS: batch initiatior classes
z/VSE CLASSES assigned to the partition.
Field Name Format/Length Operating System
CPU-USED (N7.2) z/OS, z/VSE, BS2000

The amount of CPU time consumed by the job/address space. Format: SSSSS.HH.

Field Name Format/Length Operating System
CPU-MAX (N7.2) BS2000

The CPU time limit for the job.

Field Name Format/Length Operating System
DISPATCHABLE (A3) z/OS

Dispatchability of address space. Possible values:

Value Explanation
NO Address space is not dispatchable
YES Address space is dispatchable
Field Name Format/Length Operating System
DISPATCHING-PRIORITY (B1) z/OS, z/VSE, BS2000

Dispatching priority given by the operating system. For BS2000, the run priority of the task.

Field Name Format/Length Operating System
ECPU-USED (N7.2) z/OS

The amount of CPU consumed by the address space / task including preemptable-class CPU time (format SSSSS.HH).

Field Name Format/Length Operating System
HOLD (A3) BS2000

Indicates if a job is in HOLD status. Possible values:

  • NO

  • YES

Field Name Format/Length Operating System
JES-INIT-ID (A4) z/OS

Relevant when TYPE=JOB: JES batch initiator identifier.

Field Name Format/Length Operating System
JOB-ID (A8) z/OS, z/VSE, BS2000

Job number in alphanumeric format. Must be used for BS2000 V10 with alphanumeric TSNs. In case of numeric job numbers, the job number will also be returned in field JOB-NUMBER.

Field Name Format/Length Operating System
JOB-NAME (A8) z/OS, z/VSE, BS2000

Name of the job. In z/OS, z/VSE, this is taken from the job card.

Field Name Format/Length Operating System
JOB-NUMBER (N7) OS390 z/VSE, BS2000
Column Heading Meaning
z/OS JES job identifier
z/VSE POWER job identifier
BS2000 TSN (task sequence number), if numeric.

This field will contain zero in case of alphanumeric TSN.

Field Name Format/Length Operating System
PARTITION (A2) z/VSE

Partition identifier.

Field Name Format/Length Operating System
PROC-NAME (A8) z/OS, z/VSE

Name of the procedure currently being executed.

Field Name Format/Length Operating System
QUIESCE (A3) z/OS

Quiesce Indicator (YES/NO) (indicates if address space is quiesced).Relevant when TYPE=JOB: JES batch initiator identifier.

Field Name Format/Length Operating System
REGION (N7) z/OS, z/VSE

Amount of real storage used by the address space in Kbytes.

Field Name Format/Length Operating System
REGION-ALLOCATED-BELOW (N7) z/OS, z/VSE

Amount of virtual storage allocated below the 16 MB line (in KB).

Field Name Format/Length Operating System
REGION-LIMIT-BELOW (N7) z/OS, z/VSE

Amount of virtual storage that can be allocated below the 16 MB line (in KB).

Field Name Format/Length Operating System
REGION-ALLOCATED-ABOVE (N7) z/OS, z/VSE

Amount of virtual storage allocated above the 16 MB line (in KB).

Field Name Format/Length Operating System
REGION-LIMIT-ABOVE (N7) z/OS, z/VSE

Amount of virtual storage that can be allocated above the 16 MB line (in KB).

Field Name Format/Length Operating System
REPLY-ID (A3) z/VSE
Field Name Format/Length Operating System
RESOURCE-GROUP (A8) z/OS

Resource Group Name .

Field Name Format/Length Operating System
SERVER (A8) z/OS

Server indicator (YES/NO) indicates whether or not resource goals are being honored.

Field Name Format/Length Operating System
SERVICE-CLASS (A8) z/OS

Service class name .

Field Name Format/Length Operating System
SERVICE-CLASS-PERIOD (N3) z/OS

Service class period .

Field Name Format/Length Operating System
SIO-COUNT (N11) z/OS, z/VSE

Number of I/O operations performed so far.

Field Name Format/Length Operating System
STATUS (A8) z/OS, z/VSE, BS2000

Status of the address space. In BS2000, this is the same as field TYPE.

Possible values for z/OS:

Value Explanation
blank Address space is swapped in.
NON-SWAP Address space is non-swappable.
SWAP-OUT Address space is swapped out.
TERM Address space is terminating.
V=R Running in real memory.

Possible values for z/VSE:

Value Explanation
ACTIVE Partition has active job.
UNBATCH Partition has no job.
STOPPED Partition will not accept new jobs.
Field Name Format/Length Operating System
STEP-NAME (A8) z/OS, z/VSE

Name of the step currently being executed.

Field Name Format/Length Operating System
TCB (B4) z/OS

TCB address of first ready task for this address space.

Field Name Format/Length Operating System
TYPE (A6) z/OS, z/VSE, BS2000

Type of job. Possible values:

Option Job Type Explanation
Z/OS JOB INI STC TSU Batch job JES initiator started task TSO user
BS2000 BATCH DIALOG TP Batch job dialog task batch job with TP privilege
Z/VSE JOB Batch job
Field Name Format/Length Operating System
TYPE-NUMBER (N1) BS2000

Numeric job type identifier as used in BS2000, for example, 2 for batch jobs, 3 for dialog tasks.

Field Name Format/Length Operating System
USER (A8) BS2000

User ID of job.

Field Name Format/Length Operating System
VSIZE (N5) Z/VSE

Partition size.

Field Name Format/Length Operating System
WORKLOAD (A8) z/OS

Workload name .

Examples

The following example applies to all operating systems:

       ...
    FIND ACTIVE-JOBS WITH NODE = 148
                         AND CPU-USED < 1000
  *
      IF ACTIVE-JOBS.ERROR-CODE NE 0
        WRITE ACTIVE-JOBS.ERROR-TEXT
        ESCAPE ROUTINE
      END-IF
  *
      DISPLAY ACTIVE-JOBS.JOB-NAME
              ACTIVE-JOBS.JOB-ID
              ACTIVE-JOBS.TYPE
              ACTIVE-JOBS.STATUS
              ACTIVE-JOBS.CPU-USED
         END-FIND
     ...

Result for z/OS:

JOB-NAME JOB-ID  TYPE   CPU       STATUS
  ...
  XCOM148  2975    STC    68.04     NON-SWAP
  INIT             INI              IDLE
  DELINDEX 2988    JOB    13.45
  WKK      2802    TSU     2.95     SWAP-OUT
  ...

Result for BS2000:

  JOB-NAME JOB-ID  TYPE     CPU     STATUS
  ...
  DB01     1UFN    BATCH    179.51  BATCH
  ASF      1URL    DIALOG    12.78  DIALOG
  ...