Running Workload Automation Programming Language as a load module
In addition to running Workload Automation Programming Language as a compiled REXX EXEC, you can also use the load module EQQWAPL.
- The
MEMBER
keyword ofOISTART
andJSSTART
is not available. You can specify the text for these commands only by using theDLM
keyword, or the respectiveOIT
orJST
statement. - The
INCLUDE
command cannot be used in the formatINCLUDE <DDNAME>(<MEMBER>)
. You can use other formats, for exampleINCLUDE <DDNAME>
andINCLUDE USER_FIELD(<name>)
. - The
JCL
keyword ofADDJOB
is not available. - You cannot use the TSO commands
BULKDISC, DEFINE, DELETE, JSUACT
, andREPRO
. You can use the PIF version ofDELETE
to delete the database and plan objects. - You cannot use the
DYNLOG
andXLATE
keywords ofOPTIONS
.
Apart from the above limitations, the EQQWAPL load module is equivalent to EQQYXTOP. EQQWAPL is provided for scenarios where you want to call Workload Automation Programming Language from other load modules or exits; in all other cases, you can use EQQYXTOP.
- IKJEFT01 is not run to establish a TSO environment.
- The CMD symbolic points directly to the load module to execute (default EQQWAPL).
- The SYSPROC and SYSTSPRT DD statements are omitted.
//RUNWAPL EXEC EQQYXJPL,
// SUBSYS=WSMC
//SYSIN DD *
ADDJOB ADID(ADHOC)
To call Workload Automation Programming Language from another load module in batch, use the EQQYXJPL procedure. The following example shows the Workload Automation Programming Language step to call Workload Automation Programming Language from another load module. There is no SYSIN DD statement, because the commands are passed to EQQWAPL through a control block.
//RUNWAPL EXEC EQQYXJPL,
// CMD=MYPROG,
// SUBSYS=WSMC
Offset (dec) | Offset (hex) | Length | Type | Field | Description |
---|---|---|---|---|---|
00 | 00 | 4 | Signed | WPLILINE | Number of 80 byte input lines. |
04 | 04 | 4 | Unsigned | WPLIOADR | Address of output data block. Must be initialized to zero. |
08 | 08 | 4 | Signed | WPLIOSIZ | Size of output block. Must be initialized to zero. |
12 | 0C | 4 | Unsigned | WPLIMADR | Address of message data block. Must be initialized to zero. |
16 | 10 | 4 | Signed | WPLIMSIZ | Size of message data block. Must be initialized to zero. |
20 | 14 | 80xWPLILINE | Character | WPLICMDS | Each line of WAPL commands. |
Specify the commands to be passed to Workload Automation Programming Language in the
WPLICMDS
field. Each line of command text must be long
80 bytes, with normal continuation rules applying; you can use blanks to reach the
required 80-byte length. The WPLILINE
field must be set to
represent the number of 80 byte lines, because it refers to the command text in
WPLICMDS
. The WPLIOADR
,
WPLIOSIZ
,
, and
WPLIMADR
WPLIMSIZ
must be initialized to zero, because they will be
set by Workload Automation Programming Language if
any data is returned.
OPTIONS STRIP(Y) SHOWDFLT(N)
LOADDEF AD* DATA(-) LOADER(*)
SELECT AD ADID(DAILYPLANNING)
If any data is directed to the REXX stack within EQQWAPL, this data is returned to the calling program in a second control block.
After calling EQQWAPL, the calling load module checks the fields WPLIOADR
and WPLIOSIZ
in the WPLI control block. If these fields are set to a value
different from zero, the data has been returned in a second control block WPLO. If messages have
been returned, WPLIMADR
and WPLIMSIZ
are set to a
value different from zero, and a second WPLO control block containing messages is created.
Offset (dec) | Offset (hex) | Length | Type | Field | Description |
---|---|---|---|---|---|
0 | 0 | 4 | Signed | WPLOLINE | Number of WAPL output lines. |
4 | 4 | Variable | * | WPLORECS | Block of WAPL output records. |
WPLORECS
field is made of
a repeating pair of fields that describe the length and text.Offset (dec) | Offset (hex) | Length | Type | Field | Description |
---|---|---|---|---|---|
0 | 0 | 4 | Unsigned | WPLRLEN | Length of WAPL output record. |
4 | 4 | Variable | Character | WPLRTEXT | WAPL output text. |
Use WPLIOADR
and WPLIOSIZ
to get the control
block data, then use WPLOLINE
to know how many records to retrieve from
within the data. The first 4 bytes of WPLORECS
(the
WPLRLEN
field) describes how long the WPLRTEXT
field
is, and the offset to the next WPLRLEN
field. Repeat this process for the
number specified in the WPLOLINE
field.
To call Workload Automation Programming Language from another load
module and use the WPLI control block, you must include a parameter string when you call EQQWAPL.
The parameter string must include the subsystem name and an INPUT
keyword
that includes the address of the WPLI control block. The address must be passed as an 8 byte hex
address prefixed with 0x, for example IWSC INPUT(0x0000CAA0)
.
Before calling EQQWAPL, the storage for the WPLI control block is obtained within the calling program code. The storage for the WPLO control block is obtained automatically during the running of EQQWAPL. After the control is returned to the calling program, the storage for the WPLI and WPLO control blocks is released within the calling program code.