How to cancel an Endevor action initiated by a Web Services client
search cancel

How to cancel an Endevor action initiated by a Web Services client

book

Article ID: 436329

calendar_today

Updated On:

Products

Endevor

Issue/Introduction

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?

Resolution

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

1 - List the parameters of the Web Services data source which executes the action

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",
...

2 - Identify the LPAR where the action runs

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          

3 - Identify the Web services STC that is processing the element

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:

  • Logon to the LPAR in question
  • TSO ISRDDN
  • From the ISRDDN panel, enter CTLIELEM in the 'major name prefix' field and E in the 'minor name prefix' field. Leave the other fields blank

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

  • 1 char - Literal 'E'
  • 1 char - Siteid (matches the SITEID= parameter in the C1DEFLTS table, normally '0')
  • 8 chars - Environment name
  • 8 chars - System name
  • 8 chars - Subsystem name
  • 10 chars - Element name
  • 8 chars - Element type

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