Start Watch Command or API Exit Program (QPDETWCH) API


  Required Parameter Group:

1 Watch option setting Input Char(10)
2 Session ID Input Char(10)
3 Error detected Output Char(10)
4 Event data Input Char(*)

  QSYSINC Member Name: QPDETWCH

The Start Watch Command or API Exit Program (QPDETWCH) API can be used as the exit program for the Start Watch (STRWCH) Command or Start Watch (QSCSWCH) API. See the online help for more information about the STRWCH command, or refer to the Start Watch (QSCSWCH) API.

This program takes the information supplied by the Start Watch Command or API, generates an XML service request, and places that service request on the Service Monitor queue.


Authorities and Locks

None.


Required Parameter Group

Watch option setting
INPUT; CHAR(10)

The reason indicating why the exit program was called.

The possible values are:

*MSGID A match on a message id and any associated comparison data specified on watch for message parameter occurred.
*LICLOG A match on a LIC log and any associated comparison data specified on the watch for LIC log entry parameter occurred.
*PAL A match on a Product Activity Log (PAL) and any associated comparison data specified on the watch for PAL entry parameter occurred.
Session ID
INPUT; CHAR(10)

The name of the session that is calling the exit program.

Length of receiver variable
INPUT; BINARY(4)

The length of the receiver variable described in Format of data returned. If the length is larger than the size of the receiver variable, the results may not be predictable. The minimum length is 8 bytes.

Error detected
OUTPUT; CHAR(10)

Indicates if an error in the exit program was found.

The possible values are:

*ERROR Error detected by watch exit program. The watch session that was passed in Session ID parameter will be ended. If the watch session to be ended originally specified multiple message ids, LIC log entries, or PAL entries, all of them will no longer be watched.
<blanks> No error detected by watch exit program.

Note: Any value other than "*ERROR" or <blanks> will be considered an error and the watch session that was passed in Session ID parameter will be ended. If the watch session to be ended originally specified multiple message ids, LIC log entries, or PAL entries, all of them will no longer be watched.

Event data
INPUT; CHAR(*)

The format of the watch information depends on the Watch option setting causing the exit program to be called.

Information about the format of the event data can be found in Watch for Event Exit Program.



API introduced: V5R4

[ Back to top | Problem Management APIs | APIs by category ]