CHKAPPL

Syntax

CHKAPPL keyword

The CHKAPPL instruction verifies the presence of application occurrences in the current plan. Use the STATUS keyword to verifies the application occurrences in a specific status.

If you specify the STATUS keyword as E (Error), you can send a message reporting the operation error code to TSO users.

For a description of the keywords that can be used, see Keywords used in the Chkappl Instruction.

Table 1. Keywords used in the Chkappl Instruction
Keyword Requirement Multiple Values Allowed Description Abbreviation Format
APPL() Required Yes The name of the application to be checked. Wild characters are accepted, for example: APPL(TEST*) or APPL(T%%T*)
IADATE() Optional (1) No The input arrival date of the application occurrence. IADATE() means the current date. IADATE() and IA() are mutually exclusive. IAD YYMMDD
IATIME() Optional (1) No The input arrival time of the application occurrence. If IADATE(=) is specified, IATIME() assumes the default input arrival time that is defined in the DEFIAT parameter. IATIME() and IA() are mutually exclusive. IAT HHMM
IA() Optional (1) No The input arrival date time of the application occurrence. IA(=) assumes the current date and time. IA() cannot be used with IADATE() or IATIME(). YYMMDDHHMM
STATUS() Optional No The occurrence status can be:
C
Complete
E
An operation has ended in error
D
Deleted
P
A pending predecessor exists for the occurrence
S
Started
U
Undecided
W
No operations in the occurrence have started
ST
OPNO() Optional Yes The operation number. This keyword has effect only with STATUS(E). OP
ALERT() Optional No The alert option (YES or NO):
ALERT(YES)
A message will be sent to the TSO users specified in the USER() keyword. YES is the default.
ALERT(NO)
No message will be sent.
This keyword has effect only with STATUS(E).
USER() Optional Yes The users who are to receive the alert message. This keyword is required only with ALERT(YES).
ERRCODE() Optional Yes The operation code can be:
  • CAN
  • CCUN
  • FAIL
  • JCCE
  • JCL
  • JCLI
  • MCP
  • OFxx (xx is the status and extended status)
  • OAUT
  • OJCV
  • OSEQ
  • OSUB
  • OSUF
  • OSUP
  • OSxx (xx is the status and extended status)
  • PCAN
  • nnnn (step return code)
  • Sxxx (system abend code)
  • Uxxx (user abend code in hexadecimal notation)
  • xxxx (user-defined error code)
  • yyyy (distributed agent error code This keyword has effect only with STATUS(E)
ERR  
Note: 1 Mutually exclusive with another keyword.
Examples:
CHKAPPL APPL(TEST01)
All the occurrences of application TEST01
CHKAPPL IAD(&OYMD1) APPL(TEST02)
The occurrences of application TEST02 with the input arrival date of the occurrence that executes the OCL instructions and with input arrival time corresponding to the current time
CHKAPPL IA(=) APPL(TEST02)
The occurrences of application TEST02 with the input arrival date and time corresponding to the current date and time
CHKAPPL APPL(TEST02) IAT(1830)
All the occurrences of application TEST02 with the input arrival time 18.30 and with the input arrival date corresponding to the current date
CHKAPPL APPL(TEST01) STATUS(E) ALERT(YES) USER(ibm001,ibm002)
All the occurrences of application TEST02 in Error status; a message will be sent to TSO users IBM001 and IBM002
CHKAPPL APPL(TEST01) STATUS(E) USER(ibm001,ibm002), ERR(JCL,JCLI) OP(10,15,20)
Checks whether operation 10, 15, or 20 ended with error code JCL or JCLI; if any did, a message will be sent to users IBM001 and IBM002
Note: It is not possible to specify a variable (which is not an IBM Z Workload Scheduler variable) in the IA, IAT and IAD parameters of the OCL CHAPPL instruction, as in the following example:
SET VAR4=9912241830
CHKAPPL APPL(TEST01) IA(&VAR4)
CHKAPPL returns one of the following return codes:
RESULT = 0
Occurrences found in the current plan.
RESULT = 4
Occurrences not found or no operations that ended in error were found in the current plan.
RESULT = 8
Invalid instruction or PIF problem. Refer to the error messages.