Monitor the status of a started task.
search cancel

Monitor the status of a started task.

book

Article ID: 24053

calendar_today

Updated On:

Products

ESP Workload Automation

Issue/Introduction

Need to monitor the status of started task an application.

Environment

Release: All
Component: ESP Workload Automation

Resolution

ESP provides system activity functions to check the status of activity on the system, including jobs and tape drives.

System Activity function "ACTIVE" can be used to check if a job or an address space is active on the current system, and returns a value based on that test. 

  • Ensure the started task will be tracked by coding the TRACKDEF statement in the JTDT (Job Tracking Definition Table).  The JTDT is found on the LOADJTDT init statement.  

         Example:   TRACKDEF STC NAME(mystc) MODEL(MODEL1)

  • Use the  IF ACTIVE function in a procedure. 

EXAMPLE: The following example sets resources if the task 'mystc' is active.

IF ACTIVE('mystc') THEN DO                    
   ESPNOMSG RESDEF mytask_up SET AVAIL(1)      
   ESPNOMSG RESDEF mytask_down SET AVAIL(0)    
ENDDO                                        
ELSE DO                                      
    ESPNOMSG RESDEF mytask_up SET AVAIL(0)     
    ESPNOMSG RESDEF mytask_down SET AVAIL(1)   
ENDDO  

 

Additional Information

The System Activity Functions (ACTIVE, JOBONQ, and TAPES) are documented in the ESP Workload Automation User Guide.
System Activity Functions

Loading the JTDT (Job Tracking Definition Table).
LOADJTDT Command

TRACKDEF statement in the JTDT (Job Tracking Definition Table).
TRACKDEF Statement