is it possible, through the JOBSTAT metric, to issue a command to start the task when it falls? How to?
We were asked in an urgent manner that when alerting a certain task to fall, the same monitoring metric issued a command to perform its start.
Yes this is possible.
One of the actions that can be taken when any threshold or state triggers is to run a Capture event, as defined in the Caplevel and CapEvent fields on STATES in this case. The member in the CNM4BCAP data set can then issue the MVS Start command.
Issue TOPICS command and review item 'Event Capture on an exception' which shows the parameters that will be passed to the capture event. The parms will automatically be populated into variables named &1, &2, &3 etc. (see the comments at top of CNM4BCAP(MVSMAIL) as an example) which can then be referenced in the caplib member.
An example statement in your CNM4BCAP member to be used for the JOBSTAT state would look like:
MVS S &10 (variable &10 contains the jobname for which JOBSTAT was triggered)
The capture member doesn't need to actually do a capture, it is just a list of SYSVIEW commands similar to a clist member in the CNM4BCLS data set.