How to monitor the status of started task when running an application.
The CA WA ESP "ACTIVE" function can be used to test if a job or an address space is active on the current system, and returns a value based on that test.
CA WA ESP Edition r11.4
1. 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)
2. Enable started task tracking by adding "STC" tracking option on the TRACKOPT init statement or command. Example: TRACKOPT STC MASTER
3. Use the IF ACTIVE function. The following example sets resources based on if the task is active or not. The started task name is 'mystc'.
IF ACTIVE('mystc') THEN DO
ESPNOMSG RESDEF mytask_up SET AVAIL(1)
ESPNOMSG RESDEF mytask_down SET AVAIL(0)
ESPNOMSG RESDEF mytask_up SET AVAIL(0)
ESPNOMSG RESDEF mytask_down SET AVAIL(1)
The System Activity Functions (ACTIVE, JOBONQ, and TAPES) are documented in the CA WA ESP Edition User Guide