You are on page 1of 26

Workload Automation

Programming Language (WAPL)

Using Automation to do More in


Less Time
Introduction

 IBM Workload Scheduler for z/OS 9.3


introduced Workload Automation
Programming Language (WAPL),
which allows you to bring scheduling
to the application lifecycle, saving
Dev time and highlighting
scheduling issues early. Many more
things can be automated and
integrated, such as clean-up and
adhoc changes saving Ops time too.
Workload Automation Programming Language
Installing WAPL
 Installing WAPL base code is easy

 Run EQQJOBS option 3 which generates the necessary JCL’s to use in batch.
(starting on page 54 of ‘Planning and Installation z/OS’)
 EQQJOBS also creates the job EQQWPLCO to rename the supplied members
in the supplied SEQQWAPL library.
(page 126 of ‘Planning and Installation z/OS’)
 Sources:
[eqqi1mst] Planning and Installation z/OS
[eqqw1mst] WAPL User's Guide
WARNING: If you use z/OS 2.2 or higher make sure you have fix UI44302 installed

Workload Automation Programming Language


WAPL in TWS for z/OS 9.2
 Get source files from 9.3

 Use the 9.3 EQQJOBS option 3 and run the EQQWPLCO job.

 Copy the generated EQQJOBS library together with the SEQQMISC,


SEQQMSG0 and SEQQWAPL from 9.3.
 Place these sources apart from your 9.2 code.

 In batch: Change the DD statements in job EQQYXJCL to refer to these


datasets.
 In TSO: Make sure you allocate the correct libraries before initiating your
WAPL commands.
WARNING: Unsure if UI44302 works for using WAPL with versions before 9.3

Workload Automation Programming Language


WAPL in batch
 Call EQQYXJCL from your generated EQQJOBS library

Workload Automation Programming Language


WAPL in TSO
 Look at the samples in your generated EQQJOBS

EQQWTSO1
EQQWTSO2
EQQWTSO3
EQQWTSO4
 These samples can be used to build up a WAPL environment to run your WAPL
commands in.

Workload Automation Programming Language


WAPL from IWS in STC

Workload Automation Programming Language


Power of Objects
Dep ADID
Oper
Runcycle
Jobname
Type
ADID NAME # of Runcycles [OBJ1-ADOP-1-
ADID1 [OBJ1-ADOP-1-
[OBJ1-ADRUN-
[OBJ1-ADID] [OBJ1-#ADRUN] ADDEP-1-
[OBJ1] 1-ADRTYPE]
ADOPJN]
ADDEPADID]

Dep ADID
ADID Oper
Runcycle
Jobname
Type
# of ADID’s # of Operations [OBJ1-ADOP-1-
Description ADID1
ADID2 [OBJ1-ADOP-2-
[OBJ1-ADRUN-
[OBJ] [OBJ1-#ADOP] ADDEP-2-
[OBJ1-ADDESC] ADID2
[OBJ2] 2-ADRTYPE]
ADOPJN]
ADDEPADID]
ADID3

Dep ADID
ADID Last User # Dependencies Oper
Runcycle
Jobname
Type
[OBJ1-ADOP-1-
[OBJ1- [OBJ1-ADOP-1- [OBJ1-ADOP-3-
[OBJ1-ADRUN-
ADID3 ADDEP-3-
ADLUSER] #ADDEP] 3-ADRTYPE]
ADOPJN]
[OBJ3] ADDEPADID]

Workload Automation Programming Language


Show Object - records
 SHOW OBJECT(element) is a great tool to find out what fields you can gather
from a type of record.

Workload Automation Programming Language


Show Object - output

Workload Automation Programming Language


Object Example 1 – Naming
Standards (JCL)

Output

Workload Automation Programming Language


Object Example 2 – Naming
Standards (Code)

Get AD’s from IWS

Chop up ADID for checks

Check ADID

If length is incorrect
Write to ADIDWRNG

Workload Automation Programming Language


Object Example 2 – Naming
Standards (Output)

ADIDWRNG
Incorrect Names ADID
Correct Names

Workload Automation Programming Language


Object Example 2 – zCentric WS
(JCL)

Input

Workload Automation Programming Language


Object Example 2 – zCentric WS
(Code)

Read TWSPARM

Write Output to temp

Read temp file and list WS

Compare Data
Write to OUTPUT

Workload Automation Programming Language


Object Example 2 – zCentric WS
(Output)

WSID Destination Hostname

Workload Automation Programming Language


Add adhoc applications and JCL
 With WAPL it is possible to add applications to the IWS Current Plan which do
not exist in the database.
 The adhoc application can even run JCL which does not reside in the JOBLIB
or the JS file. It will be added to the JS file for submission dynamically through
WAPL.
 The same process can dynamically change applications already in the plan or
even mass change JCL already residing in the JS file.

Workload Automation Programming Language


Example Add adhoc applications
and JCL (JCL)

Workload Automation Programming Language


Example Add adhoc applications
and JCL (Code)
Prefix is inserted in front
of jobname to create ADID
I2E#ETWSJZZZ
Suffix adds something after
the jobname

Start reading the next input until


it finds the delimiter and put that
in the JS file for this operation
Workload Automation Programming Language
Example Add adhoc applications
and JCL (JCL lines)

Read file until end statement

Workload Automation Programming Language


Example Add adhoc applications
and JCL (Code to start)

Start the operation

Workload Automation Programming Language


Date calculations - 1
 WAPL can be used for date calculations

 Date calculations can be used for things like automatically creating calendars
and removing jobs from the current plan on certain days of the year.
Create dates for next year

Workload Automation Programming Language


Date calculations - 2

Only create the date if it


is on a monday

Workload Automation Programming Language


Other things you can do with WAPL
 Automatically change your applications when promoting them from test to
production
 Check the complete database for naming conventions and other enforced
standards
 Automatically add or remove housekeeping based on the contents of your
database
 Check who last updated all the JCL in the JS file before the Current Plan gets
extended.
 And so much more!

Workload Automation Programming Language


Some things to consider
 You can make the Batch Loader format compatible with EQQYLTOP for
Application Definitions and Operator instructions by using OPTIONS
SYNTAX(LEGACY)
 Do NOT forget to run EQQWPLCO
 WAPL is IWS-aware. This means it can use supplied IWS variables and a lot of
extra ones. The full list is available in Appendix C in ‘WAPL User’s Guide’.
 IBM System Automation can use WAPL to modify IWS for z/OS by running
WAPL in it’s TSOSERVER.
 Using z/OS 2.2 or higher and a job class ABOVE the line will result in errors
and unpredictable behavior. Install fix UI44302 or run in a class with BELOW.
 Please use a test environment if trying out WAPL!

Workload Automation Programming Language


Questions?

Workload Automation Programming Language

You might also like