Cancelling an Endevor action which runs in ISPF or in a batch job is easy. It's enough to cancel the batch job or the TSO user.
How to proceed when the need arises to cancel an action which is is initiated from a Web Services client?
In this situation, what needs to be cancelled is the Web Services STC which is processing the action. This STC may be running in any LPAR and its name depends on the configuration for Web Services and ENF. It may be located with the following steps
For example, in a browser, visit http://<host>:<port>/EndevorService/rest/<datasource_name>
The hostname, port and datasource name are those the client uses to connect to Endevor web services. This query returns the parameters of the data source definition. For example:
{
"userId" : "<userid>",
"password" : null,
"message" : "ENDEVOR Web Service for MFNO",
"jobName" : "<jobname>",
"programName" : "BC1PAPI0",
"hostName" : "<hostname>",
"comments" : "Welcome to ENDEVOR MFNO Region",
...This is identified by "hostname" parameter. It is normally the same LPAR where the Tomcat STC runs, but it might be another LPAR. The hostname matches the CCI SYSID assigned to the ENF started task that runs in the LPAR. This shows up in MVS SYSLOG during the startup of the ENF started task, as in:
22.33.07 STC64803 CAS9214I - CA-ENF Command: SYSID(<hostname>) 269
269 CAS9603I - CAICCI - Local SYSID has been updated
269 CAS9240I - SYSID - Command complete
This is one of the started tasks spawned by ENF to service the requests received via Endevor web services. It can be identified because it holds an enqueue over the element being processed.
One way to list the enqueues is:
Another way would be by the following command at the MVS console (again, in the LPAR previously identified)
D GRS,RES=(CTLIELEM,E*)
The minor name for the enqueue has the format
Once you identify the exact STC that holds the enqueue, you can cancel it.
To confirm you have found the right started task, examine its output in EN$DPMSG DD. It should contain (at the bottom) messages from the Endevor API showing the action being processed, as in:
09:52:40 API0101I BEGINNING OF API ACTION PROCESSING
API0100I LIST ENVIRONMENT
API0100I TO DDNAME: APIEXTR
API0100I MESSAGE DDNAME: C1MSGSA
API0100I ENVIRONMENT: *
API0100I OPTIONS
API0100I PATH: P RETURN: A SEARCH: A
API0100I
API0100I API ACTION REQUEST DATA SUCCESSFULLY PRINTED
API0100I
09:52:40 API0102I DISPATCHING API ACTION