Labeling Workload Automation Programming Language statements
To control the flow of the Workload Automation Programming Language statements, or make key statements easier to identify in the job output, you can label individual Workload Automation Programming Language statements.
CHKJOB: LISTSTAT CPOP JOBNAME(WLSCCPEX) IA(&OYMD1.1200)
The label can be up to 16 alphanumeric characters, excluded the underscore character. The label must begin with an alphabetic character to avoid clashing with internal Workload Automation Programming Language labels, which are 8-character numeric fields.
The label allows other conditional processing functions to reference this statement directly,
for example, IF
@CMD(CHKJOB.EQ.4) THEN
.
The label also allows
you to reference a command directly, as long as it is in scope, with the
GOTO
command or run it as a subroutine with the
CALL
command.
The label assigned to each statement is shown in the messages 200 and 299 that record the running
of each command, and can also be displayed by issuing the SHOW RC
command.
NOACT
statement after the first label, then add the actual statement after the second label, as shown
in the following example:ENTRY_1: NOACT
ENTRY_2": DISPLAY "Good morning"