Workload Automation Programming Language For z/OS User's Guide and Reference
Workload Automation Programming Language For z/OS User's Guide and Reference
Workload Automation Programming Language For z/OS User's Guide and Reference
IBM
IBM Workload Scheduler for z/OS
Version 9.3 SPE (Revised November 2017)
IBM
Note
Before using this information and the product it supports, read the information in “Notices” on page 367.
This edition applies to version 9, release 3, modification level 0 of IBM Workload Scheduler for z/OS (program
number 5698-T08) and to all subsequent releases and modifications until otherwise indicated in new editions.
© Copyright IBM Corporation 2016.
US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract
with IBM Corp.
© Copyright HCL Technologies Limited 2017.
Contents
Figures . . . . . . . . . . . . . . . ix Defining subroutines . . . . . . . . . . 34
Protecting against PIF failure . . . . . . . . 35
Tables . . . . . . . . . . . . . . . xi Overriding Workload Automation Programming
Language defaults . . . . . . . . . . . . 35
Message log . . . . . . . . . . . . . . 36
About this publication . . . . . . . . xiii
Accessibility . . . . . . . . . . . . . . xiii
Chapter 3. Core programming
Technical training . . . . . . . . . . . . xiii
Support information . . . . . . . . . . . xiii commands . . . . . . . . . . . . . 37
Conventions used in this publication . . . . . xiv CALL – Execute external program, subroutine, or
variable. . . . . . . . . . . . . . . . 37
DISPLAY – Echo information to SYSTPRT . . . . 38
Chapter 1. Overview . . . . . . . . . 1
DO and END – Block and Loop commands . . . 38
Similarities to the Scheduling Operational
Block DO . . . . . . . . . . . . . . 38
Environment . . . . . . . . . . . . . . 2
Repeat DO loop . . . . . . . . . . . . 39
Version compatibility . . . . . . . . . . . 3
Iterative DO loop . . . . . . . . . . . 39
Small product enhancements . . . . . . . . 5
DO While loop . . . . . . . . . . . . 40
| Setting up the Workload Automation Programming
DO Until loop . . . . . . . . . . . . 40
| Language environment . . . . . . . . . . . 6
DO Forever loop . . . . . . . . . . . 41
Language support . . . . . . . . . . . . 6
DROP – Drop elements from memory . . . . . 41
Command language . . . . . . . . . . . . 6
EXIT – Terminate processing. . . . . . . . . 42
Output files. . . . . . . . . . . . . . . 8
FILTER – Post process selected records to reduce
Batch loader . . . . . . . . . . . . . . 8
output . . . . . . . . . . . . . . . . 42
IBM Workload Scheduler for z/OS PIF concepts . . 9
IF-THEN-ELSE – Conditional execution . . . . . 44
Data sources and structures . . . . . . . . 9
INCLUDE – Include code from other data sets or
IBM Workload Scheduler for z/OS PIF requests 11
members to be run . . . . . . . . . . . . 45
ITERATE – Proceed to the next iteration of current
Chapter 2. Running Workload loop . . . . . . . . . . . . . . . . . 46
Automation Programming Language . . 13 LEAVE – Exit the current loop . . . . . . . . 46
| Running Workload Automation Programming LOG – Echo information to the log . . . . . . 46
| Language in batch . . . . . . . . . . . . 14 MERGE – Merge SAVELIST output . . . . . . 47
| Running Workload Automation Programming NOACT – Peform no action . . . . . . . . . 47
| Language as a load module . . . . . . . . . 16 OPTIONS – Define run time options and PIF
Running Workload Automation Programming requests . . . . . . . . . . . . . . . 48
Language within an online TSO session . . . . . 19 OUTPUT – Define output record . . . . . . . 48
Running Workload Automation Programming Specifying output destinations . . . . . . . 50
Language on a started task workstation . . . . . 21 Setting additional fields . . . . . . . . . 50
Running Workload Automation Programming READ – Read an external file or the external data
Language as a console command . . . . . . . 23 queue . . . . . . . . . . . . . . . . 51
Specifying the subsystem . . . . . . . . . . 24 RETURN – Exit the subroutine . . . . . . . . 51
| Using OUTPUT statements . . . . . . . . . 25 SETMAX – Manipulate the maximum return code 51
Workload Automation Programming Language SETSEV – Set message severity . . . . . . . . 53
commands syntax . . . . . . . . . . . . 26 SHOW – Show diagnostic information . . . . . 53
Using comparators . . . . . . . . . . . 27 SHOW FILES – Display files allocated to
Setting dates and times . . . . . . . . . 27 Workload Automation Programming Language . 54
Termination, line numbers, and continuation . . 28 SHOW OBJECT – Display the object structure of
Inserting comments in a statement. . . . . . 29 an IBM Workload Scheduler for z/OS record . . 55
Special resource and user field names . . . . 30 SHOW OPTIONS – Display Workload
Special characters @, !, and # . . . . . . . 31 Automation Programming Language OPTIONS
Knowing resource names . . . . . . . . . 32 currently effective . . . . . . . . . . . 56
Variable substitution . . . . . . . . . . 32 SHOW RC – Display return codes . . . . . . 56
Using wildcards . . . . . . . . . . . . 33 SHOW SAVELIST – Display the contents of a
Controlling the processing within Workload SAVELIST . . . . . . . . . . . . . . 57
Automation Programming Language . . . . . . 34 SHOW SPE – Display active Small Product
Labeling Workload Automation Programming Enhancements . . . . . . . . . . . . 57
Language statements . . . . . . . . . . 34
iv IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
MODIFY LTOC – Long Term Plan Occurrence 104 FIND . . . . . . . . . . . . . . . . 128
MODIFY VIVL – CP Virtual workstation FORCE . . . . . . . . . . . . . . . 129
interval . . . . . . . . . . . . . . 104 HOLD. . . . . . . . . . . . . . . . 129
REPLACE . . . . . . . . . . . . . . 105 KILL . . . . . . . . . . . . . . . . 129
RESET – Resets pending changes to the plan . . . 105 NOP . . . . . . . . . . . . . . . . 130
SELECT – Retrieve a record or common segment 105 QUEUE_BEHIND . . . . . . . . . . . . 130
OBJECT Argument . . . . . . . . . . 107 RELEASE. . . . . . . . . . . . . . . 131
TAG Argument . . . . . . . . . . . . 107 REPLY. . . . . . . . . . . . . . . . 131
SELECT AD/ADCOM – Application Description 107 UNNOP . . . . . . . . . . . . . . . 132
SELECT AWSCL – All Workstations Closed . . 108
SELECT CL/CLCOM - Calendar . . . . . . 108 Chapter 7. Current Plan Occurrence
SELECT CPCOND/CPCONDCO – CP commands . . . . . . . . . . . . 133
Condition . . . . . . . . . . . . . 108
Common keywords . . . . . . . . . . . 133
SELECT CPOC – Current Plan Occurrence . . 108
ALTIF – Alter operations if specific criteria are true 133
SELECT CPOP/CPOPCOM – Current Plan
RUNIF – Run operations only if specific criteria are
Operation . . . . . . . . . . . . . 109
true . . . . . . . . . . . . . . . . 134
SELECT CPST – Current Plan Status. . . . . 110
SELECT CPUSRF – Current Plan Operation User
Fields . . . . . . . . . . . . . . . 110 Chapter 8. Function Based commands 139
SELECT CPWS/CPWSCOM – Current Plan ADD – Add applications or groups to the current
Workstation . . . . . . . . . . . . . 110 plan . . . . . . . . . . . . . . . . 139
SELECT CPWSV/CPWSVCOM – CP Virtual Usage notes for ONCE mode . . . . . . . 143
workstation destination . . . . . . . . . 111 Usage notes for REPEAT mode . . . . . . 143
SELECT CRITPATH – Critical Path . . . . . 111 Terminating repeating . . . . . . . . . 145
SELECT CSR/CSRCOM – Current Plan Special Persistent data . . . . . . . . . . . . 145
Resource . . . . . . . . . . . . . . 111 ADDJOB – Add job to the current plan . . . . . 146
SELECT ETT – Event Trigger . . . . . . . 112 CONSOLE – Issue z/OS console commands . . . 150
SELECT JCLPREP – JCL Preparation. . . . . 112 GETDATES – Generate a list of run dates from a
SELECT JCLPREPA – JCL Preparation run cycle rule . . . . . . . . . . . . . 151
simulation . . . . . . . . . . . . . 112 LISTJOB – List job attributes from the database . . 152
SELECT JCLV/JCLVCOM – JCL Variable Table 113 LISTSTAT – List Status of Current Plan Objects . . 155
SELECT JL/JLCOM – Job Log . . . . . . . 113 OBJECT . . . . . . . . . . . . . . 157
SELECT JS/JSCOM – Current Plan JCL . . . . 113 Performing SRSTAT actions with LISTSTAT . . 157
SELECT LTOC/LTOCCOM – Long Term Plan SENDMAIL – Send an email via z/OS SMTP. . . 159
Occurrence . . . . . . . . . . . . . 113 SENDMSG – Send a TSO message . . . . . . 160
SELECT OI/OICOM – Operator Instructions . . 114 WSALTER – Alter intervals on a workstations in
SELECT PR/PRCOM - Period . . . . . . . 114 the current plan . . . . . . . . . . . . 160
SELECT SR/SRCOM – Special Resource . . . 114
SELECT WS/WSCOM – Workstation . . . . 114 Chapter 9. Using TSO commands
SELECT WSV/WSVCOM – Virtual workstation within Workload Automation
destination . . . . . . . . . . . . . 114 Programming Language . . . . . . . 163
SETSTAT – Sets a Condition status . . . . . . 115 BACKUP – Initiate JCL or CP backup . . . . . 163
SETSTAT CPSIMP – Condition dependency . . 115 BULKDISC – Initiate Bulk Discovery . . . . . 163
TERM – Terminate IBM Workload Scheduler for JSUACT – Activate/Inactivate Job Submission . . 164
z/OS session . . . . . . . . . . . . . 116 OPINFO – Update Operation User field . . . . 164
OPSTAT – Set operation status . . . . . . . 164
Chapter 6. Current Plan Operation SRSTAT – Set special resource status . . . . . 164
commands . . . . . . . . . . . . 117 WSSTAT – Set workstation status. . . . . . . 164
Common syntax . . . . . . . . . . . . 117 Other TSO commands . . . . . . . . . . 164
Identification keywords . . . . . . . . . 117
Filter keywords. . . . . . . . . . . . 120 Chapter 10. Batch loader commands 165
Data keywords . . . . . . . . . . . . 121 Modes of operation . . . . . . . . . . . 165
Performance considerations. . . . . . . . 122 OPTIONS DBMODE . . . . . . . . . . 165
Relative date and variables . . . . . . . . 123 Batch loader ACTION . . . . . . . . . 166
Automatic detection of current state of Output masking . . . . . . . . . . . . 167
operation . . . . . . . . . . . . . . 123 Batch loader syntax enhancements . . . . . . 167
SAVELIST and USELIST . . . . . . . . . 124 SETDEFAULT behaviour in Workload
| Relationship to the EQQWXMOD WAPLEXEC 124 Automation Programming Language . . . . 170
ALTER . . . . . . . . . . . . . . . 124 Keyword abbreviation . . . . . . . . . 170
Managing split or inconsistent occurrences . . 126 Suffixing . . . . . . . . . . . . . . 171
BIND . . . . . . . . . . . . . . . . 128
Contents v
NEW_ keywords . . . . . . . . . . . 172 RGSTART – Run cycle group common details
AD – Application description record. . . . . . 172 (RGCOM segment) . . . . . . . . . . 213
Automatic Operation numbering . . . . . . 173 RGRUN – Run cycle group individual run cycle 214
Automatic dependencies . . . . . . . . 174 SR – Special Resource record . . . . . . . . 216
Submitting batch loader directly to the current SRSTART – Special Resource common details
plan . . . . . . . . . . . . . . . 175 (SRCOM segment). . . . . . . . . . . 217
ADSTART – Application common details . . . 176 SRDWS – Default workstation . . . . . . . 219
ADRUN – Run cycle . . . . . . . . . . 180 SRIVL - Interval . . . . . . . . . . . 219
ADRULE - Rule . . . . . . . . . . . 182 SRIWS – Connected workstations. . . . . . 220
ADOP - Operation . . . . . . . . . . 184 WS – Workstation record . . . . . . . . . 220
ADDEP - Dependency . . . . . . . . . 189 WSSTART – Workstation common details
ADXIV – External dependency interval. . . . 191 (WSCOM segment) . . . . . . . . . . 220
ADCNC – Condition . . . . . . . . . . 192 WSAM – Access Method . . . . . . . . 221
ADCNS – Conditional dependency . . . . . 192 WSSD – Specific date . . . . . . . . . . 222
ADCIV – External conditional dependency WSWD – Week day . . . . . . . . . . 222
interval . . . . . . . . . . . . . . 194 WSIVL – Interval details. . . . . . . . . 222
ADSR – Special Resource reference . . . . . 195 WSDEST – Virtual Workstation Destination . . 222
ADEXT – Extended information (ADOPEXT WSV – Virtual Workstation destination record . . 223
segment) . . . . . . . . . . . . . . 196 WSVSTART – Virtual Workstation (WSVCOM
ADRE – Remote job information . . . . . . 196 segment) . . . . . . . . . . . . . . 223
ADSAI – System Automation information WSVSD – Specific date . . . . . . . . . 224
(ADOPSAI segment) . . . . . . . . . . 197 WSVWD – Week day . . . . . . . . . . 224
ADUSF – User Field (ADUSRF segment) . . . 197 WSVIVL – Interval details . . . . . . . . 224
ADVDD – Variable durations and deadlines . . 198
AWSCL – All Workstations Closed record . . . . 198 Chapter 11. Variable substitution . . . 227
AWCSTART – All workstations closed . . . . 199 Variable naming convention . . . . . . . . 227
CL – Calendar record. . . . . . . . . . . 199 Variable value look up process . . . . . . . 227
CLSTART – Calendar common details (CLCOM Variable parsing rules . . . . . . . . . . 228
segment) . . . . . . . . . . . . . . 199 Variable resolution and REXX interpretation . . . 229
CLDATE – Specific date (CLSD segment) . . . 200 Object variables . . . . . . . . . . . . 230
CLDAY – Day of the week (CLWD segment) 200 SAVELIST as object variables . . . . . . . . 233
ETT – Event Trigger Record . . . . . . . . 201 VARDATE – Generate date and time values from
ETTSTART – Trigger definition . . . . . . 201 rule . . . . . . . . . . . . . . . . 234
JB – Ad-hoc in the current plan . . . . . . . 202 VARSAVE – Save variables in a JCL Variable Table 240
JBSTART – Application details. . . . . . . 203 VARSET – Set a Workload Automation
JBCIV and JBXIV – External dependency Programming Language variable . . . . . . . 241
selection criteria . . . . . . . . . . . 203 VARSUB – Control variable substitution . . . . 248
JBCNC and JBCNS – Conditional dependencies 203
JBDEP, JBPRE and JBSUC – Dependencies . . . 204
Chapter 12. Record processing. . . . 251
JBRUN and JBRULE - Run cycle and rule . . . 204
LIST-SELECT Common Segment vs Record . . . 251
JCLV – JCL Variable Table record . . . . . . . 204
| OUTPUT and LOADDEF . . . . . . . . 251
JCLVSTART – Variable table common details
(JCLVCOM segment) . . . . . . . . . . 204
JCLVVAR – Variable details. . . . . . . . 205 Appendix A. Resource reference . . . 253
JCLVDEP – Dependent value pair . . . . . 207 Alternative resource names . . . . . . . . . 253
JS – Current Plan JCL record . . . . . . . . 207 OUTPUT field definition reference . . . . . . 254
JSSTART behaviour . . . . . . . . . . 208 Setting additional fields . . . . . . . . . . 283
JSSTART – Current Plan JCL entry (JSCOM Reserved fields . . . . . . . . . . . . 284
segment) . . . . . . . . . . . . . . 208 Composite fields . . . . . . . . . . . 284
JST – Line of JCL (JST field of JSCOM) . . . . 209 Raw and untranslated fields . . . . . . . 284
OI – Operator Instruction record . . . . . . . 209
OISTART – Period common details (PRCOM Appendix B. OPTIONS keywords . . . 285
segment) . . . . . . . . . . . . . . 209 ACTION – See DBMODE . . . . . . . . . 285
OIT – Line of Text (OIT field of OICOM) . . . 211 ADOICHK – Consistency check . . . . . . . 285
PR – Period record . . . . . . . . . . . 211 ADPFX – Prefix for dynamically created
PRSTART – Period common details (PRCOM applications . . . . . . . . . . . . . . 285
segment) . . . . . . . . . . . . . . 211 ADSFX – Suffix for dynamically created
PRDATE – Interval (PRTAB field of PRCOM) 212 applications . . . . . . . . . . . . . . 285
Automatic Interval generation . . . . . . . 212 ADVALFROM – Valid From generation . . . . 285
RG – Run cycle group record . . . . . . . . 213 ADVERS – Application versioning . . . . . . 285
vi IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
ADWS – Workstation for dynamically submitted INCLEVEL – Message level for INCLUDE
jobs . . . . . . . . . . . . . . . . 286 statements . . . . . . . . . . . . . . 298
BLSTYLE – Style of Batch Loader output . . . . 286 INPUT – Command input DD statement . . . . 298
CALENDAR – Set default calendar name . . . . 286 JSFILE – DD name of input JCL for JSSTART . . . 299
CHARAT – Set the at sign (@) for object variables 286 LABELSEP – ILSON label separator . . . . . . 299
CHARBANG – Set the exclamation mark (!) for LAST – Last logical operation . . . . . . . . 299
default variable prefix . . . . . . . . . . 286 LIMIT – Unconstrained loop limit . . . . . . 299
CHARHASH – Set the number sign (#) for count LOADER – Batch Loader output destination . . . 299
object field and ENVATTR . . . . . . . . . 287 LTDEPR – Long Term Plan dependency resolution 300
CHARMAIL – Set the at sign (@) for email MAILDD – DD name of input text for SENDMAIL 300
addresses. . . . . . . . . . . . . . . 287 MAILFROM – Email address of mail sender . . . 300
CHECK – Application integrity . . . . . . . 288 MAILSERVER – Domain name of the mail server 300
COMMIT – File output caching . . . . . . . 288 MAILSMTP – DD name of SMTP output . . . . 300
COMPSUCC – Set the default values for the MEMORY – Memory usage . . . . . . . . 300
ADDJOB and JBSTART commands . . . . . . 288 MSGLEVEL – Output message level . . . . . . 300
CONINFO – Information level IEExxxI message OIFILE – DD name of input text for OISTART . . 301
numbers . . . . . . . . . . . . . . . 288 OPID – Identify controlling operation . . . . . 301
CONNAME – MCS console name . . . . . . 288 OPMSG – Send messages to console. . . . . . 301
CONWAIT – Wait timing for response messages 289 OUTMASK – Output mask . . . . . . . . . 301
CONWARN – Warning level IEExxxI message OVERWRITE – Whether to overwrite an object
numbers . . . . . . . . . . . . . . . 289 during rename . . . . . . . . . . . . . 302
CONTENTION – Retry limits . . . . . . . . 289 OWNER – Owner ID for tables created by VAR*
CPDEPR – Current Plan dependency resolution 289 commands . . . . . . . . . . . . . . 302
CPFAIL – How to handle Current Plan PGMPIF – Program to use for IBM Workload
modification failure . . . . . . . . . . . 290 Scheduler for z/OS communication . . . . . . 302
DATE – Workload Automation Programming PGMSTOR – Program to use to manage storage 302
Language internal date . . . . . . . . . . 290 PGMWAIT – Program to use to wait . . . . . 302
DATA – ILSON data destination . . . . . . . 291 POSTPROC – Post process external data queue . . 302
DBMODE – Mode of operation for database PREMPTY – Action to take when creating period
updates . . . . . . . . . . . . . . . 291 with DATELIST and ADID . . . . . . . . . 303
DECODE – Determine which fields to decode . . 291 REPORT – Report output width . . . . . . . 303
DELAY – Post update delay specification . . . . 291 RETMSG <unavailable option> . . . . . . . 303
DELAYCMD – Commands to wait after . . . . 291 RETMSGID <unavailable option> . . . . . . 303
DELETE – Automatic delete processing. . . . . 292 RUNIF – Set defaults for conditional execution . . 303
DELFILE – File to write deferred DELETE to . . . 292 RUNSTAT – Alter run cycle status . . . . . . 304
DLM – End of instream data delimiter . . . . . 292 SENDDATA – Output ILSON data . . . . . . 304
DROP – Circumvent occurrence split for ALTER SENDLOADER – Output Batch Loader . . . . . 305
DROPSUCC/PRED . . . . . . . . . . . 292 SELECT – Automatic selection. . . . . . . . 305
DUPAUTO – Allow automatic SELECT statements SETMAX – Influence default SETMAX behaviour 305
to output duplicates . . . . . . . . . . . 293 SETUP – Default SETUP attribute for Workload
DURUNIT – Duration unit for Batch Loader . . . 293 Automation Programming Language variables
DYNATTR – Set attributes for dynamic log . . . 293 when saved . . . . . . . . . . . . . . 305
DYNLOG – Create a dynamic copy of the SEVERITY – Message severity levels. . . . . . 305
Workload Automation Programming Language log . 294 SILENT – Silent running . . . . . . . . . 306
EXECUTE – Automatic Current Plan EXECUTE 294 SHOWDFLT – Show values that are set to defaults 306
EXPAND – LIST related objects . . . . . . . 294 SHOWKEYS – Display key information . . . . 306
FAIL – Action to take with return codes . . . . 295 SPE – Small Product Enhancements . . . . . . 306
FASTPATH – Current Plan search option . . . . 296 STOPRC – Return code to terminate processing 307
FIELDSEP – ILSON field separator . . . . . . 296 STRIP – Remove trailing blanks and leading zeroes 307
FILESPEC – File Specification DD statement . . . 296 SUBSYS – Input file for controller options . . . . 307
FIRST – Logical First operation . . . . . . . 296 SUFFIX – Object name suffixing . . . . . . . 308
FREEMAX – Maximum number of consecutive free SUPMSG – Message suppression . . . . . . . 308
days to skip . . . . . . . . . . . . . . 297 SYNTAX – Legacy syntax compatibility . . . . 308
GTABLE – Default Global Table . . . . . . . 297 SYSID – Tracker lookup method . . . . . . . 309
HIGHRC – Highest accessible return code . . . . 297 TAGMODE – Set automatic tagging . . . . . . 309
IFCMD – Default step to consider for command TAGMASK – Set tagging mask . . . . . . . 309
return code checking . . . . . . . . . . . 297 TEMPFILE – DD name of temporary library
IFJCL – Default step to consider for JCL step return allocation . . . . . . . . . . . . . . . 310
code checking . . . . . . . . . . . . . 297 TIME – Workload Automation Programming
IGNORE – Default value for ADDJOB IGNORE Language internal time . . . . . . . . . . 310
keyword . . . . . . . . . . . . . . . 298 TRACE – Perform interface tracing . . . . . . 311
Contents vii
TRACKERS – Tracker lookup . . . . . . . . 311 | Running the command . . . . . . . . . 332
UPDATE – Default value for UPDATE keyword 312 Combining EQQWXHTM with other processes 333
VARNAMES – Special characters to allow in EQQWXIAX – Input Arrival Cross Reference . . . 337
variable names . . . . . . . . . . . . . 312 Function . . . . . . . . . . . . . . 337
VERADGRD – Verify groups exist . . . . . . 312 Process control . . . . . . . . . . . . 338
VERSION – IBM Workload Scheduler for z/OS Running the command . . . . . . . . . 339
version . . . . . . . . . . . . . . . 312 EQQWXJBU – Update applications for a job . . . 339
VERSRWSN – Verify workstations . . . . . . 312 Function . . . . . . . . . . . . . . 339
| XMBLK – Whether to return a message control Process control . . . . . . . . . . . . 340
| block . . . . . . . . . . . . . . . . 313 | Running the command . . . . . . . . . 342
| XMSEV – Severity of messages to return in a EQQWXNOE – Protecting against unconnected
| message control block . . . . . . . . . . 313 applications . . . . . . . . . . . . . . 342
Function . . . . . . . . . . . . . . 342
Appendix C. Workload Automation Process control . . . . . . . . . . . . 343
Programming Language variables . . 315 Running the command . . . . . . . . . 343
EQQWXPER – Generate week number variables
Job level variables . . . . . . . . . . . . 315
for a period . . . . . . . . . . . . . . 343
Occurrence level variables . . . . . . . . . 315
Function . . . . . . . . . . . . . . 343
Operation level variables . . . . . . . . . 317
Process control . . . . . . . . . . . . 344
Current variables . . . . . . . . . . . . 318
Subsystem variables . . . . . . . . . . . 319
| Running the command . . . . . . . . . 345
viii IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Figures
1. Example of two automatic relinking scenarios 127 3. Run dates for year 2015 . . . . . . . . 337
2. US calendar for 2015 . . . . . . . . . 335
xii IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
About this publication
IBM® Workload Automation Programming Language for z/OS: User's Guide and
Reference shows you how to use the Workload Automation Programming Language
to easily access the features of the IBM Workload Scheduler for z/OS
programming interface (PIF).
This guide is part of a set of guides that allows you to program many aspects of
working with the products in the IBM Workload Automation family. These guides
comprise:
v IBM Workload Automation: Developer's Guide: Driving IBM Workload Scheduler for
z/OS
v IBM Workload Automation: Developer's Guide: Driving IBM Workload Automation
v IBM Workload Automation: Developer's Guide: Extending IBM Workload Automation
Note: If you control your z/OS® controller using Dynamic Workload Console,
information about the programming interfaces that you can use with the Dynamic
Workload Console are available in both of the other Developer's Guides in the set.
Accessibility
Accessibility features help users with a physical disability, such as restricted
mobility or limited vision, to use software products successfully.
With this product, you can use assistive technologies to hear and navigate the
interface. You can also use the keyboard instead of the mouse to operate all
features of the graphical user interface.
For full information, see the Accessibility Appendix in the IBM Workload Scheduler
User's Guide and Reference.
Technical training
Cloud & Smarter Infrastructure provides technical training.
Support information
IBM provides several ways for you to obtain support when you encounter a
problem.
If you have a problem with your IBM software, you want to resolve it quickly. IBM
provides the following ways for you to obtain the support you need:
v Searching knowledge bases: You can search across a large collection of known
problems and workarounds, Technotes, and other information.
v Obtaining fixes: You can locate the latest fixes that are already available for your
product.
For more information about these three ways of resolving problems, see the
appendix about support information in IBM Workload Scheduler: Troubleshooting
Guide.
The publication uses several typeface conventions for special terms and actions.
Technical changes to the text are indicated by a vertical line to the left of the
change. These conventions have the following meanings:
xiv IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Chapter 1. Overview
The Workload Automation Programming Language is a programming language
that provides you with easy access to the features of the IBM Workload Scheduler
for z/OS Program Interface (PIF).
Workload Automation Programming Language gives you full access to all the PIF
commands in an easy-to-use syntax, as well as a Batch Loader feature for all
elements of the database. Extended PIF commands perform more complex
functions from a single statement, such as determining the status of elements, and
access to the IBM Workload Scheduler for z/OS TSO commands from within the
same command stream.
| After installing APAR PI79321, you can call Workload Automation Programming
| Language in the following ways:
| v As a stand-alone batch job calling the main compiled REXX EXEC entry point
| EQQYXTOP with commands passed as SYSIN. The JCL procedure EQQYXJPX is
| provided for this purpose.
| v As a batch job, called from your own REXX routines calling the main compiled
| REXX EXEC entry point EQQYXTOP, passing commands, and receiving output
| through the REXX stack. The JCL procedure EQQYXJPX is provided for this
| purpose.
| v As a started-task workstation operation, passing the commands through
| operation user fields. Samples EQQWCMD1 and EQQWCMD2 are provided to
| set up started-task workstation operations.
| v As a load module, named EQQWAPL, with commands passed either through
| SYSIN or using a control block created by a calling program. The JCL procedure
| EQQYXJPL is provided for this purpose. Online within TSO as part of a dialog
| process, calling the main compiled REXX EXEC entry point EQQYXTOP, passing
| commands, and receiving output through the REXX stack. Samples EQQWTS*
| are provided to set up calling WAPL from within TSO dialogs.
| Note: The load module EQQWAPL runs without a TSO environment, therefore not
| all the commands and options are available to it. For details about the limitations,
| see “Running Workload Automation Programming Language as a load module” on
| page 16.
Some of the unsupported features are still provided with the product, but are not
documented. Others are not provided, but can still be downloaded from the
z/Glue community website.
2 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
The SUBSYSTEM specific input stream, set by OPTIONS SUBSYS
It is no longer supported because subsystem-specific options can now be
set in the default options member by using the ZSUBSYS variable and IF
statements.
EQQYXPRC procedure
The EQQYXPRC procedure that allows ISV product steps to be run in
parallel with Workload Automation Programming Language commands is
part of migration processing, therefore is not provided with Workload
Automation Programming Language nor supported.
| SEQQWAPL and WAPLEXEC member names
| The PARM members of the Scheduling Operational Environment have
| been moved into a library called SEQQWAPL. As official product delivery
| enforces a member naming prefix of EQQ for delivery, all of these
| members have been renamed. The sample job EQQWPLCO will create
| copies of the new members under the original name. The remaining
| WAPLEXEC programs have also been renamed; for details, see
| Appendix D, “WAPLEXEC programs,” on page 321. The original SOEEXEC
| library can still be used with Workload Automation Programming
| Language under the original names.
Note: The ILSON utility to convert IBM Workload Scheduler for z/OS data to ISPF
tables is not documented or supported as part of Workload Automation
Programming Language.
Version compatibility
Workload Automation Programming Language is compatible with IBM Workload
Scheduler for z/OS from version 8.1 to version 9.3.
You can specify the version to operate as by appending the version to the
subsystem name with a hyphen when you call EQQYXTOP, for example
SUBSYS='OPCA-930'. Otherwise Workload Automation Programming Language
loads support for the latest version that was generally available at the time it was
released.
You can change the version during a session with the OPTIONS VERSION statement,
which causes the operating mode to be initialized again. This would allow you to
perform some complex actions, for example, performing some V9.3 specific actions
with a V9.3 controller, and then later generating some V9.2-compatible output
within the same session from a V9.3 controller.
The version itself can be specified in a variety of formats, for example 9.3, 930,
V930, 9.3.0, or V9R3M0. If you use one of these formats as part of your naming
Chapter 1. Overview 3
convention for IBM Workload Scheduler for z/OS data sets, such as your message
library or load library, then you will be able to use the &VER symbol in the
EQQYXJPX procedure to form part of the names.
There is a special case of * that you can use either as VER=* from the JCL (only if
you are not using it in data set names), or as OPTIONS VERSION(*). This causes
Workload Automation Programming Language to start up using the latest
supported version available, but when it is connected to an IBM Workload
Scheduler for z/OS subsystem it will detect what version the subsystem is using
and automatically switch to that version.
| As well as major versions of the product, some new features could be released
| between versions by applying PTFs. When this occurs, module EQQYXTOP is
| given a new modification (MOD) level, as shown in the EQQB001I message at the
| beginning of the Workload Automation Programming Language log. The MOD
| level is shown after the version as a plus sign (+) followed by 3 digits:
| EQQI001I ADCDMST1,JOB06592 Starting WAPL v9.3 +001
| To select the MOD level from JCL use the MOD symbolic parameter in the JCL, as
| shown in the following example:
| //RUNWAPL EXEC EQQYXJCL,
| // VER=’V930’
| // MOD=’+000’
| During the rollout of a version upgrade, there could be times when you have
| controllers operating at different levels of code. You can manage this by issuing
| OPTIONS VERSION statements in your site default member, according to the
| controller you are using, as shown in the following example:
| VARSUB SCAN
| IF !ZSUBSYS = "WSMC" THEN
| OPTIONS VERSION(V930+001)
| IF !ZSUBSYS = "WSLC" THEN
| OPTIONS VERSION(V920)
4 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Small product enhancements
| Before Workload Automation Programming Language V9.3, new features were
| controlled within the Scheduling Operational Environment (SOE), the sample
| utility that preceded Workload Automation Programming Language, using the
| OPTIONS SPE keyword. To maintain compatibility with previous SOE code, when
| using Workload Automation Programming Language with any releases earlier than
| V9.3, the same SPE mechanism is used.
Although there is no IBM Workload Scheduler for z/OS version 8.4, because the
following version is 8.5, setting a version 8.4 within Workload Automation
Programming Language allows you to use all post version 8.3 SPEs that were
released before version 8.5.
To turn on an SPE delivered feature use OPTIONS SPE, as in the following example:
OPTIONS SPE(WLM,PEND)
To turn off an SPE delivered feature, turned on earlier in the session use OPTIONS
SPE; for example, OPTIONS SPE(WLM=N).
Any options added to an earlier version by SPE are automatically included in later
versions. Therefore WLM, PEND, and SA are automatically included in version 8.3
and later, JCLV and VIWS are automatically included in version 8.5 and later.
Using OPTIONS SPE to turn on an SPE that is automatically available for that release
is ignored. Using OPTIONS SPE to turn on an SPE that is not eligible for use with
the version of IBM Workload Scheduler you are running, generates an error.
Note: If you use the OPTIONS SUBSYS keyword to create subsystem-specific OPTIONS
members, the SPE keyword must be maintained within these members, because the
relevant enhancements are installed on each subsystem.
Chapter 1. Overview 5
| Setting up the Workload Automation Programming Language
| environment
| If you run a version of SOE or Workload Automation Programming Language JCL
| that refers to SEQQWAPL members without the EQQ prefix, ensure that you set
| up the environment by running the EQQWPLCO sample job.
| Note:
| 1. When you run Workload Automation Programming Language jobs under the
| control of current plan, to enable the use of Workload Automation
| Programming Language occurrence variables, or of the == short form, ensure
| that you run the WAPL job with a user ID that has read access to the CP
| occurrence or operation controlling the job. Otherwise, a message similar to the
| following might be issued:
| EQQI012A Job ZUSRDH1W,JOB02218 is external to IWS
| 2. To use Operation User fields to contain Workload Automation Programming
| Language commands, ensure that you run the job with a user ID that has read
| access to the CP occurrence or operation controlling the job, and read access to
| the user fields containing the commands. Otherwise, a message similar to the
| following might be issued:
| EQQI145E No user fields match EQQ-SYN-*
| 3. To ensure accurate use of queries for input arrival, set CWBASE (century
| window base) and HIGHDATE to 00 and 711231, respectively (these are the
| default values). If CWBASE and HIGHDATE are set to values different than the
| defaults, any queries against input arrival fields fail. If the EQQCPOP DD
| statement is used together with the supplied variable &OYMD1, Workload
| Automation Programming Language cannot locate itself in the current plan,
| message EQQI012A is issued, and the supplied occurrence variables or user
| fields are not accessed.
| For details about the settings of CWBASE and HIGHDATE in the INIT
| statement, see Customization and Tuning.
| 4. When you use Workload Automation Programming Language, do not set
| DATINT to YES in the INIT statement of EQQYPARM. This setting would
| create a lock conflict when performing OPTIONS DBMODE(UPDATE) or OPTIONS
| DBMODE(COPY), and data could get lost.
|
Language support
Command syntax is in English, but output messages might be displayed in other
languages in later releases.
The language can be selected by the LANG symbolic parameter in the JCL.
Command language
The WAPL command language is a combination of Workload Automation
Programming Language core commands, Data Access commands (native PIF
requests), Current Plan Operation commands, Function Based commands
(extended PIF requests), IBM Workload Scheduler for z/OS TSO commands, and
Batch Loader. The syntax uses the same conventions for all commands, which is
easy to learn and to use.
6 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Commands can be passed to Workload Automation Programming Language in
many ways. Workload Automation Programming Language reads commands from
the following input streams, in the following order:
| 1. EQQOPTS. You can use the optional EQQOPTS DD statement to set the
| defaults for your environment when Workload Automation Programming
| Language starts. If you define an EQQOPTS DD statement, it is read and run
| before any other statements. Although EQQOPTS is intended to run OPTIONS
| statements, you can use it to run any command; therefore you can decide to set
| the OPTIONS and variables specific to the LPAR where the job is running.
| 2. The ARG= symbolic parameter in the JCL. This only passes keywords for an
| OPTIONS statement. There are some immediate OPTIONS that can be specified
| only as an argument, these take effect as Workload Automation Programming
| Language starts and are not valid in OPTIONS statements elsewhere. This allows
| Site and Subsystems to be overridden at Workload Automation Programming
| Language startup in the program call or JCL.
| 3. EQQFILE. You can use the optional EQQFILE DD statement to set the default
| file specifications for all your output files. Use of this DD statement is
| deprecated, use of the LOADDEF statement in the command stream is
| recommended instead. The SEQQWAPL library contains an assortment of
| predefined members that can be used to load groups of OUTPUT statements. The
| EQQFLALL member loads OUTPUT statements for every segment; the LOADDEF
| equivalent of this is LOADDEF *. The name of the DD statement can be
| overridden by OPTIONS FILESPEC(<dd>).
| 4. External data queue. If data is detected on the external data queue (REXX
| stack) it is read as command input. If you use the INPUT keyword to pass a
| control block address in a previous input stream, the contents of the control
| block are added to the external data queue at this point, before it starts reading.
| It processes only what is in the external data queue at the time it starts reading;
| any lines added during the processing of the commands are not read at this
| stage.
| 5. SYSIN. Use this optional DD statement to specify the commands for the session
| you are running. By default, the DD name for this input source is called SYSIN
| in batch, and INPUT when processed in the foreground, but you can set an
| alternative name with the OPTIONS INPUT(<ddname>) statement specified in any
| of the previous input sources.
| 6. Post Processing. If OPTIONS POSTPROC(YES) is set, any further content of the
| external data queue will be processed at this point. The queue will be
| processed until it is empty, so any additional lines created whilst processing the
| queue will also be read.
Although there are many different streams through which you can specify
command input, these are intended to let you separate your statements into
standardized and reusable blocks. You can specify all your command input in one
simple single stream, making it simple to see exactly what you are asking
Workload Automation Programming Language to do in one place.
Note:
1. Each input stream is parsed in its entirety before any statement within it is run,
therefore any OPTIONS statement that has an impact on syntax does not take
effect until the start of the next input stream.
2. You must specify any syntax options in the OPTIONS or ARG streams.
3. You can set any subsystem-specific options in the OPTIONS stream by using the
ZSUBSYS variable and IF statements.
Chapter 1. Overview 7
4. If EQQYXTOP is being executed in foreground mode (rather than batch), a
command source is not read if it is referring to the SYSIN DD statement,
because this could lead to the program stalling if SYSIN is left allocated to the
terminal.
Output files
| By default, Workload Automation Programming Language does not generate any
| output from a LIST or SELECT command. To generate an output, you must specify
| OUTPUT statements to define the segments and fields to be extract.
| Use the OUTPUT statement to define what records you want to extract, and in what
| format. This statement defines also where the output is sent.
Batch loader
Workload Automation Programming Language can extract all IBM Workload
Scheduler for z/OS database objects and Current Plan JCL into a Batch Loader
format.
8 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
The output can be complete batch loader, containing every complete field,
including the spaces. If you use OPTIONS STRIP(Y) and SHOWDFLT(N) the leading
zeroes, trailing spaces, and the keywords set to their default values, are removed.
| The following example shows how to generate compact Batch Loader for today's
| version of an application:
| OPTIONS STRIP(Y) SHOWDFLT(N)
| LOADDEF AD* DATA(-)
| LIST ADCOM ADID(MYAPPL) VALID(=) SELECT(Y)
You can make the Batch Loader format compatible with EQQYLTOP for
Application Definitions and Operator instructions by using OPTIONS
SYNTAX(LEGACY); it uses similar constructs for all other objects. You can then use
this Batch Loader as input commands to Workload Automation Programming
Language to re-create these objects within IBM Workload Scheduler for z/OS.
Use the OUTPUT statements to influence what keywords appear in Batch Loader
statements generated from the database. Use the TRANSLATE command to transform
fields based on rules, to perform lifecycle management of database objects.
You can interchange Batch Loader and Command Language in the same step, in
any sequence you like, the only consideration being that you cannot place
Command Language statements within the scope of Batch Loader statements for
any individual IBM Workload Scheduler for z/OS object.
Despite the different sources, the data follows the same basic rules.
Each entity in IBM Workload Scheduler for z/OS is represented by a single record;
for example, an Application record, an ETT rule record, and a Calendar record. The
record is formatted into one or more Segments.
The IBM Workload Scheduler for z/OS record structure is hierarchical, this means
that the segments are ordered in parent-child relationships. Hence, an operation’s
child segments follow their parent operation segment and precede the next
operation segment.
Every multi-segment object always begins with a Common Segment that defines
the key and high level information about the object. The easiest way to visualize
what is in the Common Segment is to think about what information appears in the
non-scrollable portion of the first panel you see when you browse an object.
The following example shows the logical layout of the AD record (either an
application or job stream). An AD record could be a sequence of segments:
10 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
ADCOM ADRUN ADRULE ADRUN ADRULE ADOP ADOP ADDEP ADSR ADSR ADOP ADDEP
When the programming interface retrieves a record it presents a header that lists
each segment name and the offset to where the segment starts. Workload
Automation Programming Language automatically processes the header and
decodes each segment in turn, allowing you to decide the segments to be
processed. If you want to use a Segment Processing Exit, the exit is automatically
called for every segment you referenced with the OUTPUT statement.
Use the SHOW OBJECT command to understand the structure of any IBM Workload
Scheduler for z/OS object.
For example, the SHOW OBJECT(CL) command shows all the available object
variables for a calendar with -n- showing where sequence numbers fit into the
syntax:
08/22 10.47.39 EQQI200I SHOW OBJECT(CL)
08/22 10.47.39 EQQI601A Object: @OBJ-CLNAME
08/22 10.47.39 EQQI601A Object: @OBJ-CLDAYS
08/22 10.47.39 EQQI601A Object: @OBJ-CLSHIFT
08/22 10.47.39 EQQI601A Object: @OBJ-CLDESC
08/22 10.47.39 EQQI601A Object: @OBJ-CLVERS
08/22 10.47.39 EQQI601A Object: @OBJ-CLLDATE
08/22 10.47.39 EQQI601A Object: @OBJ-CLLTIME
08/22 10.47.39 EQQI601A Object: @OBJ-CLLUSER
08/22 10.47.39 EQQI601A Object: @OBJ-CLLUTS
08/22 10.47.39 EQQI601A Object: @OBJ-#CLSD
08/22 10.47.39 EQQI601A Object: @OBJ-CLSD-n-CLSDDATE
08/22 10.47.39 EQQI601A Object: @OBJ-CLSD-n-CLSDSTAT
08/22 10.47.39 EQQI601A Object: @OBJ-CLSD-n-CLSDDESC
08/22 10.47.39 EQQI601A Object: @OBJ-#CLWD
08/22 10.47.39 EQQI601A Object: @OBJ-CLWD-n-CLWDDAY
08/22 10.47.39 EQQI601A Object: @OBJ-CLWD-n-CLWDNUM
08/22 10.47.39 EQQI601A Object: @OBJ-CLWD-n-CLWDSTAT
08/22 10.47.39 EQQI601A Object: @OBJ-CLWD-n-CLWDDESC
08/22 10.47.39 EQQI299I Statement completed - RC=0 (00000014)
Chapter 1. Overview 11
Table 2. IBM Workload Scheduler for z/OS PIF requests (continued)
Request Read/Write Acts upon Purpose
RESET Current Plan Abandons updates to
the Current Plan
SELECT READ Database and Plans Reads a single record
SETSTAT WRITE Current Plan Changes a condition
status
TERM Terminates a session
with a controller
INIT and TERM requests are done for you automatically, though you can do your
own INIT and TERM requests many times in a Workload Automation Programming
Language session to communicate with different controllers.
For the requests that directly read or write data, you must specify enough of an
item key to uniquely identify a single object, with the exception of LIST. The LIST
statement is used to find records. From the returned LIST you can derive the
unique key for every object found, against which you could then take an action
(for example, SELECT, DELETE, MODIFY).
LIST requests are always performed against the Common Segment. However,
SELECT requests can be performed against the entire record, to retrieve all the
segments or just the common segment.
The requests that write data work in one of the following ways:
v Database updates are performed by creating the whole record in storage before
sending it to IBM Workload Scheduler for z/OS. Database updates are handled
in Workload Automation Programming Language by Batch Loader constructs.
v Plan updates are performed by using keywords with the MODIFY or INSERT
instructions to alter the values of fields within the object. Plan updates are
handled in Workload Automation Programming Language by commands.
12 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Chapter 2. Running Workload Automation Programming
Language
You can run Workload Automation Programming Language as a batch job by using
the compiled REXX exec, as a load module, online within a TSO session, as a
started task workstation, or as a console command.
You can run Workload Automation Programming Language with the following
methods:
EQQYXTOP
Use this compiled REXX EXEC in batch or online TSO. It can be called by
other REXX EXEC programs and receive commands through the REXX
stack. It can also send data to calling EXEC programs through the REXX
stack. The EQQYXJPX procedure is provided to execute EQQYXTOP.
This should be the primary method to run Workload Automation
Programming Language.
EQQWAPL
Use this load module in batch, or call it from other load modules.
Commands are passed through a control block and data is received by a
control block. The load module does not create an internal TSO
environment, so some commands and options are not available. The
EQQYXJPL procedure is provided to execute EQQWAPL.
14 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
| //RUNWAPL EXEC EQQYXJPX,
| // SUBSYS=WSMC
| //SYSIN DD *
| ADD ADID(ADHOC)
| Set the ARGS symbolic parameters to specify the OPTIONS keywords rather than
| including them in SYSIN, as shown in the following example. In this way, the
| OPTIONS are influenced directly in JCL, rather than within SYSIN data sets.
| //RUNWAPL EXEC EQQYXJPX,
| // ARGS=’STRIP(Y) SHOWDFLT(N) SELECT(Y)’,
| // SUBSYS=WSMC
| //MYDATA DD SYSOUT=*,LRECL=1024
| For jobs that are submitted by the controller or tracker, you can be more efficient in
| identifying the controlling occurrence by passing the details directly from supplied
| JCL tailoring variables, using the EQQCPOP DD statement, as shown in the
| following example:
| //RUNWAPL EXEC EQQYXJPX,
| // SUBSYS=WSMC
| //SYSIN DD *
| ADD ADID(ADHOC)
| /*
| //*%OPC SCAN
| //EQQCPOP DD *
| &OADID. &OYMD1.&OHHMM. &OOPNO
|
| 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.
| 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.
| To call the load module version from JCL, use the EQQYXJPL procedure. This
| procedure is similar to EQQYXJPX, but it is set to run the load module instead of a
| compiled EXEC. Other than the name of the procedure, running Workload
| Automation Programming Language as a load module is the same as running the
| EXEC. Within the procedure the differences are:
| v IKJEFT01 is not run to establish a TSO environment.
16 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
| v The CMD symbolic points directly to the load module to execute (default
| EQQWAPL).
| v The SYSPROC and SYSTSPRT DD statements are omitted.
| The following example shows a simple WAPL step to add an application to the
| plan using the load module version of Workload Automation Programming
| Language:
| //RUNWAPL EXEC EQQYXJPL,
| // SUBSYS=WSMC
| //SYSIN DD *
| ADDJOB ADID(ADHOC)
| You can pass commands to EQQWAPL through an ordinary SYSIN, but when
| EQQWAPL is called by another load module, commands are passed through a
| control block. Create the WPLI command control block as follows:
| Table 4. WPLI command control block
| Offset Offset
| (dec) (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.
|
| WPLI:
| START ADDRESS: 0000CAA0 LENGTH: 0xFC
| 00112233 44556677 8899AABB CCDDEEFF -0123456789ABCDEF-
| 000000 00000003 00000000 00000000 D6D7E3C9 *... ........OPTI*
| 000010 D6D5E240 E2E3D9C9 D74DE85D 40E2C8D6 *ONS STRIP(Y) SHO*
| 000020 E6C4C6D3 E34DD55D 40404040 40404040 *WDFLT(N) *
| 000030 40404040 40404040 40404040 40404040 * *
| 000040 40404040 40404040 40404040 40404040 * *
| 000050 40404040 40404040 40404040 D3D6C1C4 * LOAD*
| 000060 C4C5C640 C1C45C40 C4C1E3C1 4D605D40 *DEF AD* DATA(-) *
| 000070 D3D6C1C4 C5D94D5C 5D404040 40404040 *LOADER(*) *
| 000080 40404040 40404040 40404040 40404040 * *
| 000090 40404040 40404040 40404040 40404040 * *
| 0000A0 40404040 40404040 40404040 E2C5D3C5 * SELE*
| 0000B0 C3E340C1 C440C1C4 C9C44DC4 C1C9D3E8 *CT AD ADID(DAILY*
| 0000C0 D7D3C1D5 D5C9D5C7 5D404040 40404040 *PLANNING) *
| 0000D0 40404040 40404040 40404040 40404040 * *
| 0000E0 40404040 40404040 40404040 40404040 * *
| 0000F0 40404040 40404040 40404040
| 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.
18 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
|
| 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.
| 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.
Note: Ensure that the appropriate level of the IBM Workload Scheduler for z/OS
load library is in the execution path, either through the link list or a STEPLIB
statement.
EQQMLIB
The IBM Workload Scheduler for z/OS message library. If Workload
Automation Programming Language is being run from within IBM
Workload Scheduler for z/OS dialogs, this file is already allocated.
EQQMLOG
The IBM Workload Scheduler for z/OS message log.
| EQQOPTS
| Optional file to provide environment default options. Allocate this file only
| if you want to set environment defaults before any commands that the
| process will run. For online performance reasons, to prevent additional
| dynamic allocations, it is more efficient to include any relevant statements
| in the main command stream.
To allocate the files, you can use one of the following ways:
v Within the TSO logon procedure.
v Within a startup CLIST or REXX, called as part of the TSO logon process.
Note: If you use mechanisms that free the files on exit, ensure that you do not
design a process that would cause problems for other applications running in ISPF,
in particular where split screen is needed.
When run within TSO, the INPUT stream is read from a file called INPUT.
Workload Automation Programming Language does not read from a file called
SYSIN to prevent the risk of stalling if SYSIN was left allocated to the terminal,
which is the default position of SYSIN in the foreground. Alternatively, input can
be placed on the REXX stack before calling Workload Automation Programming
Language by passing an option of INPUT(-OFF-); commands are read directly from
the stack without having to allocate an input file to pass the commands.
The EQQJOBS process creates some examples in the EQQJOBS output file that you
can use, and optionally customize, as a basis to run Workload Automation
Programming Language online:
EQQWTSO1
Shows how to define a Workload Automation Programming Language
environment, run a complete Workload Automation Programming
Language process, and reset the environment in a single member.
EQQWTSO2
Shows how to run a complete Workload Automation Programming
Language process in a single member, having the environment already set
up.
EQQWTSO3
Shows a generic Workload Automation Programming Language execution
member that defines a Workload Automation Programming Language
environment, calls Workload Automation Programming Language with
commands queued before this member is called, and then resets the
environment without processing any output.
EQQWTSO4
Shows a generic Workload Automation Programming Language execution
member that assumes that a Workload Automation Programming
Language environment has already been defined, calls Workload
Automation Programming Language with commands queued before this
member is called, and then exits, leaving the calling member to process
any output.
EQQWTSX3
Is an example of a process queueing commands to the stack before calling
20 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
EQQWTSO3, which manages the Workload Automation Programming
Language environment setup, and then processes the output when
EQQWTSO3 completes.
EQQWTSX4
Is an example of a process queueing commands to the stack before calling
EQQWTSO4, which assumes that the Workload Automation Programming
Language environment is already set up, and then processes the output
when EQQWTSO4 completes.
To use this capability, you must create a started task workstation. For details about
configuring a started task workstation, see IBM Workload Scheduler for z/OS:
Planning and installation.
The Started Task Workstation feature operates differently, according to the setting
of the OPCOPTS RCLEANUP statement.
The following example shows an STC job for RCLEANUP(YES) (EQQJOBS member
EQQWCMD1):
//EQQWCMD1 JOB CLASS=A,MSGCLASS=X
//*%OPC SCAN
//**********************************************************************
//* THIS SHOULD BE USED ON AN STC WORKSTATION TO RUN WAPL COMMANDS FOR
//* INSTALLATIONS WHERE OPCOPTS RCLEANUP(YES) IS USED.
//*
//* IT IS RECOMMENDED THAT THE JOBNAME BE PREFIXED BY THE SUBSYS NAME
//* E.G. TWSACMD1
//*
//* TO ENABLE USER WAPL MEMBERS TO BE INCLUDED FROM WITHIN USER FIELDS
//* ADD A DD STATEMENT POINTING TO YOUR OWN CODE LIBRARY E.G. USRCODE
//*
//**********************************************************************
//EQQYXJCLPX EXEC EQQYXJPX,
// SUBSYS=TWSA
//EQQYLOG3 DD SYSOUT=*
//*USRCODE DD DISP=SHR,DSN=MY.USER.CODE
//SYSIN DD DISP=SHR,DSN=TWS.V920.SEQQWAPL(USRSYSIN)
//EQQCPOP DD *
&OADID. &OYMD1.&OHHMM. &OOPNO
Note: If VARPROC is not set to YES, be cautious when turning on this feature.
Check all pre-existing JCL to search for any jobs that contain both //*%OPC SCAN
and any instream procedures, because these might be affected by this change if the
//*%OPC SCAN statement precedes the instream procedure, and symbolic
parameters are coded within the procedure.
The commands can then be coded as user fields prefixed with EQQ-SYSIN- and
are run in sort order.
There can be up to 100 user fields, some or all of which could be Workload
Automation Programming Language statements, each up to 54 characters in length.
22 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Normal Workload Automation Programming Language continuation rules apply,
therefore if a command does not fit within 54 characters it can continue in the next
user field.
The following example shows commands coded in User Fields. This example in
the first operation of an application will seek and HOLD or NOP any operations
tagged with appropriate user fields and values.
Because a started task is not limited to a single occurrence of the same name
running simultaneously, you define only a single Workload Automation
Programming Language started task, which can run many times in parallel. It is
recommended that you use a special resource exclusively for any Workload
Automation Programming Language started task operations, to limit the number of
processes you want to allow in parallel.
You do this by using a special entry point value of CMD called EQQYXSTC, which
takes the ARGS value and runs it as a command, allowing a single command to be
entered at the console. The custom version would be similar to the normal
EQQYXJPX, but would be specifically customized for the controller values in the
PROC statements and the CMD symbolic would default to EQQYXSTC to call the
special entry point.
The following example shows a custom proc for an IBM Workload Scheduler for
z/OS version 9.2 controller called WSLC to run a single command from the
console:
//WSLCEXEC PROC @=,
// ARGS=’’,
// CMD=EQQYXSTC,
// FILESPEC=FILENONE,
// LANG=EN,
// OPTFILE=’TWS.V920.SEQQWAPL’,
// OPTS=OPTDEFLT,
// REF=REFERNCE,
// REG=4M,
// SUBSYS=WSLC,
// VER=V920,
Provided that the customer procedure is placed in the correct library for started
tasks, you can run a console command such as S WSLCEXEC,ARGS=’ADD
ADID(MYAPPL)’.
Note: There is a restriction for this method that the commands to be issued cannot
contain single quotation marks. Single quotation marks are needed only in limited
circumstances with Workload Automation Programming Language, limiting the
impact of this restriction.
For triggering multiple commands from the console, provided that they can be
predefined, you can add a DD statement, for example MYCODE, within the
custom procedure to contain predefined groups of statements, which can then be
called as follows:
S WSLCEXEC,ARGS=’INCLUDE MYCODE(WHATEVER)’
This would include and execute a member called WHATEVER from the MYCODE
DD statement within the customer procedure.
With some automation products it is possible to define command rules to look for
an automation-specific prefix to then translate a short form of the command into a
started task call. For example, if you enter !WSLC ADD ADID(MYAPPL) automation
rules translate it to S WSLCEXEC,ARGS=’ADD ADID(MYAPPL)’.
Note: Some OPTIONS keywords require communication with the IBM Workload
Scheduler for z/OS PIF.
To communicate with more than one IBM Workload Scheduler for z/OS subsystem
in a Workload Automation Programming Language session, you can initialize your
own connection to IBM Workload Scheduler for z/OS by using an INIT statement
before any other statement that requires the PIF.
You can also use the SUBSYS parameter to specify the default version to load at
startup.
24 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
| Using OUTPUT statements
| Use the OUTPUT statements to define what information you want to extract from
| IBM Workload Scheduler for z/OS, where to send it, and in what format.
| Workload Automation Programming Language writes the output from LIST or
| SELECT requests only if you have run OUTPUT statements for the segments
| encountered in these commands.
| The OUTPUT statements are located in the SEQQWAPL library and consist of the
| following types of members:
| Segment members
| There is a member for every IBM Workload Scheduler for z/OS segment
| supported by Workload Automation Programming Language. The member
| names match the segment names.
| Record members
| There is a member for every IBM Workload Scheduler for z/OS record
| supported by Workload Automation Programming Language, that contains
| each segment within that record. The member names match the record
| names.
| Group members
| There are members for large groupings of records such as all Database
| Records, all Current Plan records, and so on. The member names for these
| members begin with EQQGRP.
| There are also some members in the SEQQWAPL library whose names begin with
| EQQFLxxxx. These members are designed to help you use Workload Automation
| Programming Language as a command line to IBM Workload Scheduler for z/OS,
| without having to consider in detail what OUTPUT statements you need. They are:
| EQQFLALL
| Includes definitions for all IBM Workload Scheduler for z/OS data
| obtained by Program Interface commands (for example, SELECT and
| LIST). This does not include all the tracking log records. EQQFLALL is a
| historical name chosen before Tracking Log records were considered;
| adding all tracking log records into EQQFLALL could result in slower start
| times for existing Workload Automation Programming Language jobs.
| EQQFLDB
| Includes all IBM Workload Scheduler for z/OS database records.
| EQQFLCP
| Includes all IBM Workload Scheduler for z/OS current plan records.
| EQQFLLTP
| Includes all IBM Workload Scheduler for z/OS long term plan records.
| EQQFLPLN
| Includes all IBM Workload Scheduler for z/OS plan records (CP and LTP).
| EQQFLSYS
| Includes all IBM Workload Scheduler for z/OS system records.
| Individual segment, record, or group members can still be used with error
| checking in place, either by adding the two SETSEV statements from the EQQFLxxxx
| members into your site defaults (which will turn on checking for ALL OUTPUT
| statements including the supplied ones) or by coding the statements in your SYSIN
| to issue only RC=4 for invalid references in the statements that you create.
| The in-built OUTPUT definitions include every field, for every segment, that sends
| ILSON data to OUTDATA, and Batch Loader data to OUTBL. You can load these
| definitions by using the LOADDEF statement. For example, set LOADDEF AD* to load
| the in-built OUTPUT definitions for all the segments beginning with AD. If instead of
| exploiting the in-built versions, you want to load the prebuilt members from
| SEQQWAPL, use the INCLUDE statement.
| The SEQQWAPL library must be allocated in the JCL, then an INCLUDE statement
| can load the relevant member. For example, set INCLUDE WAPLMAPS(EQQADW) to load
| the member that contains all of the OUTPUT statements for application description
| segments. Load the in-built OUTPUT statements only when you need all the fields
| for a particular segment, for example when extracting batch loader for database
| objects. If you do not need every field from each segment in your output, define
| your own OUTPUT statements. For a list of all available segment and field names,
| refer to the SEQQWAPL member EQQFLALL described in “Alternative resource
| names” on page 253
Consider that:
v Some commands require a resource which is either the type of item, or an
individual item the command is acting upon. For these commands this is always
the second word of the command statement.
v Command keywords that have values are specified with the value contained
within parentheses. There must be no space between the keyword and the
opening parenthesis, because this is interpreted as a separate keyword.
v Keywords and their values can be separated from other keywords and their
values by commas, spaces, or both.
v If a keyword value requires parentheses, that value must be enclosed within
single quotation marks inside the keyword parentheses. For example,
KEYWORD('my.value(member)'). In all other cases, the containing quotation marks
are optional.
v Containing quotation marks are not passed through to the underlying process.
v If containing quotation marks are used, you must specify two consecutive single
quotation marks to represent a single quotation mark in the underlying process.
26 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
v A single quotation mark at the start of a value is considered to be a containing
quotation mark, and a terminating quotation mark is required at the end of the
value.
v Double quotation marks are always passed through to the underlying process.
Using comparators
When you need to specify comparators for a command (for example LIST) specify
them in the form KEYWORD-COMPARATOR(value). For example, VALFROM-GE(060124)
The native PIF convention for specifying comparators is to specify the comparator
at the end of the field, and the comparison works counter intuitively. For example,
VALFROM=060124<= means when 060124 is less than or equal to the value of VALFROM
in the application in the database NOT when VALFROM in the database is less than
or equal to 060124.
You can still use the native PIF approach to specify comparators, by appending the
comparator onto the value inside the keyword parentheses, as follows:
VALFROM(060124<=)
Note: Comparators are valid only for native PIF commands LIST, SELECT, and
DELETE. They are not valid for keywords of any other command.
The following restrictions apply to the use of the equal sign (=) for dates and
times:
v It can be used only for fields whose value is specifically a date, time, or
datetime. You cannot use it for any other type of field, DESCR(=) is not a date or
time short form, DESCR(=) will result in the description being set to a single
equals sign.
The value used must be appropriate to whatever the date and time was when
Workload Automation Programming Language started. You can specify your own
values to substitute for the equal sign (=) by using OPTIONS DATE and OPTIONS
TIME.
You can also use the plus sign (+) or minus sign (–) in date or time fields to set
dates or time relative to the Workload Automation Programming Language
internal date and time. For example, VALFROM(+7) will be a date in 7 days time,
STARTTIME(+10) will be in ten minutes time.
If you use the plus sign (+) or minus sign (–) in a time field, this might result in
carry over to other fields if the addition or subtraction crosses a date boundary. Be
aware that in some cases this can create an invalid value for some fields. The
following fields perform automatic carryover:
v OPTIONS TIME will carry over into OPTIONS DATE
v Long Term Plan IAT will carry over into IAD
v Long Term Plan PREIAT will carry over into PREIAD
v Batch Loader ADOP STARTTIME will carry over into STARTDAY
v Batch Loader ADOP DLTIME will carry over into DLDAY
Note: For consistency, the equal sign (=) short form uses the date and time when
you started your Workload Automation Programming Language session. This
ensures that you can use the equal sign (=) throughout your command statements
with consistency, preventing potential problems with dependencies being missed.
The exception to this is the @ function, which uses the input arrival of the
occurrence in which the Workload Automation Programming Language job is
running, if the job is under IBM Workload Scheduler for z/OS control.
For dates, the plus sign (+) or minus sign (–) adds or subtracts a number of
calendar days to the date. To add or subtract work days, you can use the WD
suffix. For example, ADD ADID(MYAPPL) IADATE(+3WD) adds the application to the
plan 3 working days from the current date.
When the job is being controlled by IBM Workload Scheduler for z/OS, the
calendar used by the calculation is the application calendar; otherwise the default
calendar, that you can set with OPTIONS CALENDAR, is used.
The calendar can be specified within the keyword by following the date offset with
a slash (/) and the calendar name, for example ADD ADID(MYAPPL)
IADATE(+3WD/MYCAL).
28 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Any line ending in a comma is continued onto the next line with no intervening
space, any other ending character results in an intervening space being considered
between the adjoined lines.
If a single keyword needs to be longer than an input line, then continuing that
statement up to the last column of available input (for example, column 80 for
instream SYSIN) results in the following line being directly abutted to the end of
the preceding line.
For compatibility with EQQYCAIN and EQQYLTOP batch loader format, you can
set OPTIONS SYNTAX(LEGACY) , which will ignore anything beyond column 72 and
consider 72 as the continuation column, connecting the following line from column
1.
Using termination characters such as semicolon (;) or period (.) is not accepted by
Workload Automation Programming Language.
Individual sub-segments for Batch Loader statements do not have to start on a new
line, only the xxSTART statement needs to start on a new line. For example, ADSTART
ADID(MYAPPL) ADOP OPNO(001) JOBN(MYJOB)
With a long enough SYSIN record length it would be possible to contain the entire
Batch Loader for a single IBM Workload Scheduler for z/OS object on a single line
of input.
Multi-line comments cannot span a text mode block of data, as in the following
example:
Because the DLM keyword indicates the following line is text it is contradictory to
the open comment leading into the text. Text data in Workload Automation
Programming Language is treated as unprocessed input, so any comments within
the text are passed into the object it is defining. So in this case the open comment
will lead to a syntax error.
To comment out the data entirely, the following example shows the correct form:
JSSTART ADID(’CRITBATCH ’) IA(0805121738) OPNO(001)
JSJCL MEMBER(MYJOB) /* DLM(-END-OF-INPUT-TEXT-)
//*>OPC SCAN
//*>OPC TABLE NAME=TESTVAR
//* Y
-END-OF-INPUT-TEXT- */
Note: The comment start characters override all other directives, so if you want to
include /* within one of your statements with a preceding space, then you must
alter the comment start character using the OPTIONS COMSTART statement and
similarly with OPTIONS COMEND to use something other than */ to end a comment.
Consider that changing the default comment characters can affect the use of
predefined members such as EQQFLALL, which contains many comments in the
/* */ format.
The /* value can be included within a statement, provided that is not preceded by
a blank character.
For example, the OK variable will work, the NOTOK variable will be treated as
comment from column 33 onwards:
JCLVVAR VARNAME(OK) DEFAULT(’/*’) SETUP(N)
JCLVVAR VARNAME(NOTOK) DEFAULT(’ /*’) SETUP(N)
Consider that:
v Quotes, spaces, and parentheses ( and ) can cause problems to read the syntax
of a command correctly.
v When using Workload Automation Programming Language with instream
SYSIN, characters &, %, and ? could be resolved by JCL tailoring unintentionally.
v The exclamation point (!) could be resolved by Workload Automation
Programming Language variable substitution unintentionally.
v The percent sign (%) and asterisk (*) could cause problems to commands that
need to use wildcards to search.
v /* and */ could be interpreted as a comment by Workload Automation
Programming Language.
30 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
These characters can cause problems especially in object names that form
searchable and key fields. You should avoid them when naming objects to be used
with Workload Automation Programming Language.
However, these characters can be displayed differently when different code pages
for different countries are used. They appear exactly as documented for US English
(CP 37) and United Kingdom (CP 285); instead, some or all of them might appear
differently in code pages for other languages. To find out what the characters
actually are for your code page, run the SHOW OPTIONS command.
The following example shows the output of the SHOW OPTIONS command using a
non-English code page (CP 280):
The following OPTIONS keywords are available to set the characters to the value
you want to use in your code page:
CHARAT Sets a character to replace the at sign (@) for object variables.
CHARBANG
Sets a character to replace the exclamation mark (!) for the default variable
prefix.
CHARHASH
Sets a character to replace the number sign (#) for object and ENVATTR count
values.
CHARMAIL
Sets a symbol to replace the at sign (@) used in email addresses.
For these OPTIONS you cannot use standard upper or lower case alphabetic
characters, numbers, minus signs (-), or periods (.). They must not be in conflict
with any other CHARxxxx or VARNAMES keyword. Setting OPTIONS CHARAT(@)
CHARBANG(!) CHARHASH(#) CHARMAIL(@) in your code page ensures that the special
characters appear as documented in your system.
Note: These OPTIONS keywords change only these characters for the uses specified.
When the same characters are used as part of the data in your system, or part of
field names in OUTPUT statements or object variables, the characters are displayed
according to your code page.
In addition, sometimes you need use a different resource name when using LIST to
the one you must use when using SELECT.
For example, you would LIST ADCOM to find a list of job streams, but then you
would need to SELECT AD to retrieve each job stream completely.
For a complete list of the available aliases for each PIF command, see “Alternative
resource names” on page 253.
Variable substitution
Workload Automation Programming Language supports variable substitution
within its control statements. This allows elements that vary at run time to be
incorporated into the commands, such as the running Occurrence Name, Input
Arrival, and Operation number.
32 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
This also means that IBM Workload Scheduler for z/OS information becomes
available to jobs tracked by IBM Workload Scheduler for z/OS that were not
necessarily submitted by IBM Workload Scheduler for z/OS. Variables from the
JCL Variable tables can also be referenced along with Workload Automation
Programming Language variables defined directly in the Workload Automation
Programming Language SYSIN.
For more detailed information about variables, see “Variable naming convention”
on page 227.
Using wildcards
Workload Automation Programming Language supports the use of wildcards in
many commands, either partially or completely.
Wildcards are completely supported for the standard keywords of the Data Access
commands based on PIF, and for the PIF related keywords of the Current Plan
Operation commands. In both cases, you can use wildcards as in the IBM
Workload Scheduler for z/OS PIF commands:
Percentage sign (%)
Represents any single character.
Asterisk (*)
Represents one or more characters.
You can use more than one wildcard in the command. For example:
ABC* Matches values beginning with ABC.
*XYZ Matches values ending with XYZ.
ABC%%%XYZ
Matches values beginning with ABC, followed by 3 characters of any value
and ending with XYZ.
*DEF* Matches values with DEF positioned anywhere in the value.
Only the percentage sign (%) can be used multiple times. If the asterisk (*) is used
more than once, any subsequent asterisk will be treated as an asterisk (*) and not a
wildcard. For example:
ABC* Matches values beginning with ABC.
*XYZ Matches values ending with XYZ.
ABC%%%XYZ
Matches values beginning with ABC, followed by 3 characters of any value
and ending with XYZ.
*DEF* Matches values ending with DEF.
If a critical error occurs, no more commands are run except an automatic TERM
command, if needed. A critical error is any statement that issues a return code of
12 or above. This limit can be changed with the OPTIONS STOPRC keyword.
The LISTSTAT command can issue a response code greater than 12 without causing
a problem because the response code from LISTSTAT is only applied to the return
code of the step immediately prior to termination of Workload Automation
Programming Language. A response code is a special case of a return code to
avoid STOPRC processing.
For conditional processing when comparing against a particular step return code,
the highest value of the return code and response code is considered.
You can influence which statements are run within Workload Automation
Programming Language by using a series of process control tags. These tags all
begin with a colon and can be coded anywhere within a Workload Automation
Programming Language statement following the initial command name.
You label the statement by inserting a user-defined label before the statement,
followed by a colon:
CHKJOB: LISTSTAT CPOP JOBNAME(WLSCCPEX) IA(&OYMD1.1200)
The label allows other conditional processing functions to reference this statement
directly, for example, IF @CMD(CHKJOB.EQ.4) THEN.
The label assigned to each statement will be shown in the messages 200 and 299
that record the execution of each command, and can also be displayed by running
the SHOW RC command.
Defining subroutines
Define subroutines to allow chunks of code to be reused from different parts of the
main program. Subroutines are called by the CALL SUB command.
You define subroutines by using the SUBROUTINE statement, which must be coded at
the end of the program stream from which they are being called. SUBROUTINE
statements must not be contained within INCLUDE statements, but subroutines can
contain INCLUDE statements.
34 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
A subroutine must start with SUBROUTINE and end with RETURN, but a RETURN
statement is assumed when the next SUBROUTINE statement or the end of the stream
of code is encountered. You can use IF-THEN-ELSE to issue a RETURN statement to
conditionally exit a subroutine.
The controller must be available for any job to use the PIF. If you run a Workload
Automation Programming Language job while the controller is down, any PIF
processing fails. Because occasionally the controller might fail and cause a
Workload Automation Programming Language job to fail, for planned controller
downtime you can protect against failure with the following procedure:
1. Ensure that all your production Workload Automation Programming Language
jobs are controlled by IBM Workload Scheduler for z/OS. For Workload
Automation Programming Language jobs that are submitted externally, ensure
that they are submitted with TYPRUN=HOLD and have a corresponding ETT
rule to trigger an application to control them. This ensures that no Workload
Automation Programming Language job starts running while the controller is
unavailable. Any job submitted while the controller is down will wait, and,
providing that Event Data sets are adequately sized, will be released
automatically after the controller is ready. Any Workload Automation
Programming Language jobs that fail due to unexpected failure of the
controller are seen in error when the controller is restarted. This method
requires the EWTROPTS option HOLDJOB keyword setting to USER.
2. Create a special resource specifically for use of the programming interface. Add
this resource to every Workload Automation Programming Language job,
planned and event-triggered, with a usage of SHR. For an unplanned but
controlled shutdown of the controller, you can then make this resource
unavailable and monitor the In-Use list (5.7) for this resource to determine
when it is safe to take the controller down. On restart of the controller, after the
resource is made available again, Workload Automation Programming
Language processing can continue safely.
Some IBM Workload Scheduler for z/OS planning functions make heavy use of the
current plan and long-term plan. These can cause failure due to contention, or
logical failure with elements being changed around the Workload Automation
Programming Language job. It is recommended that you avoid running Workload
Automation Programming Language jobs against the Current Plan Extend, Replan,
Long-Term Plan Extend, and Modify. This can be done by adding the
programming interface resource to these planning jobs with Exclusive usage.
| If you want to set different values as default, create entries in your own site
| default member and store it in one of your libraries, then reference it in the
| EQQOPTS statement within the EQQYXJPX and EQQYXJPL procedures. By default, the
| EQQOPTS statement is provided commented out, so nothing is read.
You can also create subsystem-specific OPTIONS by using IF statements and the
ZSUBSYS variable.
| Including a site default member in EQQOPTS means that it is run every time
| Workload Automation Programming Language starts. To prevent unnecessary
| storage consumption, include only the statements that are actually required every
| time Workload Automation Programming Language runs. In alternative to creating
| a site default member, you can create members that set site defaults and variables
| for key types of functions. Then INCLUDE only the Workload Automation
| Programming Language jobs that need those setup instructions. For example,
| create an include member called TRACKERS as follows:
| OPTIONS TRACKERS(WSMC.*.WSMT)
| Then, include the TRACKERS member in any job that issues TSO commands:
| INCLUDE MYWAPL(TRACKERS)
| SRSTAT ’MY.RESOURCE’ AVAIL(Y)
Message log
Workload Automation Programming Language produces a message log, with
different levels of detail, according to the OPTIONS MSGLEVEL setting.
| EQQYLOG* DD statements that define data sets not valid for output are ignored. If
| more than one valid variant of EQQYLOG* is specified, the last encountered in the
| JCL is used, allowing an EQQYLOG* DD statement to be coded in the EQQYXJPX and
| EQQYXJPL procedures, but still be overridden in the executing JCL, even if using a
| different MSGLEVEL suffix.
DUMMY DD statements are ignored. If no valid EQQYLOG* data sets are found in
the JCL, SYSTSPRT is used. If writing to an EQQYLOG* data set fails, SYSTSPRT is used
for the remainder of messages.
36 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Chapter 3. Core programming commands
The following sections describe the Workload Automation Programming Language
commands that control the behavior and logic of the program. Use the commands
to set options, return codes, determine an output, modify the flow, change
variables, or make decisions.
or
CALL SUB(<subroutine name>)
or
CALL VAR(<variable name>)
where:
EXT Specifies an external REXX routine to execute, including arguments if
required. If the external command sets a return code, this will be passed to
the return code of the CALL command.
STACK Defines what to do with the REXX stack around the running of an external
program:
IN Default. Leaves the stack intact for the external program to use. If
the external program does not pull entries from the stack they are
left in place for the remainder of the calling program to access or
add to.
OUT Preserves the stack before calling the external program, then once
the external program completes, processes any new stack entries
on the stack as Workload Automation Programming Language
commands, before restoring the original contents of the stack.
Workload Automation Programming Language commands from
the stack is displayed at MSGLEVEL(2).
BOTH Passes the stack to the external program to use and then processes
the entire content of the stack of Workload Automation
Programming Language commands when the external program
completes. If the input stack was not completely processed by the
external command, any remainder is executed on exit. Workload
Automation Programming Language commands from the stack is
displayed at MSGLEVEL(2).
NONE Keeps the stack before calling the external program and then
restores the stack ahead of any new entries added by the external
program.
SUB Specifies a subroutine to run immediately following the CALL
command. The CALL command fails if the subroutine does not exist.
DISPLAY <expression>
Where expression can be any valid REXX expression. For more details about REXX
expressions and available functions, see TSO/E REXX Reference.
Examples:
DISPLAY “Hello World”
DISPLAY @LOG() @V(OBJ-ADID)
Block DO
A block DO runs a block of code once, and has no arguments.
For example:
DO
VARSET COLLECT = “Y”
DISPLAY “COLLECT” !COLLECT
END
You can use it together with IF-THEN-ELSE to run more than one command, when
the expression is true, as in the following example:
38 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
IF “!TAG” = “-JOBNAME” THEN DO
VARSET COLLECT = “Y”
DISPLAY “COLLECT” !COLLECT
END
ELSE DO
VARSET COLLECT = “N”
END
Repeat DO loop
A repeat DO runs a block of code for the specified number of times, with a simple
repeat count as the argument.
The ITERATE command can be used at any point in the block to start the next
iteration of the currently active loop from the DO statement again. The LEAVE
command can be used to exit the currently active loop and resume processing
following the corresponding END statement. ITERATE and LEAVE can only exit the
currently active block.
Iterative DO loop
An iterative DO increments or decrements a loop counter. The loop is processed for
each possible value of the variable within the limits specified. By default, the value
is increased by one each time, but you can modify this behavior by using the BY
keyword.
where:
<variable>
The name of the variable to increment or decrement. It must not be
prefixed with the exclamation mark (!) or whatever prefix has been set for
variable.
<start>
The starting value of the variable. Must be an integer.
<end> The ending value of the variable. Must be an integer.
<increment>
The value to increment or decrement the variable. Must be a positive or
negative integer. The default is 1.
<limit>
The maximum number of times the loop will execute. Must be an integer.
The default is the absolute difference between <start> and <end> + 1.
For example:
DISPLAY “Testing... Testing”
DO X = 1 TO 3
DISPLAY !X
END
The ITERATE command can be used at any point in the block to start the next
iteration of the currently active loop from the DO statement again. The LEAVE
DO While loop
Use the DO WHILE statement to run the block of code whilst the expression is true.
If the expression is untrue when the DO WHILE statement is processed for the first
time the contents of the DO/END block are not run at all, and processing will
continue from the command following the END statement.
The condition is re-evaluated at the end of each iteration of the DO/END block, and
if still true the block is run again.
DO WHILE <expression>
where:
<expression>
A REXX-based expression. The expression can be any valid REXX
expression that results in 1 or 0.
For more details about REXX expressions and available functions, see
TSO/E REXX Reference.
For example:
VARSET X = 1
DO WHILE “!X” < 10
DISPLAY !X
VARSET X DELTA(1)
END
The ITERATE command can be used at any point in the block to start the next
iteration of the currently active loop from the DO statement again. The LEAVE
command can be used to exit the currently active loop and resume processing
following the corresponding END statement. ITERATE and LEAVE can exit only the
currently active block.
Loops of this type are protected from running forever by accident by the global
loop limit. This is set by OPTIONS LIMIT, which defaults to 100.
DO Until loop
Use the DO UNTIL statement to run the block of code until the expression is true.
The contents of a DO UNTIL block will always run at least once, even if the
expression is true the first time the DO statement is processed. Every time the END
statement is processed the expression is evaluated again; if not true, processing
returns to the DO statement for another pass through the block of code.
The condition is evaluated again at the end of each iteration of the DO/END block; if
it is still not true, the block is run again.
DO UNTIL <expression>
where:
<expression>
A REXX-based expression. The expression can be any valid REXX
expression that results in 1 or 0.
40 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
For more details on REXX expressions and available functions, see TSO/E
REXX Reference.
For example:
VARSET X = 1
DO UNTIL “!X” = 10
DISPLAY !X
VARSET X DELTA(1)
END
The ITERATE command can be used at any point in the block to start the next
iteration of the currently active loop from the DO statement again. The LEAVE
command can be used to exit the currently active loop and resume processing
following the corresponding END statement. ITERATE and LEAVE can only exit the
currently active block.
Loops of this type are protected from running forever by accident by the global
loop limit. This is set by OPTIONS LIMIT, which defaults to 100.
DO Forever loop
Use the DO FOREVER command to repeat a block infinitely, up to the global loop
limit, until a LEAVE or EXIT command is encountered to terminate the loop.
For example:
VARSET X = 1
DO FOREVER
DISPLAY !X
VARSET X DELTA(1)
IF “!X” > 20 THEN LEAVE
END
The ITERATE command can be used at any point in the block to start the next
iteration of the currently active loop from the DO statement again. The LEAVE
command can be used to exit the currently active loop and resume processing
following the corresponding END statement. ITERATE and LEAVE can exit only the
currently active block.
Loops of this type are protected from running forever by accident by the global
loop limit. This is set by OPTIONS LIMIT, which defaults to 100.
where:
<type> The type of element being dropped from memory, this can be SAVELIST or
OBJECT.
<item> The name of the element being dropped.
The DROP command drops saved structures from memory. For large elements this
might be required to reduce storage consumption, especially if multiple SAVELIST
elements are merged using the MERGE command, or many large OBJECT elements are
extracted from the database.
Where a LIST request has generated multiple objects, dropping the LIST object also
drops all of the generated objects.
Note: Before Workload Automation Programming Language version 3.4, only one
kind of object could be dropped therefore the object type was not required. For
backwards compatibility, if a SAVELIST name is provided without a keyword, it is
assumed to be a SAVELIST and dropped.
When an EXIT statement is processed, no further user commands are run; but any
automatic EXECUTE and TERM statements are executed before final termination.
EXIT [<rc>]
If you set the return code, it overrides any highest return code or any response
codes from LISTSTAT.
or
or
42 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Segment level
When a segment is being processed, fields within it can be checked that
they match the FILTER argument.
For example, FILTER ADOP ADOPWS(CPU1) returns only operations that use
workstation CPU1. When a segment is excluded by a filter, all of its child
segments are also excluded.
The FILTER command must be issued before any LIST or SELECT command. Any
number of valid segment or field names can be included on a single FILTER
statement, all must be true for the record or segment to be selected for output.
To stop filtering for any subsequent commands use a FILTER command specifying
only the record or segment name and the keyword OFF. For example, FILTER ADOP
OFF turns off filtering of ADOP segments.
Combining FILTER with other commands and options can produce some complex
processing, without having to write any specific REXX code. In the following
example:
INCLUDE EQQFILE(ADCOM,ADRUN)
OPTIONS RUNSTAT(SUSPEND) POSTPROC(Y) LOADER(*) DBMODE(UPDATE) DATA(-)
FILTER AD ADRUN-GT(0)
LIST ADCOM ADID(AB*) SELECT(Y)
The result is that these four commands change only applications with names
beginning with AB that have run cycles, to set them out of effect; thereby rendering
these applications ineligible for planning, but still available to be manually added
to the plan. Without the FILTER command, this job would attempt to update
applications that have no run cycles, thereby performing a lot of unnecessary
processing.
If you want to create batch loader to perform the “suspension” of the applications
in a later job, removing POSTPROC(Y), LOADER(*) and DBMODE(UPDATE) from the
OPTIONS statement would cause the statements to be written to OUTBL. They could
then be processed by a later job with OPTIONS DBMODE(UPDATE) coded to set the
job into UPDATE mode.
The expression can be any valid REXX expression that results in 1 or 0. For more
details about REXX expressions and available functions, see TSO/E REXX Reference.
44 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
You can use AND or OR within parentheses and the ampersand (&) and vertical bar
(|):
IF (“!DAY” = “WED”) & (“!MONTH” = “JAN”) THEN
IF (“!DAY” = “MON”) | (“!DAY” = “TUE”) THEN
or
INCLUDE USER_FIELD(mask)
The statements can be read from DD statements allocated to the step running
Workload Automation Programming Language.
In a single INCLUDE statement you can include multiple members from one DD
statement and multiple DD statements. Workload Automation Programming
Language reads and runs the statements in the order specified.
Note:
v To search for a member name, Workload Automation Programming Language
requires that all files in the concatenation are cataloged. If you want to INCLUDE a
member from an uncataloged data set, you must allocate the member explicitly
in the Workload Automation Programming Language step.
| v If you use the INCLUDE statement with the EQQWAPL load module, you cannot
| specify member names. You can set only DD statements and user fields.
| In the following example, you load the in-built OUTPUT definitions ADCOM and ADRUN.
| You have activated variable substitution and set two variables that will be
| referenced in Batch Loader contained within the skeletons in members DAILY and
| WEEKLY of the MYSKELS file:
| //WAPLSTEP EXEC EQQYXJPX,
| // SUBSYS=IWSA
| //MYSKELS DD DISP=SHR,DSN=MY.SKELS.LIB
| //OUTDATA DD SYSOUT=*,LRECL=4096
By default, the contents of any statements loaded by an INCLUDE statement are run
at MSGLEVEL(3), in the same way as whatever is included by being referenced by
the FILESPEC symbolic parameter. This means that ordinarily if you use an INCLUDE
statement the content is not displayed in the SYSTSPRT output of Workload
Automation Programming Language, unless a command fails.
The comparison with the field name is not case sensitive, and each field is used in
alphabetical order.
ITERATE
If this is a repeat or iterative loop, the loop counter is incremented. If this is within
a Block DO structure, the block is exited, and the ITERATE applies to the nearest loop
DO structure above.
The ITERATE command applies only to the currently active DO loop, you cannot
ITERATE a higher-level nested loop structure this way.
LEAVE
If this is within a Block DO structure, the block is exited, and the LEAVE applies to
the nearest loop DO structure above.
The LEAVE command applies only to the currently active DO loop, you cannot LEAVE
a higher level nested loop structure this way.
LOG <expression>
46 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
where <expression> can be any valid REXX expression. For more details about
REXX expressions and available functions, see TSO/E REXX Reference.
For example:
VARSET STEP ENVATTR(JCL,STEP,0)
LOG MSGX000I @V(OJOBNAME) @V(STEP) @V(OJJESNO)
LOG MSGX001I @V(OADID) @V(OYMD1)||@V(OHHMM) @V(OOPNO)
where:
<list1>
The name of the first SAVELIST to merge.
<list2>
The name of the second SAVELIST to merge.
<list3>
The name of the SAVELIST in which to store the results.
<fields>
Optional. The name of the fields to merge by.
The MERGE command combines the contents of two lists into a single list with no
duplicates, based on the criteria. Ordinarily it uses the entire text of each SAVELIST
entry to perform the MERGE, but you can use BY to restrict the MERGE criteria to
named keywords in the SAVELIST text.
Note:
v The MERGE technique relies upon the two lists being ordered in the sort sequence
of the merging criteria. If you select criteria that do not match the sort sequence
the results might not be as expected.
v If an entry exists in both lists, with matching criteria, the entry from the first list
is selected for output.
v When merging LIST GENDAYS output it is recommended to code BY DATE IAT as
criteria, because the GENDAYS SAVELIST also contains FLAGS that might often not
match between entries for the same date.
For example:
IF (@CMD(CHK1.EQ.0)) & (@CMD(CHK2.EQ.0)) THEN NOACT
ELSE SENDMSG T(Something failed) U(ADCDMST)
Note: The NOACT statement performs no action at all, but accepts further text
following the command. Therefore, you can use NOACT as a testing or diagnostic aid
to see the value of variables being resolved at that point:
08/21 14.48.03 EQQI200I NOACT !_LSTAT1_CPOPERR
08/21 14.48.03 EQQI201I NOACT SB37
08/21 14.48.03 EQQI299I Statement completed - RC=0 (00000012)
OPTIONS <arguments>
The KEYS keyword specifies a list of key fields to be output for the record, the
FIELDS keyword specifies a list of non-key fields for the record. Workload
Automation Programming Language makes no distinction between fields specified
in KEYS or LIST when creating the output record; the distinction is made only if
you are going to load the output file into ISPF using the undocumented
EQQILSON utility.
The OUTPUT statement must precede any LIST or SELECT statements for which you
want to specify the output characteristics.
where:
segment
Required. The name of the IBM Workload Scheduler for z/OS segment for
which you want to define output.
48 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
alias Optional. An alternative name to use as the record label in the output.
* Optional. A special case of alias that suppresses the segment label in the
output.
where:
Indicates that this field is to be used as the sort sequence, if the record is
loaded into ISPF using EQQILSON (optional).
If the plus sign (+) or minus sign (–) is specified for use with EQQYXTOP,
it does not impact the output, therefore the same FILESPEC member can
be used by EQQYXTOP and EQQILSON to ensure that data is written
from IBM Workload Scheduler for z/OS in the same way as it is loaded
into ISPF.
iws-segment
Optional, needed only to reference a field from a parent segment.
Reference only segments that are parents to the current segment; values
from other segments might not be available.
iws-field
Required. The IBM Workload Scheduler for z/OS field name as described
in Appendix A of IBM Workload Automation: Driving IBM Workload Scheduler
for z/OS.
alias Optional. An alternative field label to use in the output record.
* Optional. A special case of alias that suppresses the field label in the
output.
length If a numeric length is specified instead of an alias, it suppresses the field
label and generates a fixed width field.
For valid segment names, see “OUTPUT field definition reference” on page 254.
The LABEL keyword determines what happens with field and segment labels, as
follows:
YES Default. Labels appear at Field and Segment level, unless an asterisk (*) is
specified.
NO No labels appear.
NOFIELD
No field labels appear, but the segment is labeled.
NOSEGMENT
No segment label appears, but the fields are labeled.
The DATA keyword specifies the Output Destination for Data records generated for
this segment. If no DATA Output Destination is specified for this segment and
OPTIONS DATA is not specified, no Data records are written for this segment. If
OPTIONS DATA is specified, the DATA keyword of OUTPUT is ignored and all Data
Records are sent to the destination specified in DATA.
The LOADER keyword specifies the Output Destination for Batch Loader generated
for this segment. If no LOADER Output Destination is specified for this segment and
OPTIONS LOADER is not specified, no Batch Loader statement is written for this
Note: You can have multiple OUTPUT statements for the same segment, only the
keywords specified are effective. If a keyword is not specified in an OUTPUT
statement, the keywords of a previous OUTPUT statement for the same segment are
applied. Therefore, you can specify fields and output destination in one statement
and then divert subsequent output to an alternative destination with a later
statement without having to specify all the fields again.
The following example shows multiple OUTPUT statements for the same segment.
The ADCOM file contains fields ADID and ADDESC and is sent to MYOUT. This
technique allows you to have standard file definitions and override the output
destination without specifying all the fields again.
OUTPUT ADCOM FIELDS(ADID,ADDESC) DATA(OUTBL)
OUTPUT ADCOM DATA(MYOUT)
| For each segment there is an in-built OUTPUT definition that includes all fields,
| sends ILSON data to OUTDATA, and sends batch loader data to OUTBL. To load
| all the fields for a segment, use the LOADDEF command to use these in-built
| definitions instead of coding your own OUTPUT statements. The LOADDEF command
| overrides the keywords in the OUTPUT statement, in a similar way to the use of
| subsequent OUTPUT statements for the same segment.
If you specify a DD statement that is not allocated, the first command requiring the
DD statement issues a warning message (setting return code 4), and the output
destination is suppressed.
50 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
One single level of a key is formed from the segment type followed by a hex 00
and then each key field separated by hex 00. Therefore, a single level of a key for
an application called MYAPPL with a status of Active that is valid until 31
December 2071 would have a single level key of ADCOM 00x MYAPPL 00x A 00x
711231.
A fully qualified key is a sequence of single keys separated by hex 01, to uniquely
identify a segment within an object within the database. Therefore, operation 010
within the previously described MYAPPL would be ADCOM 00x MYAPPL 00x A 00x
711231 01x ADOP 00x 010.
where:
<file> The name of an input DD statement from which to read.
* Indicates that the external data queue is to be used as input.
<object>
The name of the object variable to read the data into.
<records>
The number of records to read. If set to 0 (default), all the available data is
read.
The COUNT keyword allows large files to be read in small blocks to manage memory
usage. If a number of records is specified with the COUNT keyword, the command
reads that number of records in the file. A following READ command starts from
that point in the file rather than at the beginning. If COUNT is higher than the
number of remaining records, all the remaining records are read and a message is
issued, setting RC=4.
►► RETURN ►◄
The command takes the current maximum return code, or maximum response
code, or both, and use the POLICY keyword, looking for a match on the left side of
each expression (in_rc). If a match is found, it sets the new maximum to the right
side of the expression (out_rc).
If no match is found it, it sets the return code to the specified catch_all return
code. If you omit to supply a catch all return code, and there is no match, the
return code remains unchanged.
This command can influence maximum values: the maximum return code and
maximum response code. The maximum response code is a special case of return
code that is set by commands such as LISTSTAT, which sets the return codes to
communicate the status of an IBM Workload Scheduler for z/OS object to other
steps outside Workload Automation Programming Language. However, the
number of variants of return code to do this usually exceeds the critical return
code (set by OPTIONS STOPRC), which would flush the remaining Workload
Automation Programming Language processing. To avoid this, commands of this
type set a response code, which is returned by Workload Automation
Programming Language when it completes, if it is higher than the maximum
return code.
To specify which maximum code the SETMAX command will affect, use the SET
keyword with one of the following arguments:
MAX_RC Default. Compares the POLICY against the current maximum return code,
and modifies the maximum return code if a match is made within the
POLICY. It also sets the return code of the SETMAX command to the same
value.
MAX_RESP
Compares the POLICY against the current maximum response code, and
modifies the maximum response code if a match is made within the
POLICY. It does not set the return code of the SETMAX command.
BOTH Compares with the higher of the current maximum return code and
maximum response code. It modifies both if a match is found within the
POLICY. It also sets the return code of the SETMAX command to the same
value.
52 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
example, RC=700 for an uninitialized session). In the following example, return
codes 0, 4, 8, 12, and 16 remain unchanged, but if any other return code is found it
is set to 20.
SETMAX POLICY(0=0,4=4,8=8,12=12,16=16,20)
The following example shows how you can also influence a response code set by
LISTSTAT. This would set the maximum response code from any previous LISTSTAT
commands to zero, but not alter the maximum return code as set by other
processes:
SETMAX POLICY(0) SET(MAX_RESP)
Note: The default value of the SETMAX SET keyword can be influenced by OPTIONS
SETMAX.
SETSEV <msgID>
For example, SETSEV EQQI114W changes the severity of EQQI114E to the value W.
The EQQI prefix can be omitted to simply specify the message number and new
severity, as follows:
SETSEV 114W
Note:
1. The SHOW command is available within the Workload Automation Programming
Language ILSON and WAX utilities, but not all functions are available in both.
2. USRF and VARIABLES keywords cause the job to attempt to find itself in the
Current Plan if it has not already done so.
3. USRF is a valid keyword only starting from IBM Workload Scheduler for z/OS
version 8.5.1 SPE.
4. You can specify multiple keywords in a single SHOW statement, for example SHOW
USRF VARIABLES.
54 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
...EQQI600A NOINPUT NOINCMEM LRECL(72) TYPE(SYSOUT) TMP
03/15 14.42.42 EQQI600A EQQDUMP:1 - DSN(ADCDMST.ADCDMSTS.JOB01870.D0000103.?)
...EQQI600A NOINPUT NOINCMEM LRECL(72) TYPE(SYSOUT) TMP
In the following example, the SHOW OBJECT(CL) command shows all the available
object variables for a calendar with -n- showing where sequence numbers fit into
the syntax:
08/22 10.47.39 EQQI200I SHOW OBJECT(CL)
08/22 10.47.39 EQQI601A Object: @OBJ-CLNAME
08/22 10.47.39 EQQI601A Object: @OBJ-CLDAYS
08/22 10.47.39 EQQI601A Object: @OBJ-CLSHIFT
08/22 10.47.39 EQQI601A Object: @OBJ-CLDESC
08/22 10.47.39 EQQI601A Object: @OBJ-CLVERS
08/22 10.47.39 EQQI601A Object: @OBJ-CLLDATE
08/22 10.47.39 EQQI601A Object: @OBJ-CLLTIME
08/22 10.47.39 EQQI601A Object: @OBJ-CLLUSER
08/22 10.47.39 EQQI601A Object: @OBJ-CLLUTS
08/22 10.47.39 EQQI601A Object: @OBJ-#CLSD
08/22 10.47.39 EQQI601A Object: @OBJ-CLSD-n-CLSDDATE
08/22 10.47.39 EQQI601A Object: @OBJ-CLSD-n-CLSDSTAT
08/22 10.47.39 EQQI601A Object: @OBJ-CLSD-n-CLSDDESC
08/22 10.47.39 EQQI601A Object: @OBJ-#CLWD
08/22 10.47.39 EQQI601A Object: @OBJ-CLWD-n-CLWDDAY
08/22 10.47.39 EQQI601A Object: @OBJ-CLWD-n-CLWDNUM
08/22 10.47.39 EQQI601A Object: @OBJ-CLWD-n-CLWDSTAT
08/22 10.47.39 EQQI601A Object: @OBJ-CLWD-n-CLWDDESC
08/22 10.47.39 EQQI299I Statement completed - RC=0 (00000014)
The following example shows the output of the SHOW OPTIONS command:
03/15 14.42.42 EQQI602A OPTIONS in effect ADVALFROM(A) ARGUMENT()
...EQQI602A CALENDAR(CALENDAR) CCREMOVE(A) CHECK(Y) COMMIT(1000)
...EQQI602A COMEND(*/) COMSTART(/*) CPDEPR(N) CONTENTION(30,10)
...EQQI602A DATA() DATE(110315) DBMODE(ADD) DECODE(ONLY) DELAY(0)
...EQQI602A DELAYCMD(DELETE EXECUTE INSERT REPLACE) DELETE(N)
...EQQI602A DELFILE(OUTDEL) DLM(-END-OF-INPUT-TEXT-)
...EQQI602A DURUNIT(SECONDS) EXECUTE(AUTO) EXIT() EXITUSE(N)
...EQQI602A EXPAND(N) FIELDSEP( ) FIELDSPEC() FIRST(1)
...EQQI602A GTABLE(GLOBAL) HIGHRC(0) INCLEVEL(3) INPUT(SYSIN)
56 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
08/08 23.48.49 EQQI605A ADCDMSTT JOB05387 STEP0080 0006 EQQRETWM
08/08 23.48.49 EQQI605A ADCDMSTT JOB05387 STEP0090 FLUSH EQQRETWM
08/08 23.48.49 EQQI605A ADCDMSTT JOB05387 RUNWAPL EQQYXTOP EXEC IKJEFT01
08/08 23.48.49 EQQI605A
08/08 23.48.49 EQQI604A LABEL RC LVL COMMAND
08/08 23.48.49 EQQI605A 00000007 0000 1 SHOW
08/08 23.48.49 EQQI605A LISTSTAT 0099 1 LISTSTAT
08/08 23.48.49 EQQI605A SETMAX1 FLUSH 1 SETMAX
08/08 23.48.49 EQQI605A SETMAX2 FLUSH 1 SETMAX
08/08 23.48.49 EQQI605A SETMAX3 FLUSH 1 SETMAX
08/08 23.48.49 EQQI605A SETMAX4 0004 1 SETMAX
The following example shows the output of the SHOW SAVELIST command:
05/25 16.31.55 EQQI606A MYLIST has 12 entries. Content follows -
05/25 16.31.55 EQQI607A GENDAYS DATE(’120101’) IAT(’1000’) FLAGS(’NNYNNNN’)
05/25 16.31.55 EQQI607A GENDAYS DATE(’120201’) IAT(’1000’) FLAGS(’NNNNNNN’)
05/25 16.31.55 EQQI607A GENDAYS DATE(’120301’) IAT(’1000’) FLAGS(’NNNNNNN’)
05/25 16.31.55 EQQI607A GENDAYS DATE(’120401’) IAT(’1000’) FLAGS(’NNYNNNN’)
05/25 16.31.55 EQQI607A GENDAYS DATE(’120501’) IAT(’1000’) FLAGS(’NNNNNNN’)
05/25 16.31.55 EQQI607A GENDAYS DATE(’120601’) IAT(’1000’) FLAGS(’NNNNNNN’)
05/25 16.31.55 EQQI607A GENDAYS DATE(’120701’) IAT(’1000’) FLAGS(’NNYNNNN’)
05/25 16.31.55 EQQI607A GENDAYS DATE(’120801’) IAT(’1000’) FLAGS(’NNNNNNN’)
05/25 16.31.55 EQQI607A GENDAYS DATE(’120901’) IAT(’1000’) FLAGS(’NNYNNNN’)
05/25 16.31.55 EQQI607A GENDAYS DATE(’121001’) IAT(’1000’) FLAGS(’NNNNNNN’)
05/25 16.31.55 EQQI607A GENDAYS DATE(’121101’) IAT(’1000’) FLAGS(’NNNNNNN’)
05/25 16.31.55 EQQI607A GENDAYS DATE(’121201’) IAT(’1000’) FLAGS(’NNYNNNN’)
The following example shows the output of the SHOW SPE command. For each SPE,
the command shows the version of the SPE when it becomes available, the SPE
name, whether it is active (Y or N), and a simple description of the SPE itself:
03/15 14.42.42 EQQI608A 8.2 SPE WLM=N - Workload Manager integration (SCHENV)
03/15 14.42.42 EQQI608A 8.2 SPE PEND=N - Allow ADSTAT within Batch Loader
03/15 14.42.42 EQQI608A 8.2 SPE SA=N - System Automation integration
03/15 14.42.42 EQQI608A 8.3 SPE JCLV=N - JCL variable improvements
03/15 14.42.42 EQQI608A 8.3 SPE VIWS=N - Virtual Workstation support
03/15 14.42.42 EQQI608A 8.3 SPE IP=N - TCP/IP Server Connect
03/15 14.42.42 EQQI608A 8.5.1 SPE USRF=Y - Operation User Fields
Note: After the version at which functionality is available has been reached, that
functionality is automatically available for all later versions. Hence, if the previous
example was output from a system V8.5.1, the function associated with the SPEs
WLM, PEND, SA, JCLV, VIWS, and IP is automatically available, even if the
individual SPEs have not been activated.
The following example shows the output of the SHOW SYSINFO command:
where:
SYSNAME
Current system name
JESNODE
Current JES Node name
SMFID Current SMFID
SYSPLEX
Current Sysplex Name
SYSID Name of the system field used to determine the tracker subsystem name
The following example shows the output of the SHOW SUBSYSTEM command:
03/15 14.42.42 EQQI610A Subsystem information NAME(WSIC) VER(8.5.1)
...EQQI610A FMID(HWSZ510) CWBASE(00) HIGHDATE(711231)
...EQQI610A LOWDATE(720101) CALENDAR() CONLEVEL(00000001)
...EQQI610A FUNCLEVEL(00000006) ADDBCS(N) OWDBCS(N)
where:
NAME Subsystem name of the controller.
VER External version of the IBM Workload Scheduler for z/OS software.
FMID Internal version.
CWBASE Century window base.
HIGHDATE
Highest date IBM Workload Scheduler for z/OS considers part of this
century.
LOWDATE
Lowest date IBM Workload Scheduler for z/OS considers part of last
century.
CALENDAR
Default calendar name.
CONLEVEL
Connector software level.
FUNCLEVEL
Connector function level.
ADDBCS Double byte character support in Application ID.
OWDBCS Double byte character support in Owner ID.
The following example shows the output for the SHOW USRF command:
58 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
03/17 01.18.10 EQQI200I SHOW USRF
03/17 01.18.11 EQQI013A Job ADCDMSTU,JOB01991 in UFTEST 1409071119 CPU1_010
03/17 01.18.11 EQQI612A User field AUTHGROUP = ADCD
03/17 01.18.11 EQQI612A User field CATEGORY = C
03/17 01.18.11 EQQI299I Statement completed - RC=0
The following example shows the output for the SHOW VARIABLES command:
03/17 15.36.38 EQQI613A Variables BATRACHOLOGY101.MYCOUNT(2) MYFIRST(A)
...EQQI613A MYLAST(F) BATRACHOLOGY101.MYLEFT(HELLO)
...EQQI613A BATRACHOLOGY101.MYRIGHT(WORLD)
...EQQI613A BATRACHOLOGY101.MYVAR(HELLO WORLD) MY5TH(E)
...EQQI613A OJJESNO(JOB02038) OJJSTEP(RUNWAPL) OJOBNAME(ADCDMSTS)
...EQQI613A OJPSTEP(EQQYXTOP) OJWSA(BELOW)
The variables are listed in alphabetical order by name, unless the variable is
assigned to a table. In this case, the table name is prefixed to the variable name.
For example, MYCOUNT belongs to the table BATRACHOLOGY101, while variable MY5TH is
not assigned to a table.
LABEL: SUBROUTINE
Subroutines must be coded at the end of the SYSIN. The SUBROUTINE statements
themselves cannot be contained within an INCLUDE statement, but subroutines can
contain INCLUDE statements.
If an EXIT statement is not coded at the end of the main program, the first
SUBROUTINE statement will indicate an implicit EXIT.
A single TRANSLATE command can generate a single rule, or reference a set of rules,
for an individual field or type of field. The following list shows the available types
of field:
AD Application name
CL Calendar name
Note:
| 1. When processing TRANSLATE rules, Workload Automation Programming
| Language first checks if an OLD/NEW pair of keywords is defined for the field. A
| FILTER/OVERLAY pair is processed only if there is no matching pair of OLD/NEW
| keywords.
2. The content of the ETTNAME field is automatically considered to be a field of
type SR when ETTTYPE is set to R and JS when ETTYPE is set to J.
3. The content of the ADRPER field is automatically considered to be a field type of
PR when ADRTYPE is set to N or X, otherwise the field type is not set.
4. Periods contained within rule text are translated for run cycles in Applications
and Run Cycle Groups.
Note: For fields that contain an equal sign (=), you can remap the equal sign
delimiter to another character by using the DLM keyword.
The TRANSLATE OFF command can be used to stop the existing rules being
processed in any commands that follows. Then issue a TRANSLATE ON command to
turn processing back on at a later point in the SYSIN. Defining any new rule with
the TRANSLATE command will also turn translation processing back on, if it had
been turned off.
When a field is being processed for translation, the following actions are taken:
60 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
1. The field value is checked for an entry in the absolute list. If one is found, the
new value is substituted at this point, and the new value is passed on for filter
processing.
2. Each filter value is checked, in the order they were defined, for a match. If a
match is found then no more filter rules are evaluated.
3. If a match was made the OVERLAY value is used to modify the value.
The FILTER and OVERLAY keywords can be a combination of characters and the
following wildcard characters:
v Percent sign (%) equates to any single character.
v Asterisk (*) equates to any number of characters.
For example:
The order of filter rules is important, you can use some rules to exclude certain
values from processing, by giving the FILTER and the OVERLAY keywords the same
value.
For example, you used names beginning with Z for all your dummy operations on
a non-reporting workstation. These jobs never need to be modified. Their batch
jobs begin with characters different from Z, and have the phase of the life-cycle as
the third character in the job name. The following rules will convert test jobs to
production jobs, without changing the names of the dummy jobs:
TRANSLATE JS FILTER(Z*) OVERLAY(Z*)
FILTER(%%T*) OVERLAY(%%P*)
WAIT hh:mm:ss
You can specify the time in the format hh:mm:ss, mmm:ss, or sss. If required, use a
period (.) delimiter instead of a colon (:).
where:
<file>
Can be any valid output DD statement.
* Indicates write to the external data queue.
For more details about REXX expressions and available functions, see TSO/E REXX
Reference.
Examples:
WRITE * “A B C”
62 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Chapter 4. Workload Automation Programming Language
functions
For commands that use the REXX interpreter, you are provided with some
additional @ prefixed functions which you can use as part of an expression.
However, you cannot use any REXX functions or expressions within the @
functions.
The following string allows IF statements and other REXX based commands to
make decisions, based on the characteristics of the date being checked.
@(“<input-string>”,[<date>],[”<additional-keywords>”])
For example, the string IF @(FRI) & @(WORKDAY) THEN would only be true if the
date being checked was both a Friday and a workday.
By default, the date being checked is either the input arrival date for jobs
controlled by IBM Workload Scheduler for z/OS, or the current date for jobs not
controlled by IBM Workload Scheduler for z/OS. This date can be overridden by
specifying a date as the second argument of the function. The date can either be a
specific date in the format yymmdd or a relative date, using plus or minus to offset
from the default date for this function.
For example, the string IF @(FRI) & @(FREEDAY,+1) THEN is true if the scheduled
date for the job is a Friday and the following day is a Free day.
The CALENDAR can be overridden by specifying the CALENDAR keyword within the
third argument. For example, the string IF @(WORK,,”CALENDAR(NATIONAL)”) &
@(FREE,,”CALENDAR(LOCAL)”) THEN is true if the date being checked is a Workday
in the National calendar and a Freeday in the Local calendar.
Note: The Work Day End Time is not considered for WORKDAY or FREEDAY. To
exploit Workday End Time, you can use the ADRULE statement. Where you use an
ADRULE statement, the rule is checked to see if it would generate a match for the
date being checked.
The following list shows the additional keywords that you can specify as the third
argument to influence how the rule is evaluated:
CALENDAR
Sets the calendar to use. If not specified, the calendar is decided using the
same method as with WORKDAY and FREEDAY input strings.
FDAYRULE(1|2|3|4|E)
Sets the free day rule. By default, this is set to 3 which does not adjust the
date.
IAT(hhmm)
Sets the input arrival time to evaluate against the rule, for Calendar Work
Day End Time processing. By default, this will use the input arrival time of
the job running the command, if it is controller by IBM Workload
Scheduler for z/OS, otherwise it will use 0000 for a job outside of IBM
Workload Scheduler for z/OS control.
For example:
v @(“EVERY DAY(FREEDAY) WEEK”,,”CALENDAR(MYCAL) IAT(0300)”) evaluates
whether 3am on the date being checked is a Freeday, taking into account the
Work Day End Time of calendar MYCAL.
v @(“ONLY LAST(1) DAY(FRIDAY) MONTH”,-3) evaluates whether it was the last
Friday of the month 3 days ago.
v @(“ONLY LAST(1) DAY(FRIDAY) MONTH”,,”FDAYRULE(1)”) evaluates whether this is
the last working day before or on the last Friday of the month.
The date logic expressions can also be used in the CRITERIA user fields for the
ALTIF and RUNIF commands.
64 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
@CMD([[<label>.]EQ|NE|LT|LE|GT|GE.]<value>)
@JCL([[<label>.]EQ|NE|LT|LE|GT|GE|EM|NM.]<value>)
where:
<label>
Workload Automation Programming Language label of the command or
step name within the job currently running.
EQ Is true if the return code is equal to <value>.
NE Is true if the return code is not equal to <value>.
LT Is true if the return code is less than <value>.
LE Is true if the return code is less than equal to <value>.
GT Is true if the return code is greater than <value>.
GE Is true if the return code is greater than or equal to <value>.
EM Is true if the abend matches the mask specified as <value> (@JCL only).
NM Is true if the abend does not match the mask specified as <value> (@JCL
only).
<value>
The value with which the return code or abend is being compared.
For @JCL, the <label> can be STEPNAME.PROCSTEP or PROCSTEP, where PROCSTEP is the
actual step name running the program (whether it is in a job or a procedure), and
STEPNAME is the name of the step calling the procedure where the step runs. If the
same PROCSTEP occurs more than once, the return code of the latest step is returned
if only the PROCSTEP is specified. If more than one combination of
STEPNAME.PROCSTEP exists within the job, the latest is used.
Examples:
v @JCL(STEP0040.EQ.0) allows a command to run when STEP0040 has a return
code of 0.
v @JCLL(RUNWAPL.EQQYXTOP.EQ.4) allows a command to run when a step called
RUNWAPL calling the Workload Automation Programming Language procstep
EQQYXTOP ends with return code of 4.
v @JCL(EQQYXTOP.EQ.4) allows a step to run when the latest step using the name
EQQYXTOP occurs.
For both @JCL and @CMD, a positive number can be used for <label> to reference an
absolute step or command number, for example 1 for the first step, 3 for the third
command. Negative numbers can be used for relative steps or command, for
example -1 for the immediately previous step, -2 for the command before the last
one.
Note:
v Workload Automation Programming Language automatically runs commands on
your behalf, and some commands may internally run other commands to
achieve their goal. Use SHOW RC(5) to see all the commands that have run up to
that point. Using SHOW RC without specifying a message level, lists all commands
up to and including the current value of OPTIONS MSGLEVEL.
v The SHOW RC command lists the names of all steps in the job, including the
Workload Automation Programming Language step currently running. This step,
To receive step information, you can use the following special values for <label> in
@CMD, @JCL and VARSET:
LAST_RC
Refers to the previous JCL step or Workload Automation Programming
Language command.
LAST_XRC
Refers to the preceding JCL step or Workload Automation Programming
Language command that was actually run.
MAX_RC Refers to the step that set the maximum return code.
MAX_RESP
Refers to the step that set the maximum response code (for LISTSTAT).
For @JCL, the MAX_RC label points to the step issuing the highest return code, unless
an ABEND has occurred, when this will be the last abended step, to allow for
situations where ONLY and EVEN is used. For MAX_RC and MAX_RESP, if SETMAX is used
to lower the maximum return code, it will point to the step issuing the highest
return code from that point, which could be the SETMAX statement itself.
If the <label> is not specified, the last executed step or command is used
(LAST_XRC). This default can be altered by OPTIONS IFJCL or OPTIONS IFCMD as
appropriate. For example, @CMD(EQ.0) would allow only a command to run if the
last command that was not flushed ended with a return code of 0.
If both <label> and the comparator are not specified, <label> defaults to LAST_XRC
and the comparator defaults to EQ. For example, @CMD(0) would allow only a
command to run if the last executed command ended with return code 0.
@V(<variable-name>)
where <variable-name> is the name of the variable to return. The VARSUB prefix (for
example, the exclamation mark) must be coded only if you want to return the
value of a variable named within a variable.
66 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
For example, the command:
VARSUB SCAN
SELECT AD ADID(DAILYPLANNING) OBJECT(FREDDO)
DO X = 1 TO !@FREDDO-#ADOP
DISPLAY @V(@FREDDO-ADOP-!X.-ADOPWSID) @V(@FREDDO-ADOP-!X.-ADOPJN)
END
produces output displaying workstation and job name for each operation in the
object:
NONR ZFIRST
CPU1 WSLCLTEX
CPU1 WSLCCPEX
NONR ZLAST
PIF provides access to the IBM Workload Scheduler for z/OS database and plans
at a record and segment level. Because Workload Automation Programming
Language is cross version compliant, see Developer's Guide: Driving IBM Workload
Scheduler for z/OS for notes, restrictions, or limitations that apply to the version you
are using.
If you are deleting a record, the arguments identify the specific record to be
deleted. To delete only some information within an occurrence (for example, one of
its operations), you must first use a MODIFY request to identify the occurrence, then
a DELETE request to delete the operation.
To delete a special resource specification for an operation, you must first use a
MODIFY request to identify the occurrence, then a MODIFY request to identify the
operation, and finally a DELETE request to delete the special resource.
To delete an interval of a current plan workstation, you must precede the DELETE
IVL with a MODIFY CPWS to identify the workstation.
To delete the extended name of an operation, you must use the MODIFY request.
If the DELETE request was used to modify information in the current plan, a later
EXECUTE request must be issued for the modification to take effect: Workload
Automation Programming Language will do this automatically if OPTIONS
EXECUTE(AUTO) is set (this is the default).
Note: IBM Workload Scheduler for z/OS assumes application type A, if you do
not specify the TYPE argument name.
DELETE CL – Calendar
Table 9. DELETE CL – Calendar
Argument Name Description
CALENDAR Calendar ID
Note: Resource CPCOND is valid only for the DELETE request starting from IBM
Workload Scheduler for z/OS version 8.5, or later.
70 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
DELETE CPPRE – Current Plan Predecessor
Table 13. DELETE CPPRE – Current Plan Predecessor
Argument Name Description
PREADID Predecessor application ID
PREIA Predecessor input arrival date and time YYMMDDHHMM
PREOPNO Predecessor operation number
Note:
1. Resource CPSIMP is valid only for the DELETE request starting from IBM
Workload Scheduler for z/OS version 8.5, or later.
Note: Resource CPUSRF is valid only for the DELETE request starting from IBM
Workload Scheduler for z/OS version 8.5.1 SPE, or later.
72 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
CPIVLMOD in CPIVL is set to Y, or else to N. DELETE IVL only affects
modifications. Intervals with CPIVLDP=Y remain after a DELETE, the interval is
reset to the daily planning values and CPIVLMOD is set to N. Intervals with
CPIVLDP=N are fully deleted.
Table 19. DELETE IVL – Current Plan Workstation Interval
Argument Name Description
FROM Interval start date and time YYMMDDHHMM
Note: Resource LTCPRE is valid only for the DELETE request starting from IBM
Workload Scheduler for z/OS version 8.5, or later.
DELETE PR – Period
Table 27. DELETE PR – Period
Argument Name Description
PERIOD Period name
PRTYPE Period type
74 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
DELETE SR – Special Resource
Table 28. DELETE SR – Special Resource
Argument Name Description
RESGROUP Special resource group
RESHIPER DLF resource indicator
RESNAME Special resource name
DELETE VIVL only affects modifications. Intervals with CPVIVLDP=Y remain after a
DELETE, the interval is reset to the daily planning values and CPVIVLMOD is set to
N. Intervals with CPVIVLDP=N are fully deleted.
Table 29. DELETE VIVL – CP Virtual Workstation Interval
Argument Name Description
FROM Interval start date and time YYMMDDHHMM
Note: Resource VIVL is valid only for the DELETE request starting from IBM
Workload Scheduler for z/OS version 8.5, or later.
DELETE WS – Workstation
Table 30. DELETE WS – Workstation
Argument Name Description
WSNAME Workstation name
WSREP Workstation reporting attribute
WSRETYPE Remote engine type:
D IBM Workload Scheduler
Z IBM Workload Scheduler for z/OS
blank
WSTWS Fault tolerant workstation, Y or N
WSTYPE Workstation type
WSWAIT WAIT workstation, Y or N
Note: Resource WSV is valid only for the DELETE request starting from IBM
Workload Scheduler for z/OS version 8.5, or later.
EXECUTE [MCPBLK]
If you are changing more than one current plan occurrence or current plan
workstation before an EXECUTE request, you must complete all changes to one
occurrence or workstation before changing the other. If you do not complete all
changes to one occurrence or workstation, a message is issued and all the changes
made since the last EXECUTE request are reset.
Note: The resource can be only MCPBLK, therefore is optional. Any keywords you
specify on an EXECUTE statement other than MCPBLK are ignored.
Through the parameter file EQQYPARM, you can override the subsystem name
specified in the INIT request, and set a LU name, a TRACE level, and the DATINT
flag.
76 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
generates a TERM request ahead of your INIT request, if you make an INIT request
to a new subsystem while a session is already established.
INIT subsystem
Table 32. INIT subsystem
Argument Name Description
LUNAME This argument allows the user to specify a server or
controller LU name for the program interface session to
communicate through.
MLOGDDN This argument identifies a message log that messages are
written to, rather than the default message log, EQQMLOG.
Each INIT request requires its own message log. If you make
more than one INIT request before a TERM request, or if PIF
is invoked by a program or started task that is already using
EQQMLOG, specify MLOGDDN for each additional INIT
request. If MLOGDDN is not specified, and EQQMLOG is
already in use, message EQQZ038E is written to the
SYSLOG and the INIT request fails.
REMHOST The server host name for the program interface TCP/IP
session. REMHOST and LUNAME are mutually exclusive.
REMPORT The server port number for the program interface TCP/IP
session. REMPORT and LUNAME are mutually exclusive.
When inserting a new occurrence, the input arrival date and time and deadline
date and time can be provided in the arguments. If the input arrival is not
provided when inserting a current plan occurrence, the current date and time is
used (that is, the date and time at which the occurrence is inserted). However, if an
occurrence already exists with this application ID and input arrival date and time,
the next available minute in which no occurrence of this application exists will be
used. You must supply an input arrival date and time if you are inserting an
occurrence in the LTP.
If the INSERT request was used to modify information in the current plan, a later
EXECUTE request must be made for the modification to actually take effect;
Workload Automation Programming Language does this for you automatically if
you set OPTIONS EXECUTE(AUTO) (this is the default).
78 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Table 33. INSERT CPOC – Current Plan Occurrence (continued)
Argument Name Description
GROUP Authority group
GROUPDEF Group definition ID
IA Input arrival date and time YYMMDDHHMM
JCLVTAB JCL variable table
ODESC Descriptive text of owner
OWNER Owner ID
PRIORITY Priority
Note:
1. A DEADLINE argument is accepted also when no IA argument is specified. If the
IA selected by IBM Workload Scheduler for z/OS is later than the DEADLINE
argument value, the argument value is ignored. The default, IA plus 8 hours, is
used.
2. If you specify 24.00 as the IA time, it is converted to 00.00 of the following day.
Valid input arrival times are from 00.00 to 23.59.
3. If you specify 00.00 as deadline, it is converted to 24.00 of the previous day.
Valid deadline times are from 00.01 to 24.00.
4. If you use ALIAS, unique occurrences could be created in the plan; but if
another application with the same name exists, this is never run and the JCL
for these occurrences remains in the JS file indefinitely. Consider using the IBM
Workload Scheduler for z/OS sample EQQPIFJX to maintain the JCL repository.
Note: Resource CPCOND is valid only for the INSERT request starting from IBM
Workload Scheduler for z/OS version 8.5, or later.
80 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Table 35. INSERT CPOP – Current Plan Operation (continued)
Argument Name Description
WSNAME Workstation name
WLMSCLS WLM service class
Note:
1. The occurrence and operation to which the system automation information
refers are identified, respectively, by INSERT/MODIFY CPOC and INSERT/MODIFY
CPOP sequences
2. You can only use INSERT CPSAI for an operation that runs on an automation
workstation.
3. Resource CPSAI is valid only for the INSERT request starting from IBM Workload
Scheduler for z/OS version 8.3, or later.
Note:
1. To create an internal dependency, do not specify either PREADID or PREIA.
2. Resource CPSIMP is valid only for the INSERT request starting from IBM
Workload Scheduler for z/OS version 8.5, or later.
82 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Table 39. INSERT CPSR – Current Plan Operation Special Resource (continued)
RESUSAGE Special resource usage, S or X.
Note: When you use CPSUC to insert an internal dependency, SUCADID and
SUCIA must not be used.
Note:
v Always identify an operation with an INSERT CPOP or MODIFY CPOP request before
using an INSERT CPUSRF request.
v Resource CPUSRF is valid only for the INSERT request starting from IBM Workload
Scheduler for z/OS version 8.5.1 SPE, or later.
84 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Table 46. INSERT VIVL – CP Virtual Workstation Interval
Argument Name Description
FROM Interval start date/time YYMMDDHHMM
PSCAP Parallel server capacity
R1CAP Resource 1 capacity
R2CAP Resource 2 capacity
TO Interval end date and time YYMMDDHHMM
Note: Resource VIVL is valid only for the INSERT request starting from IBM
Workload Scheduler for z/OS version 8.5, or later.
Note:
When you use LIST, the resulting list includes only the common segments of the
records. By default, no other segments is retrieved and Batch Loader statements are
not generated. To do this, you must SELECT a record by adding the keyword
SELECT(Y) to the LIST statements. To make this the default behaviour, specify
OPTIONS SELECT(Y) for all LIST statements. For more details, see “Automatic
SELECT and DELETE” on page 87.
For retrieving current plan occurrences and operations, the default is to retrieve all
matching objects except those in deleted status. When you specify the argument
STATUS, it overrides the default processing.
Argument names specify field names of the record to be tested to determine if the
record should be included in the list.
Note:
1. Because the first blank or comparison-operator symbol ends the argument
value, you cannot search for fields that contain imbedded blanks or
comparison-operator symbols.
2. The wildcard search arguments asterisk (*) and percent sign (%), cannot be
used in the year part (YY) of date arguments.
3. To use a comparison operator (such as <, >, or ≠) in an argument that contains
an IA value including a date and time, specify the complete value as the
argument. The comparison operator can follow this value.
4. The values of PIF arguments as dates depend on the PIF base year, which is
defined by the PIFCWB keyword on the INTFOPTS statement, or the CWBASE
keyword of the INIT statement. The value of the VALTO argument for default
high date depends on the PIFHD keyword of the INTFOPTS statement or the
HIGHDATE keyword of the INIT statement.
5. The IBM Workload Scheduler for z/OS programming interface requires that
you use the Common Segment in LIST requests. WAPL allows the record to be
specified instead, and translates this internally to the common segment before
passing the request to the PIF.
OBJECT
Use the OBJECT keyword to create an object variable for the LISSTAT process and
the record identified.
OBJECT(<name>)
The primary object for the LISSTAT command is a simple object variable that
contains the number of records found by the LISTSTAT command. This is either 1
or 0, because LISSTAT is designed to identify only one record.
Int the following example, the object for the identified record is the object name
suffixed by 1:
LISTSTAT CPOPCOM ADID(TWSCDAILYPLAN) OPNO(010) IA(0805281200)
POLICY(C=0,?=0,20) OBJECT(CHK)
MATCHTYP Argument
Use the MATCHTYP argument for LIST requests with searchable fields that might
contain wildcards or spaces.
When you specify the argument MATCHTYP, the asterisk (*) and percent sign (%)
represent normal characters instead of wildcards, and blank represents a normal
character instead of ending the selection value.
Note:
1. If MATCHTYP has the EXA value specified, a record is selected only if the
value in the record is exactly the same as the argument value.
86 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
2. If MATCHTYP has the PFX value specified, a record is selected only if the start
value in the record is the same as the argument value.
3. If MATCHTYP has the SFX value specified, a record is selected only if the end
value in the record is the same as the argument value.
SAVELIST Argument
Use the SAVELIST argument to save the list of objects that were found for input to
Batch Loader commands to identify the objects to update.
In the following example, the command finds all the applications with the owner
ID starting with ABC and pass that list into Batch Loader command ADSTART to
change the owner ID to start with XYZ:
OPTIONS OUTMASK(Y)
LIST ADCOM OWNER(ABC*) SAVELIST(ABCOWNED)
ADSTART SAVELIST(ABC*) OWNER(XYZ*)
Note: Do not use SAVELIST for names beginning with an underscore (_), because
this is the prefix that Workload Automation Programming Language uses for any
SAVELIST commands that is generated internally. Names prefixed with an
underscore (_) are considered temporary and might be automatically dropped by
commands.
TAG Argument
Use the TAG argument in a LIST command to create an additional output field
called TAG, which will be available in any segment generated by the command.
This allows for the output from multiple LIST commands to be correlated back to
the originating command.
In the following example, the command performs 2 LIST requests: one for the
applications whose names begin with ABC, one for the applications whose owner
ID begins with ABC. The returned records lists the TAG and the ADID. By checking
the TAG, you can determine from which LIST request each record comes.
OUTPUT ADCOM FIELDS(TAG,ADID)
LIST ADCOM ADID(ABC*) TAG(ABCAPPS)
LIST ADCOM OWNER(ABC*) TAG(ABCOWNED)
Note: Any SELECT statements generated from a LIST statement using OPTIONS
SELECT(Y) will automatically be passed the same TAG argument.
The LIST statement can identify sets of records and can be used to automatically
generate and execute SELECT and DELETE statements for each record found by
adding SELECT and DELETE keywords to the LIST statement.
For example, LIST ADCOM ADID(ABC*) VALID(=) SELECT(Y) generates and executes
SELECT statements for each application definition beginning with ABC that is valid
the day of execution.
The SELECT keyword can have values Y or N. If Y is set, every application found by
the LIST statement will also be subsequently have a SELECT command executed for
it. If SELECT is not specified as a keyword N is assumed.
Chapter 5. Data Access commands based on PIF 87
Note: When you use SELECT with LIST CPOPCOM, you can also specify OP,JS,USRF
and ALL (for details, see “LIST CPOPCOM – Current Plan Operation” on page 90).
It is recommended that the DELETE keyword is used in conjunction with the SELECT
keyword so the record is selected before it is deleted. This gives the opportunity
for batch loader to be generated for each object before it is deleted, assuming the
relevant OUTPUT statements are in play. It is recommended that
FILESPEC=EQQFLALL is used to ensure that it is possible to recover the deleted
records.
The DELETE keyword can have values Y, N or D. If Y is set, every application found
by the LIST statement will also be subsequently have a DELETE command executed
for it. If D is set, then deletion of every application is deferred. This results in
DELETE statements being generated for each object and written to an output file for
later execution (see OPTIONS DELFILE). If DELETE is not specified as a keyword N is
assumed.
The SELECT and DELETE statements executed by this method are set to message
level 2. This means that by default you will not see these statements in the job
output, unless they fail. To see these statements even if they are successful set
OPTIONS MSGLEVEL(2).
Defaults for the LIST SELECT and LIST DELETE keywords can be set by OPTIONS
SELECT and OPTIONS DELETE.
88 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Table 47. LIST ADCOM, LIST ADKEY – Application ID, Application Key (continued)
VALID Valid-on date YYMMDD. The Valid-on date is used to find an
application valid on a specific date. Workload Automation
Programming Language uses this to generate the correct
combination of VALFROM and VALTO.
Note: Resource CPCONDCO is valid only for the LIST request starting from IBM
Workload Scheduler for z/OS version 8.5, or later.
Note: By default, occurrences in deleted status are not retrieved when the STATUS
argument is not supplied. If you do not provide the STATUS argument, the request
is processed as STATUS-NE(D).
90 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Table 52. LIST CPOPCOM – Current Plan Operation (continued)
JOBPOL Workload monitor late job policy:
C Conditional mode
D Deadline
L Long duration
S Latest start time
blank Default
MONITOR
Y Operation monitored by an external product
N Operation not monitored by an external
product
OPNO Operation number
OWNER Owner ID
PRIORITY Priority
SHADOWJ Shadow job (Y/N)
STATUS Operation status
USRSYS User sysout support
UFNAME User Field Name
UFVALUE User Field Value
UNEXPRC An Unexpected RC was encountered (Y/N)
VIRTDEST Submission destination (******** represents the
controller)
WAITSE Waiting for Scheduling Environment, N or Y
WLMSCLS WLM service class
WSNAME Workstation name
WAITFORW Started on WAIT workstation, Y or N
WMPRED Waiting for mandatory pending predcessors, Y or N
WPMPRED Waiting for either mandatory pending or pending
predecessors, Y or N
WPPRED Waiting for pending predecessors, Y or N
Note:
1. By default, operations in deleted status are not retrieved when the STATUS
argument is not supplied. If you do not provide the STATUS argument, the
request is processed as STATUS-NE(D).
2. UFNAME, UFVALUE and UNEXPRC are only available as keywords from version 8.5.1
with SPE(USRF) applied and beyond.
3. Using SELECT(Y) with LIST CPOP will SELECT the CPOP record. In addition the
SELECT keyword for LIST CPOP has some additional values – SELECT(OP) will
select the CPOP record (equivalent to Y), SELECT(JL) will select the Job Log,
SELECT(JS) will select the JS file entry, SELECT(USRF) will SELECT the CPUSRF
record for the Operation and SELECT(ALL) will SELECT the CPOP, JL, JS and
CPUSRF records.
4. WMPRED, WMPPRED and WPPRED are available as keywords only starting from
version 9.2.
Note:
1. Both arguments are required. The argument value specified for RESNAME is the
name of the special resource for which the In-Use list or Wait Queue is to be
retrieved.
2. Generic characters are not supported. It is processed as if MATCHTYP(EXA) was
specified; exact match is required for record selection. The argument MATCHTYP
is NOT supported.
Note: Resource CPWSVCOM is valid only for the LIST request starting from IBM
Workload Scheduler for z/OS version 8.5, or later.
92 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Table 56. LIST CSRCOM – Current Plan Special Resource (continued)
RESALCS If any operation is currently allocating the resource
shared, Y or N
RESAVAIL Whether or not the resource is available, Y or N
RESGROUP Resource group name
RESHIPER Whether or not it is a DLF control resource, Y or N
RESNAME Resource name
RESWAIT Whether or not any operation is waiting for the resource
Note:
1. All the arguments are optional. The argument MATCHTYP is supported.
2. Fields CSRXUSE, CSRSUSE, CSRXALL, CSRSALL, CSRWAITQ and CSRCIDATE are only set
for a LIST request. If you have used SELECT(Y) on the LIST request or OPTIONS
SELECT(Y) is in effect then these fields will not be set, or return zero for
numeric fields.
The earliest possible value for FROMDATE is the first day of the
current month four years previous to the current year. For example,
on 8 February 2012 the earliest possible value for FROMDATE is 1
February 2008.
The latest possible value for FROMDATE is the 1st of January seven
years after to the current year. For example, on 8 February 2012 the
latest possible value for FROMDATE is 1 January 2019.
94 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
LIST JSCOM – Current Plan JCL
Table 60. LIST JSCOM – Current Plan JCL
Argument Name Description
ADID Application ID
IA Input arrival date and time YYMMDDHHMM
JOBNAME z/OS job name
OPNO Operation number
WSNAME Workstation name
Note: The resource code JSCOM retrieves JCL records from the JCL repository
data set (JS file) and not from a JCL library. But a SELECT request tries to get JCL
records from a JCL library if they are not found in the JCL repository data set.
Note: VALTO is an undocumented PIF keyword for LIST OICOM. VALTO(EMPTY) is not
part of PIF, it is implemented only by Workload Automation Programming
Language.
Note: Resource WSVCOM is valid only for the LIST request starting from IBM
Workload Scheduler for z/OS version 8.5, or later.
96 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
The arguments can be used both to identify the record to be modified, and to
provide new values for this record. Or, the arguments can be used just to identify a
record, and later requests can be used to perform particular actions. For example,
with a MODIFY request, you can identify a particular current plan occurrence record.
Then, with later INSERT requests, you can insert new operation records for that
occurrence.
The MODIFY request can be used to modify information in the current plan.
Requests that cause a modification of the current plan, except CSR requests,
require a later EXECUTE request for the modification to actually take effect.
With the arguments described here, you specify the names and values of fields,
either to identify a particular record, or provide updated information for a record.
Note: The values of PIF arguments as dates depend on the PIF base year, which is
defined by the PIFCWB keyword on the INTFOPTS statement, or the CWBASE
keyword of the INIT statement. The value of the VALTO argument for default high
date depends on the PIFHD keyword of the INTFOPTS statement or the
HIGHDATE keyword of the INIT statement.
Note:
1. Before specifying a MODIFY CPCOND request, you must always identify an
operation with an INSERT or MODIFY CPOP request.
2. Resource CPCOND is valid only for the MODIFY request starting from IBM
Workload Scheduler for z/OS version 8.5, or later.
Table 67. MODIFY CPCOND – CP Condition
Argument Name Description
CONDID Condition ID (1-999)
COUNT Condition Counter. Used to determine how many
conditional predecessors must be met for the condition to be
true.
Note: Before using a MODIFY CPOP request, you must always identify an occurrence
with a MODIFY CPOC request.
98 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Table 70. MODIFY CPOP – Current Plan Operation
Argument Name Description
AEC Automatic error completion
AJR Automatic job hold/release
ASUB Automatic job submission
CLATE Cancel if late
CLNTYPE Data Set cleanup type
CONDRJOB Conditional recovery job
DEADWTO Issue deadline WTO
DESC Operation descriptive text
DURATION Estimated duration in 100th of second
EDUR Estimated duration HHMM
ERRCODE Error code
Note: You cannot change the error code if the operation runs on
a fault tolerant workstation and is in error status
EXPJCL Expanded JCL option
FORM Form number or blanks
HRC Highest successful return code
JCLASS Job class
JOBCRT Critical job:
N Not eligible for WLM assistance
P Critical path target
W Eligible for WLM assistance
JOBNAME Job name
JOBPOL Workload monitor late job policy:
C Conditional mode
D Deadline
L Long duration
S Latest start time
blank This is the default
MONITOR
Y Operation monitored by an external product
N Operation not monitored by an external product
100 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Table 71. MODIFY CPREND – Distributed remote job info (continued)
REJSNM Remote job stream name
REJSWS Remote job stream workstation
Note:
1. The occurrence and operation to which the system automation information
refers are identified, respectively, by the INSERT or MODIFY CPOC ADID IA
and INSERT or MODIFY CPOP OPNO sequences.
2. You can use MODIFY CPSAI only if the operation runs on an automation
workstation.
3. Resource CPSAI is valid only for the MODIFY request starting from IBM
Workload Scheduler for z/OS V8.3, or later.
Note: Resource CPUSRF is valid only for the MODIFY request starting from IBM
Workload Scheduler for z/OS version 8.5.1 SPE, or later.
Note: Resource CPWSV is valid only for the MODIFY request starting from IBM
Workload Scheduler for z/OS version 8.5, or later.
102 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Table 76. MODIFY CPWSV – CP Virtual Workstation Destination
Argument Name Description
WSNAME Virtual workstation name.
WSDEST Destination (******** represents the controller).
PSC Control on parallel server.
Note: Before using a MODIFY IVL request, you must always identify a workstation
with a MODIFY CPWS request.
Table 78. MODIFY IVL – Current Plan Workstation Interval
Argument Name Description
ALTWS Workstation to take over if this one fails or is set offline
FROM Interval start date and time YYMMDDHHMM
PSCAP Parallel server capacity
R1CAP Resource 1 capacity
R2CAP Resource 2 capacity
Note:
1. Before using a MODIFY VIVL request, you must always identify a workstation
with a MODIFY CPWSV request.
104 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
2. Resource VIVL is valid only for the MODIFY request starting from IBM Workload
Scheduler for z/OS version 8.5, or later.
Table 80. MODIFY VIVL – CP Virtual workstation interval
Argument Name Description
FROM Interval start date and time YYMMDDHHMM
PSCAP Parallel server capacity
R1CAP Resource 1 capacity
R2CAP Resource 2 capacity
REPLACE
The REPLACE request is performed by Workload Automation Programming
Language internally using the Batch Loader functionality to build records before
writing them to the database.
Since the REPLACE request needs a fully formed record to be built in storage, it does
not have a direct command line equivalent in Workload Automation Programming
Language.
RESET [MCPBLK]
If performed before an EXECUTE request, the RESET request deletes a series of MODIFY
current plan requests that have been collected in an MCP block.
The SELECT statement is used to retrieve an individual record from the IBM
Workload Scheduler for z/OS database or plans. You must set enough arguments
to identify one record only; if the arguments apply to more than one record, the
SELECT fails with RC=8 and the following message:
EQQY708E A SELECT REQUEST WITH MORE THAN ONE RECORD SELECTED,
RESOURCE IS AD
The SELECT and DELETE statements can be automatically generated from LIST
requests (for details, see “LIST – Find objects in the Database and Plans” on page
85).
In the following example, the command retrieves the application MYAPPL and
then LIST any event rules that may point to it and any workstation definitions,
special resources, periods, referenced within it. SELECT(Y) causes any items found
by the LIST processes to also have a SELECT statement run for them:
OPTIONS EXPAND(Y) SELECT(Y)
SELECT ADID(MYAPPL)
The end result being, if you have the relevant OUTPUT statements in place, that you
obtain batch loader for the entire object and any other objects needed by it.
When you retrieve a record by using SELECT, you can get the complete record
rather than just the common segment that is available from a LIST request. For
example, SELECT AD retrieves the complete AD record, while SELECT ADCOM retrieves
only the common segment.
Note:
1. The SELECT JS and SELECT JSCOM requests try to retrieve JCL from the JCL
repository. If no JCL is found, it is retrieved from the JCL library or through the
job-library-read exit, EQQUX002. The full key is required, that is, the
application ID, the input arrival time, and the operation number. You might
need to precede the SELECT JS request by a LIST CPOPCOM request to get the key
values.
2. LIST JSCOM requests try to retrieve JCL only from the JCL repository.
3. SELECT CPOPSRU can be issued for list elements only, from a list created by LIST
CPOPSRU.
4. The values of PIF arguments as dates depend on the PIF base year, which is
defined by the PIFCWB keyword on the INTFOPTS statement, or the CWBASE
keyword of the INIT statement. The value of the VALTO argument for default
high date depends on the PIFHD keyword of the INTFOPTS statement or the
HIGHDATE keyword of the INIT statement.
5. CPST (current plan status) is only one record; therefore, select arguments are not
required.
106 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
OBJECT Argument
Use the OBJECT argument to create an object variable for the record retrieved by the
SELECT command.
OBJECT(<name>)
The record that is found creates a complete set of object variables containing all the
record information, using the object name as the prefix.
For example, the following request creates a set of object variables named @DAILY,
which will contain the data for the record that is retrieved. Therefore, !@DAILY-ADID
would resolve to the application name of the retrieved record.
SELECT AD ADID(DLYAPPL) OBJECT(DAILY)
TAG Argument
Use the TAG argument in a SELECT command to create an additional output field
named TAG that will be available in any segment generated by the command. This
allows for the output from multiple SELECT commands to be correlated back to the
originating command.
In the following example, the returned records are marked with a TAG value of
TODAY or TOMORROW, depending from which LIST statement they come.
OUTPUT ADCOM FIELDS(TAG,ADID,ADFROM,ADSTAT)
SELECT ADCOM ADID(ABC123) VALID(=) TAG(TODAY)
SELECT ADCOM ADID(ABC123) VALID(+1) TAG(TOMORROW)
Note: Any SELECT statements generated from a LIST statement using OPTIONS
SELECT(Y) is automatically passed the same TAG argument.
Note: If you do not specify the AD argument name TYPE, IBM Workload
Scheduler for z/OS assumes application of type A.
Note: Resources CPCOND and CPCONDCO are valid only for the SELECT request starting
from IBM Workload Scheduler for z/OS version 8.5, or later.
108 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Table 85. SELECT CPOC – Current Plan Occurrence (continued)
ADID Application description
GROUP Authority group
GROUPDEF Group definition ID
IA Input arrival date and time YYMMDDHHMM
MCPADDED Manually added to the Current Plan, Y or N
MONITOR
Y Occurrence with at least one operation
monitored by an external product
N Occurrence with no operation monitored by an
external product
OWNER Owner ID
PRIORITY Priority
RERUN Rerun requested, Y or N
STATUS Occurrence status
Note:
1. SELECT CPOP does not return CPCOND or CPUSRF information. For these resources,
you must use separate SELECT statements.
2. WMPRED, WPMPRED and WPPRED are available only from version 9.2.
Note: Resource CPUSRF is valid only for the SELECT request starting from IBM
Workload Scheduler for z/OS version 8.5.1 SPE, or later.
110 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Table 88. SELECT CPWS/CPWSCOM – Current Plan Workstation (continued)
WSNAME Workstation name
WSREP Workstation reporting attribute
WSRETYPE Remote engine type:
D Distributed
Z z/OS
blank
WSTWS Fault-tolerant workstation, Y or N
WSTYPE Workstation type
WSVIRT Virtual workstation, Y or N
WSWAIT WAIT Workstation, Y or N
WSZCENTR z-Centric workstation, Y or N
Note: Resources CPWSV and CPWSVCOM are valid only for the SELECT request starting
from IBM Workload Scheduler for z/OS version 8.5, or later.
Note:
1. Arguments, ADID, OPNO, and IA must be specified together.
2. The operation identified by the arguments must be a critical job (P).
3. This Workload Automation Programming Language command exploits an
undocumented PIF request designed for the Dynamic Workload Console.
Note: Fields CSRXUSE, CSRSUSE, CSRXALL, CSRSALL, CSRWAITQ, and CSRCIDATE are set
only for a LIST request. For a SELECT request, these fields are not set or return zero
for numeric fields.
112 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
SELECT JCLV/JCLVCOM – JCL Variable Table
Table 95. SELECT JCLV/JCLVCOM – JCL Variable Table
Argument Name Description
JCLVTAB JCL Variable Table ID
Note:
1. SELECT JL will cause the job log of the selected operation to be output. If the
job log has not already been retrieved then this will trigger a retrieval action
and Workload Automation Programming Language will attempt the SELECT
command again in accordance with the retry policy set by OPTIONS
CONTENTION.
2. The SELECT JL command exploits an undocumented PIF request designed for
the Dynamic Workload Console.
114 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Table 103. SELECT WSV/WSVCOM – Virtual workstation destination (continued)
WSNAME Virtual workstation name.
WSDEST Destination name. For using the controller itself as a
destination enter a value of ********.
Note: Resources WSV and WSVCOM are valid only for the MODIFY request starting from
IBM Workload Scheduler for z/OS version 8.5, or later.
It produces the same result as the T and F commands available from the MCP
dialog.
Note:
1. PREADID, PREIA, PREOPNO, PROCSTEP, and STEPNAME are used to
identify the dependency to update.
2. The SETSTAT request is available only starting from IBM Workload Scheduler for
z/OS version 8.5, or later.
TERM
116 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Chapter 6. Current Plan Operation commands
Use the Current Plan Operation commands to perform specific functions against
operations in the current plan, using a common set of keywords to identify the
operation you want.
These commands are designed to simplify the process of finding and updating
operations in the current plan.
Common syntax
Use the current plan operation commands to work with operations, by using a
common syntax with specific sets of keywords.
The current plan operation commands use the following sets of keywords:
Identification keywords
To identify the potential operations to update, using combinations of
Application ID, Job name, Workstation, Input Arrival, Operation, and
Status.
Filter keywords
To choose one or more operation from the list of identified operations.
| Data keywords
| To manage the data related to the list of identified operations.
Command keywords
Specific to the action to be performed.
You can use the special keyword UPDATE(NO|YES) to verify the process before it is
performed. The keyword determines if the commands actually performs the
updates: if you specify NO, the command reports what it would do to each
operation, but does not perform any updates. The default value is YES, but this
default can be influenced by OPTIONS UPDATE.
Each command can have its own specific optional keywords, followed by common
keywords to identify and select the operations:
<command> <arguments> ADID(<adid>) IA(<iadatetime>)| ==
JOBNAME(<jobn>) OPNO(<opno>) + other identification keywords
WSNAME(<wsid>) DATE(<iadate>) TIME(<iatime>)
STATUS(<status>) USRF(<name>=<value>)
RANGE(<range>) POSITION(EARLIEST|LATEST)
COUNT(<count>)
OBJECT(<object>) SAVELIST(<list>) USELIST(<list>)
[FAIL(SKIP|STOP)]
The MATCHTYP keyword must be used if the <value> for USRF contains an asterisk (*)
or percent sign (%) that is to be treated as non-wildcard character. MATCHTYP is not
needed for STATUS(*), because it is always treated as “Ready with none-reporting
predecessor”.
Identification keywords
Use the following keywords to identify the potential operations to update. You can
use any combination of the following keywords.
118 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
OWNER(xxxxxxxxxxxxxxxx)
Searches for operations by owner ID.
PRIORITY(n)
Searches for operations by priority.
SHADOWJ(Y|N)
Allows shadow jobs to be identified.
UNEXPRC(Y|N)
Allows conditional jobs with unexpected return codes to be identified.
USRSYS(Y|N)
Allows jobs that store user sysout to be identified.
VIRTDEST(xxxxxxxx)
Searches for jobs submitted on the specified destination.
WAITFORW(Y|N)
Allows wait operations to be identified.
WAITSE(Y|N)
Allows operations waiting for a scheduling environment to be identified.
WLMSCLS(xxxxxxxx)
Searches for operations by WLM service class.
WMPRED(Y|N)
Allows operations waiting for mandatory pending predecessors to be
identified.
WPMPRED(Y|N)
Allows operations waiting for either mandatory pending or pending
predecessors to be identified.
WPPPRED(Y|N)
Allows operations waiting for pending predecessors to be identified.
WSNAME(<wsname>)
Searches for operations scheduled on the <wsname> workstation. You can
use wildcards asterisk (*) and percent sign (%).
STATUS(<status>)
If not specified, the command uses the status default values, as described
hereafter. You can use the NE modifier to specify all statuses except one. For
example, STATUS-NE(C) finds all statuses except Complete (C). STATUS(*)
selects only the status of * (Ready with none-reporting predecessor). To
find more than one status, you can list all the statuses in the same
keyword; for example STATUS(AR*) lists the statuses Arriving, Ready and
Ready with none-reporting predecessor. To list all possible values for
status, use the percent sign (%), like in STATUS(%).
DATE(<yymmdd>) (or IADATE)
Searches for operations scheduled with a particular application input
arrival date in the format YYMMDD. You cannot use wildcards, but you
can use relative dates:
= The current date
+n The current date + n days
-n The current date - n days
TIME(<hhmm>) (or IATIME)
Searches for operations scheduled at a particular application input arrival
You can use comparators can be used, for exampleDATE-LE, on all identification
keywords except TIME. The DATE and TIME fields are combined to form an Input
Arrival time search, therefore the comparator specified against DATE is used as the
comparator for the combined Input Arrival.
Filter keywords
Use the filter keywords to select the operations to be modified from the list found
by the identification keywords.
120 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Any positive number selects that number of operations from the starting
position included; if you specify a number higher than the number or
records found matching the criteria, all matching operations are selected. A
value of COUNT(0) selects however many operation are found matching the
criteria.
A negative value selects however many operations are found, minus the
number in count. For POSITION(EARLIEST), a negative count drops the
latest entries off the list, for POSITION(LATEST) a negative count drops the
earliest entries off the list. For example, POSITION(EARLIEST) COUNT(-1)
selects all except the latest operation found; POSITION(LATEST) COUNT(-1)
selects all except the earliest operation found.
Note:
1. RANGE keywords are processed before POSITION and COUNT
For example, you could find 20 operations, but the RANGE might filter that down
to 10. POSITION will start at the earliest or latest operation within the 10, so at
most you will be able to select 10 operations.
2. MATCHTYP is not compatible with these commands due to the use of not equals
comparators for handling multiple dependencies. This means that for user
fields and special resource names, the asterisk (*) and percent sign (%) are
considered wildcards if used in keywords, and use of comparator characters,
such as =, ¬=, <, >, <= and >= at the end of a keyword, are considered as field
comparators and not part of the field or resource name.
Data keywords
Use the data keywords to specify what to do with the data identified by the
command.
You can then identify the filtered records by using a loop to extract the record
numbers from the @FILTER attribute:
DO X = 1 TO WORDS(@V(@CPO-@FILTER))
VARSET Y = WORD(@V(@CPO-@FILTER),@V(X))
DISPLAY "IA="||@V(@CPO!Y.-CPOPIA)
END
Performance considerations
The Identification keywords run a query against the IBM Workload Scheduler for
z/OS Current Plan, and extract key information for every operation that matches.
122 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
The Filter keywords filter down this information before taking action. The more
precise you are in the Identification keywords, the faster the process will complete.
Therefore, consider how many matches you might expect to find on the current
plan at any one time using the Identification keywords when considering the
estimated duration of the command.
Note: Using these commands can produce a lot of updates to the current plan, if
you use the COUNT(0) feature. This can be across many different occurrences. The
command automatically performs a PIF EXECUTE MCPBLK command after every
change of occurrence to ensure no more than 255 operations are modified in a
single transaction.
By default, the date and time is the current date and time when the command is
processed. However, you can change this value to be relative to the Input Arrival
time of the job running the commands by using the OPTIONS statement and set the
Workload Automation Programming Language internal DATE and TIME to match the
variables containing the running job's input arrival details.
For example, to NOP a job the day before the input arrival date of the running job
use the following command:
VARSUB SCAN
OPTIONS DATE(!OYMD1.) TIME(!OHHMM)
NOP JOB(MYJOB) WSNAME(CPU1) DATE(-1)
Note: DATE, TIME, and RANGE refer to the Application Input Arrival time of the
operation being targeted, not to the Operation Input Arrival time.
For example, you could run a command that is trying to HOLD an operation that
is already held, or add a dependency that is already present. In most cases, the
IBM Workload Scheduler for z/OS PIF would fail with RC 8, but the Current Plan
Operation commands check the current state before attempting to perform the
command. Therefore, if you attempt to HOLD an operation that is already held, or
QUEUE for an operation that is already a predecessor, Workload Automation
Programming Language issues message EQQI162A and the command ends with
RC 0.
If you require notification when such conflicts occur, use the SETSEV command to
alter the severity of message EQQI162A to issue a return code. For example:
07/02 12.08.22 EQQI200I SETSEV 162W
07/02 12.08.22 EQQI007A Message 162 changed from A to W
07/02 12.08.22 EQQI299I Statement completed - RC=0
07/02 12.08.22 EQQI200I QUEUE SUCC1
07/02 12.08.23 EQQI013A Job QUEUEJOB,JOB01725 in QUEUE 1407011812 CPU1_005
07/02 12.08.24 EQQI161A SELECTED: MODOPTEST1 1406281807 MANC_020 SUCC1 W
07/02 12.08.24 EQQI162W No action - already in correct state
07/02 12.08.24 EQQI299I Statement completed - RC=4
Use the FIND command to find a set of operations and save the list without
performing any action. You can use other commands to perform the needed
actions. For example:
FIND MYJOB SAVELIST(MYLIST)
HOLD USELIST(MYLIST)
ALTER USELIST(MYLIST) DROPPRED(EXTERNAL)
ALTER USELIST(MYLIST) NEW_STATUS(C)
RELEASE USELIST(MYLIST)
| The EQQWXMOD WAPLEXEC is now being deprecated and is not developed further to
| accommodate any new features of IBM Workload Scheduler for z/OS. Use the
| equivalent commands within Workload Automation Programming Language,
| instead.
ALTER
Use the ALTER command to modify the attributes on an operation.
ALTER <identification> <filter> <data> <modify-cpop-keywords>
[NEW_WSNAME(<wsname>)] [NEW_JOBNAME(<jobname>)] [NEW_STATUS(<status>)]
[UFNAME(<usrf_name>)] [UFVALUE(<usrf_value>)]
[DROPPRED(INTERNAL|EXTERNAL|ALL|<pred>)]
[DROPSUCC(INTERNAL|EXTERNAL|ALL|<succ>)]
[DROPUSRF(<ufname>)]
[DROPSR(<special-resource>)]
where:
124 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
<identification>
Keywords to identify the operations to update. For details, see
“Identification keywords” on page 117.
<filter>
Keywords to select the operations from the list. For details, see “Filter
keywords” on page 120.
<data> Keywords to store data from the command. For details, see “Data
keywords” on page 121.
<modify-cpop-keywords>
Additional keywords to specify the changes you want to make to the
operation. The following keywords are available (for detailed information,
see “MODIFY CPOP – Current Plan Operation” on page 98):
| v ASUB(Y|N)
| v CLATE(Y|N)
| v DEADWTO(Y|N)
| v DESC(up to 24 characters)
| v DURATION(100th of seconds)
| v EDUR(HHMM)
| v FORM(form number)
| v HRC(0-4095)
| v JCLASS(job class)
| v NEW_CLNTYPE(A|I|M|N)
| v NEW_CONDRJOB(Y|N)
| v NEW_ERRCODE(errcode)
| v NEW_EXPJCL(Y|N)
| v NEW_JOBCRT(N|P|W)
| v NEW_JOBNAME(job name)
| v NEW_JOBPOL(C|D|L|S)
| v NEW_MONITOR(Y|N)
| v NEW_STATUS(A|C|E|I|R|S|U|X|*)
| v NEW_USRSYS(Y|N)
| v NEW_WLMSCLS(WLM service class)
| v NEW_WSNAME(workstation name)
| v OPDL(YYMMDDHHMM)
| v OPIA(YYMMDDHHMM)
| v PSUSE(1-99)
| v R1USE(1-99)
| v R2USE(1-99)
| v RERUT(Y|N|blank)
| v RESTA(Y|N|blank)
| v TIMEDEP(Y|N)
| v USERDATA(operation user field)
UFNAME Optional keyword that specifies the name of a user field to be updated for
the selected job. If UFNAME is specified and UFVALUE is not, the field is set to
blanks.
UFVALUE
Optional keyword that specifies the value to set the user field named by
UFNAME for the selected job. If UFVALUE is specified, UFNAME must also be
specified.
DROPPRED and DROPSUCC
Optional keywords that can cause the operation’s predecessor or successor
links to be deleted. The valid values are:
To remove internal successors, the application must be designed in such a way that
the removal of the dependencies does not create an inconsistent application. By
default, if the result of removing internal dependencies would result in some
operations becoming entirely separate from the rest of the occurrence then the
command will fail. When you useDROPPRED or DROPSUCC, ensure that the application
is designed specifically to manage such eventualities, in preference to OPTIONS
DROP.
126 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
<succjob>
Name of the job that is used to become a successor to both sides of the
dropped dependency. The default is ZRELINK.
<succtext>
Operation description that is used if a successor operation is inserted. The
default is Relink dropped deps.
NONR_001 NONR_001
ZFIRST ZFIRST
STATUS=C STATUS=W
CPU1_005 CPU1_005
JOB005 JOB005
STATUS=C STATUS=W
CPU1_010 CPU1_010
JOB010 JOB010
STATUS=E STATUS=W
CPU1_015 CPU1_015
JOB015 JOB015
STATUS=W STATUS=W
Note:
1. If there is already a dependency in place to a valid <predop> or <succws>
operation, the dependency is not dropped, even if identified by the ALTER
command as being a dependency to drop.
2. Specifying OPTIONS DROP causes batch to carry on processing from the point of
the dropped dependency, in contradiction to the original design of the
application. If OPTIONS DROP is coded in a default OPTIONS member, this could
be unknown to some of your user base, and result in unexpected behavior.
OPTIONS DROP must be set only in the jobs where it is to be applied.
BIND
Use the BIND command to trigger an operation on a shadow workstation, to
attempt to bind to its counterpart on the remote engine.
where:
<identification>
Keywords to identify the operations to update. For details, see
“Identification keywords” on page 117.
<filter>
Keywords to select the operations from the list. For details, see “Filter
keywords” on page 120.
<data> Keywords to store data from the command. For details, see “Data
keywords” on page 121.
FIND
Use FIND to find an operation, or a set of operations, matching the input criteria. It
performs no action against the operation, therefore you can use it to create OBJECT
variables or SAVELISTs to be later processed by other commands.
where:
<identification>
Keywords to identify the operations to update. For details, see
“Identification keywords” on page 117.
128 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
<filter>
Keywords to select the operations from the list. For details, see “Filter
keywords” on page 120.
<data> Keywords to store data from the command. For details, see “Data
keywords” on page 121.
FORCE
Use FORCE to submit an operation that could otherwise wait for special resources,
workstation shutdown or that has job submission disabled. If the operation has
predecessors outstanding, it cannot be forced. This command is equivalent to the
EX command in ISPF panels.
where:
<identification>
Keywords to identify the operations to update. For details, see
“Identification keywords” on page 117.
<filter>
Keywords to select the operations from the list. For details, see “Filter
keywords” on page 120.
<data> Keywords to store data from the command. For details, see “Data
keywords” on page 121.
HOLD
Use HOLD to add a Manual Hold condition to an operation. This means the
operation waits to be manually released after all of its prerequisites have been met.
where:
<identification>
Keywords to identify the operations to update. For details, see
“Identification keywords” on page 117.
<filter>
Keywords to select the operations from the list. For details, see “Filter
keywords” on page 120.
<data> Keywords to store data from the command. For details, see “Data
keywords” on page 121.
Note: If you try to hold an operation that is already held, the command fails with
RC=8.
KILL
Use KILL to kill an operation on a fault-tolerant or z-centric workstation.
where:
NOP
Use NOP to specify a No Process condition against an operation. This means that
when the operation’s prerequisites have been met, IBM Workload Scheduler for
z/OS sets the operation complete.
where:
<identification>
Keywords to identify the operations to update. For details, see
“Identification keywords” on page 117.
<filter>
Keywords to select the operations from the list. For details, see “Filter
keywords” on page 120.
<data> Keywords to store data from the command. For details, see “Data
keywords” on page 121.
QUEUE_BEHIND
Use QUEUE_BEHIND to make become the running job, or other jobs in the same
occurrence as the running job, a successor behind the identified operations. The
QUEUE_BEHIND command can be abbreviated to QUEUE.
QUEUE_BEHIND <identification> <filter> <data> [CONNECT(THIS|SUCC)]
[INSERT(CONNECTED|ENDPOINT|NONE)]
where:
<identification>
Keywords to identify the operations to update. For details, see
“Identification keywords” on page 117.
<filter>
Keywords to select the operations from the list. For details, see “Filter
keywords” on page 120.
<data> Keywords to store data from the command. For details, see “Data
keywords” on page 121.
CONNECT
Specifies the job to connect to the operations identified by the command. If
set to THIS, the job currently running the command becomes a successor to
the identified jobs. If set to SUCC, the internal successors of the job currently
running the command becomes a successor to the identified jobs. If set to
130 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
THIS, the job returns to the Waiting status until the newly applied
predecessors have run. After the predecessors have run, the job is rerun
and might find new predecessors. If CONNECT(SUCC) is specified and the job
running the command has no successors, the command fails.
INSERT Specifies whether to insert the connected job, or occurrence after the
identified job, so that it becomes a predecessor to the successors of the
identified job. Specifying CONNECTED, makes the jobs identified by the
CONNECT keyword a predecessor to the successors of the operations
identified by the command. Specifying ENDPOINT will find the end points of
the occurrence and make them a predecessor to the successors of the
identified job. Specifying NONE will not insert the running occurrence before
the successors of the identified job (this is the default). If anything other
than INSERT(NONE) is specified and the job identified by the QUEUE_BEHIND
command has no successors, the command fails.
RELEASE
Use RELEASE to remove a Manual Hold condition from an operation. This means
that the operation is ready to be run after all of its prerequisites have been met.
where:
<identification>
Keywords to identify the operations to update. For details, see
“Identification keywords” on page 117.
<filter>
Keywords to select the operations from the list. For details, see “Filter
keywords” on page 120.
<data> Keywords to store data from the command. For details, see “Data
keywords” on page 121.
Note: If you try to release an operation that is not already held, the command fails
with RC=8.
REPLY
Use REPLY to reply to a recovery prompt for FT operations.
where:
<identification>
Keywords to identify the operations to update. For details, see
“Identification keywords” on page 117.
<filter>
Keywords to select the operations from the list. For details, see “Filter
keywords” on page 120.
UNNOP
Use UNNOP to remove a No Process condition against an operation.
Using the UNNOP command means that when the operation’s prerequisites are met,
IBM Workload Scheduler for z/OS will no longer mark the operation complete.
where:
<identification>
Keywords to identify the operations to update. For details, see
“Identification keywords” on page 117.
<filter>
Keywords to select the operations from the list. For details, see “Filter
keywords” on page 120.
<data> Keywords to store data from the command. For details, see “Data
keywords” on page 121.
132 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Chapter 7. Current Plan Occurrence commands
Use the Current Plan Occurrence commands to perform specific functions against
all operations within a single occurrence in the current plan, using a common set
of keywords to identify the occurrence.
Common keywords
Use the Current Plan Occurrence commands to run commands against a specific
occurrence by using a common syntax.
You can use the special keyword UPDATE(NO|YES) to verify the process before it is
performed. The keyword determines if the commands actually performs the
updates: if you specify NO, the command reports what it would do to each
operation, but does not perform any updates. The default value is YES, but this
default can be influenced by OPTIONS UPDATE.
where CRITERIA names a user field prefix to use for specifying date logic
expressions against. The prefix is used to identify IF, DO, and EL user fields to
define the date logic and a corresponding set of attributes to alter.
The command searches for matching user fields in each operation within the same
occurrence. The fields must be coded with matching <field-prefix> and <tag>
elements of the name with one IF, at least one DO user field, and optional EL fields,
using the following convention:
<field-prefix>-<tag>-IF
The user field with date logic.
<field-prefix>-<tag>-DO
The user fields containing the ALTER keywords to act upon when the
corresponding IF is true. At least one DO keyword must be coded for each
IF.
EL* The user fields containing the ALTER keywords to act upon when the
corresponding IF is false.
In the following example, user field ABC-03-IF checks to see if the day is a
workday: if true, it runs ABC-03-DO, if it is not a workday, it runs ABC-03-EL1 and
ABC-03-EL2.
ABC-03-IF = @(WORKDAY)
ABC-03-DO = TIMEDEP(Y)
ABC-03-EL1 = TIMEDEP(N)
ABC-03-EL2 = DROPSR(’DONT.RUN.WITH.CICS’)
The IF user field can contain any valid REXX Expression, containing date logic
variables, Workload Automation Programming Language variables or IBM
Workload Scheduler for z/OS JCL variables (for details, see “IF-THEN-ELSE –
Conditional execution” on page 44). The variables are evaluated by the operation
running the ALTIF command, hence their values are set in relation to that
operation.
The DO and EL user fields can contain any action keywords from the ALTER
command. The identification, filter, and data keywords are managed internally by
the ALTIF command; you must use only the keywords that cause operation
modification. Each individual DO or EL user field causes an individual ALTER
statement to be run. The ALTER statements are run in the sort sequence of the user
field names. For details, see “ALTER” on page 124.
Note:
v If you set an -IF User Field without at least one corresponding -DO user field,
the ALTIF command fails with RC=8.
v When UPDATE(N) is set, to see the ALTER commands that would have been issued
use OPTIONS MSGLEVEL(2). To see the low level PIF commands that would have
been issued, use OPTIONS TRACE(1).
where:
USRF Specifies a user field and value to decide which operations to run. You can
use the keyword comparators EQ and NE. When EQ is used, it runs only
operations marked with the combination of field name and value. When NE
is used, it runs only operations not marked with the combination of field
name and value.
134 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
CRITERIA
Names a user field prefix to use for specifying date logic expressions
against. The prefix is used to identify positive and negative rule user fields.
For example, CRITERIA(RUNME) looks for user fields with the format
RUNME-POS-nn and RUNME-NEG-nn to contain the date logic rules for each
operation.
DROPSR(YES|NO)
Instructs the RUNIF command to remove special resources from operations
identified as being ineligible to run. If resources are not removed, the
operations could wait for special resources, even if they were moved to a
non-reporting workstation. This might even affect the availability of
resources if the use OnComplete. The default is YES.
DROPTIME(YES|NO)
Instructs the RUNIF command to remove any time dependency from any
operations identified as being ineligible to run. If time dependencies are
not removed the operation will wait until the time dependency has been
satisfied, even if the operation was moved to a non-reporting workstation.
WSNAME Specifies the workstation where the operations that are not required are
moved by the RUNIF process. This must be a general non-reporting
workstation.
All fields are optional, but you must specify at least one USRF and one CRITERIA . If
both USRF and CRITERIA are specified, the USRF keyword is processed first, and only
the operations that pass the USRF test have their CRITERIA fields processed.
The contents of the CRITERIA user fields can contain Workload Automation
Programming Language variables that can be set in the same operation as the
RUNIF command. For substitution to take place, variable substitution must be
activated in the same job as the RUNIF command.
The following example shows a basic RUNIF usage with variables as criteria, where:
v Operation 001 runs Monday to Friday
v Operation 005 runs Monday and Tuesday
v Operation 010 runs Monday and Tuesday
v Operation 015 runs Wednesday and Thursday
v Operation 020 runs Wednesday and Thursday
v Operation 255 runs Monday to Friday
The USRF keyword can be used to provide different execution routes through an
application depending on the contents of a variable in a JCL variable table.
Varying the name of the user field to be used allows the same operation to be
permissible on multiple routes through the application.
Both the variable value and presence of the RUNIF command can be varied at
submission time if the application is added to the current plan dynamically.
Using the same user field name allows an application to be divided into sub
applications, allowing the application to run as a whole if no RUNIF command is
set, or only running a sub set of the operations if RUNIF is executed specifying a
particular value for the user field.
The following example shows a basic RUNIF usage with variables to select the
route, where:
When variable ROUTE in table MYTABLE is set to ROUTE1
v Operation 001 runs
v Operation 005 runs
v Operation 010 runs
v Operation 015 does not run
136 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
v Operation 020 runs
v Operation 025 does not run
v Operation 255 does not run
When variable ROUTE in table MYTABLE is set to ROUTE2
v Operation 001 runs
v Operation 005 runs
v Operation 010 does not run
v Operation 015 runs
v Operation 020 does not run
v Operation 025 runs
v Operation 255 does not run
The following example shows a basic RUNIF usage with the RUNIF command being
varied at submission time, where:
v EQQ-SYSIN-02 contains a commented template of the RUNIF command to be
replaced at submission time by a real version of the RUNIF command. When
submitted unmodified, all operations will run.
v When an occurrence is submitted as follows:
INSERT CPOC ADID(MYAPPL)
MODIFY CPOP OPNO(001)
MODIFY CPUSRF UFNAME(EQQ-SYSIN-02)
UFVALUE(’RUNIF USRF(SUBAPPL=GRPA) WSNAME(NONR)’)
– Operation 001 runs
– Operation 005 runs
– Operation 010 runs
– Operation 015 runs
– Operation 020 does not run
– Operation 025 does not run
– Operation 255 does not run
v When an occurrence is submitted as follows:
INSERT CPOC ADID(MYAPPL)
MODIFY CPOP OPNO(001)
MODIFY CPUSRF UFNAME(EQQ-SYSIN-02)
UFVALUE(’RUNIF USRF(SUBAPPL=GRPB) WSNAME(NONR)’)
– Operation 001 runs
– Operation 005 does not run
– Operation 010 does not run
– Operation 015 does not run
– Operation 020 runs
– Operation 025 runs
– Operation 255 does not run
Note: This command changes the workstation where operations run, alters the
time dependency attribute, and removes special resources from operations. If the
RUNIF criteria were specified incorrectly and a rerun is required, you need to
restore the occurrence to its original state, either by submitting a new occurrence in
its place, or manually restoring the workstation names, time dependency attributes,
and special resources, according to the database definition of the application.
138 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Chapter 8. Function Based commands
The Function Based commands combine various low level PIF commands. Use the
Function Based commands to perform specific scheduling or operational functions.
Note: The ADD command uses the same keywords used with other PIF and
Workload Automation Programming Language commands. For consistency with
the OCL ADD command, you can use APPL as an alternative to ADID, GROUP as an
alternative to GROUPDEF, VARTAB as an alternative to JCLVTAB, and CPDEPR and
GDEPRES as an alternative to DEPRES. For consistency with repeating run cycles in
Batch Loader, you can use IATIME as an alternative to FROM, RPTEND as an alternative
to UNTIL, and RPTEVRY as an alternative to EVERY.
If you specified the keyword UNTIL or EVERY, the ADD command is used in REPEAT
mode.
140 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
downgraded to information by running command SETSEV 051I prior to the
ADD command in the same Workload Automation Programming Language
step.
Note: If FINDIA appears to have skipped an Input Arrival minute, this is due to
occurrences that have been manually deleted from the current plan. IBM Workload
Scheduler for z/OS cannot reuse an input arrival time for an application, even if it
was deleted.
Note: To select the REPEAT mode behaviour, you must specify at least UNTIL or
EVERY.
FROM(hhmm)
Sets the earliest Input Arrival time for a repeating cycle to start from. If
FROM is specified earlier than UNTIL, UNTIL is considered to be after
midnight. For values of RESOLVE other than GAP, the FROM time is used as
the base to calculate multiples of EVERY to help chose the next Input Arrival
time. If FROM is not specified, the current time is used for the first instance
and passed to subsequent instances.
UNTIL(hhmm)
Sets the latest Input Arrival time for a repeating cycle to end. If UNTIL is
not specified, one minute prior to the current time is used for the first
instance and passed to subsequent instances.
EVERY(hhmm)
Sets the interval of hours and minutes to use to calculate the next Input
Arrival time. If EVERY is not specified, 1 hour is used.
COUNT(nnnn)
Sets a limit to the number of instances of the occurrence is allowed to
repeat.
ORIGIN Specifies the time used to base the calculation for the next interval:
END The current time (logical end point of the process). This is the
default.
START The start time of the occurrence (Occurrence Actual Arrival).
IA The Input Arrival.
RESOLVE
Specifies the rules used to calculate the next interval:
NEXT Uses the next multiple of the EVERY time after the ORIGIN time.
GAP Adds the EVERY interval to the ORIGIN time.
BOTH Adds the EVERY interval to the ORIGIN time and then take the next
multiple of the EVERY time.
hhmm Uses the next multiple of the EVERY time that is at least hhmm time
from the ORIGIN time
NOTIFY(N|W|E)
Controls behaviour when an ADD command has determined that no more
occurrences are to be added:
N Command ends with RC=0 for standard termination causes.
W Command ends with RC=4 if next detected Input Arrival is outside
Note: EARLY(CONTINUE) must be used only as an option for restart. It must ever be
coded in permanent SYSIN, because it prevents protection for missing Time
Dependencies and might result in many instances of the occurrence running in
close succession.
142 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
v When DLDAY and DLTIME are both set, the deadline is the specified time on the
relative day.
If DLDAY is explicitly set to 0 and DLTIME is earlier than the FROM time, the
submission fails.
v In all other cases, the gap between the IA and deadline or the currently running
occurrence will be used to calculate new deadline.
The simplest example of the command is ADD ADID(MYAPPL), which adds a single
occurrence of MYAPPL using the current time, or nearest available minute as the
Input Arrival and lets IBM Workload Scheduler for z/OS determine the deadline
using normal rules.
More complex versions of the command can be used in conjunction with IBM
Workload Scheduler for z/OS relative date and time processing. In the following
example, you set the Input Arrival to be 15 minutes from the current time and the
deadline to be 30 minutes from the current time, automatically adjusting if
midnight is within those timescales. Use of relative times for the IA keyword
allows occurrences to be submitted, with time dependencies to run at a relative
point in the future.
ADD GROUPDEF(MYGROUP) IA(+15) DLTIME(+30)
Use the REPEAT mode to dynamically schedule a repeating occurrence between set
times, or for a certain number of occurrences. The maximum period of repeating is
24 hours, after which a new cycle must be initiated.
When you use the ADD command in REPEAT mode it resubmits only the same
occurrence or group. If it is included in an occurrence that is part of a group, the
entire group is resubmitted, otherwise only the single controlling application is
resubmitted. For this reason, the ADID or GROUPDEF keyword is not needed.
However, if you specify any of them and it does not match the current occurrence
or group, the ADD command fails.
Modifying the ORIGIN and RESOLVE keywords will influence when the next
occurrence is scheduled to start.
Note: To ensure that each repeating occurrence waits until the Input Arrival time
is reached, you must set the Time Dependency flag on the first operation in the
occurrence.
The default behaviour is ORIGIN(END) and RESOLVE(NEXT). This means that the time
when the ADD command runs is used to calculate the next run, which is the next
multiple of EVERY following the time ADD runs.
For example, ADD FROM(0900) UNTIL(2100) EVERY(0015) repeats from 9am to 9pm
every 15 minutes. If the occurrence starts at 1000 and ends at 1012, the next
occurrence will be at 1015. If the occurrence starts at 1000 and runs until 1020, the
next occurrence will be at 1030.
This mechanism effectively means that if a single occurrence runs longer than the
EVERY interval, the intervals are skipped to catch up with the next time in the
repeating cycle.
Using RESOLVE(GAP) ensures that the EVERY interval is used to make sure that each
occurrence starts with the same interval between one finishing and the next
starting. For example, ADD FROM(0900) UNTIL(2100) EVERY(0015) RESOLVE(GAP)
repeats from 9am to 9pm every 15 minutes. If the occurrence starts at 1000 and
ends at 1012, the next occurrence is at 1027. If the occurrence starts at 1000 and
runs until 1020, the next occurrence is at 1035.
Using RESOLVE(BOTH) ensures that the EVERY interval is used to make sure that each
occurrence starts with at least the specified EVERY interval between one finishing
and the next starting, but also runs on perfect multiples of the EVERY time. For
example, ADD FROM(0900) UNTIL(2100) EVERY(0015) RESOLVE(BOTH) repeats from
9am to 9pm every 15 minutes. If the occurrence starts at 1000 and ends at 1012, the
next occurrence is at 1030. If the occurrence starts at 1000 and runs until 1020, the
next occurrence is at 1045.
Using RESOLVE(hhmm) ensures that hhmm is used to make sure that there is a
minimum time between one occurrence ending and the next one starting, but the
occurrence starts on a perfect interval of the EVERY time. For example, ADD
FROM(0900) UNTIL(2100) EVERY(0015) RESOLVE(0005) repeats from 9am to 9pm
144 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
every 15 minutes. If the occurrence starts at 1000 and ends at 1012, the next
occurrence is at 1030. If the occurrence starts at 1000 and runs until 1020, the next
occurrence is at 1030.
Modifying the ORIGIN point can modify the characteristics of how the occurrences
are calculated. Using ORIGIN(IA) with RESOLVE(NEXT) reproduces the behaviour
that Repeat Every/Until achieves when using static run cycles. Every possible
interval is scheduled. For example, ADD FROM(0900) UNTIL(2100) EVERY(0015)
ORIGIN(IA) RESOLVE(NEXT) repeats from 9am to 9pm every 15 minutes. If the
occurrence starts at 1000 and ends at 1012, the next occurrence is at 1015. If the
occurrence starts at 1000 and runs until 1020, the next occurrence is at 1015.
COUNT can be used to limit the number of repeats, with or without FROM | UNTIL
limits. For example, in the command ADD EVERY(0015) COUNT(10) the first instance
could have been added by ETT, in which case the second instance is added a
perfect multiple of 15 minutes from the initial triggering event. This will happen
repeatedly until 10 individual runs have occurred.
For consistency between Batch Loader and the REPEAT mode of the ADD command,
to add repeating run cycles ADD FROM(0900) UNTIL(2100) EVERY(0015) is identical
to ADD IATIME(0900) RPTEND(2100) RPTEVRY(0015).
Terminating repeating
If the next calculated Input Arrival time is later than the UNTIL time, or if the
number of occurrences has reached the COUNT value, the ADD command does not
submit any further occurrences.
The ADD command also stops if it detects another occurrence, submitted in other
ways, with an Input Arrival time between the ORIGIN time and up to and including
the calculated next Input Arrival. This prevents instances where multiple triggers
may have added overlapping cycles to leap over each other, compromising the
desired cycle interval.
Use of the NOTIFY keyword can be used to allow extra processing to be added into
the repeating occurrence that only runs when the final occurrence of the cycle as
run.
For example, ADD FROM(0900) UNTIL(2100) EVERY(0015) NOTIFY(W) means that the
2100 instance of the ADD job terminates with RC=4. Conditional dependencies can
then be used to run jobs only when the ADD job terminates with RC=4, allowing
final processes to be run at the end of the repeating cycle.
Conditional dependencies can also be used to terminate the repeating cycle early. If
whatever process is being run by the repeating occurrence can detect it no longer
needs to repeat, for example all the data for the day has arrived, then it too could
issue a return code, that conditional dependencies could use to stop a further run
of the ADD job.
Persistent data
If you do not specify either FROM or UNTIL time in REPEAT mode, these values
default to the current time, and one minute before the current time of the first
instance respectively. To allow this time to be used by subsequent instances, it
must be passed from one occurrence to the next.
Until IBM Workload Scheduler for z/OS V8.5.1 included, there is no recognized
mechanism to pass information from one occurrence to the other, encapsulated
within the occurrence.
If you wish to keep the Owner Description unchanged in the current plan, you
must always set values for FROM and UNTIL, and you must not set the COUNT
keyword.
where:
The first positional parameter
The job name to find.
ADID A filter field to restrict the search to the application named in this
keyword. Wildcards are allowed.
COMPSUCC
Determines the action to take when a successor is identified as already
completed. A complete successor cannot be added as an external
dependency. The equivalent OPTIONS keyword sets the default.
IGNORE Do not add the dependency and issue an advisory message
(RC=0).
WARNING
Do not add the dependency and issue an advisory message
(RC=4). This is the default.
ERROR Do not add the dependency and issue an advisory message
(RC=8).
CPDEPR Specifies whether to resolve dependencies:
YES Resolve both predecessors and successors (default).
146 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
PREDECESSORS
Resolve only predecessors.
SUCCESSORS
Resolve only successors.
NO Do not resolve any dependencies.
CRITERIA
How to resolve dependencies. The ADDJOB command ignores individual
dependency resolution criteria in the database. Only the CRITERIA keyword
determines the method to be used:
CLOSEST
Use the “Closest preceding” method.
SAMEDAY
Use the “Same day” method.
MANUAL No dependencies as resolved, additional dependencies can be
manually added.
DEPTIME
The time to be used to resolve dependencies from. If specified the job
being added will resolve its dependencies as if the DEPTIME is it's operation
input arrival. If DEPTIME is not specified, the value of the IA keyword is
used. If neither DEPTIME or IA is specified, the current date and time are
used.
EXTLINK
How to find the target external dependencies:
APPL Use the application ID and operation number in the dependency
definition (default).
JOB Use the job name in the dependency definition.
JOBWS Use the job name and workstation name in the dependency
definition.
GROUPDEF
A filter field to restrict the search to the members of the application group
named in this keyword. Wildcards are allowed.
GROUP A filter field to restrict the search to the authority group named in this
keyword. Wildcards are allowed.
HOLD(YES|NO)
Determines whether the added job is held or not when added to the plan
(default is No).
IA The Input Arrival to use when creating the occurrence. If the IA is already
in use for an occurrence, the command fails.
IGNORE Specifies a list of elements to define the internal dependencies to be
ignored when adding the job to the current plan. The default is
=FIRST=LAST to ignore internal dependencies to the first and last
operations. The default is set by OPTIONS IGNORE.
The following elements can be combined:
=ALL Ignore all internal dependencies.
=NONE Do not ignore any internal dependencies.
=FIRST Ignore the first operation (as defined by OPTIONS FIRST).
148 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
VALFROM
A filter field to restrict the search to applications matching the valid from
date specified. Wildcards are allowed.
VALID A filter field to restrict the search to applications that are valid on the date
specified. ildcards are allowed.
VALTO A filter field to restrict the search to applications matching the valid to date
specified. Wildcards are allowed.
WSNAME A filter field to restrict the search to applications containing the
workstation specified. Wildcards are allowed.
The ADDJOB command creates a dynamic occurrence in the current plan, using the
attributes of the job found in the database. They include all operation attributes,
extended information, automation attributes, special resources, and user fields. The
command ignores predecessor selection criteria and conditional dependencies,
because this is a dynamically added occurrence, therefore these elements can be
dealt with by the process performing the add.
The dependencies defined to the job are processed by the ADDJOB command in
accordance with the CPDEPR, EXTLINK, and INTLINK keywords. By default, to find
external dependencies the application name and operation number are used, while
to find the internal dependencies, the job name and workstation name are used.
The CRITERIA keyword specifies how to resolve the dependencies. The predecessor
resolution is done by using the input arrival that is determined as follows:
v DEPTIME specifies the input arrival to use for dependency resolution.
v If DEPTIME is not set, the time specified in IA is used.
v If both DEPTIME and IA are not specified and the Workload Automation
Programming Language job is controlled by IBM Workload Scheduler for z/OS,
the input arrival of the controlling occurrence is used.
v In all other cases, the current date and time are used.
If a matching job is not found, and NOTFOUND is set to SUBMIT, then a simple
dynamic occurrence using default values for all job attributes will be used. If the
WSNAME keyword was specified without using wildcards then it will be used as the
workstation in the generated occurrence. Otherwise the value of OPTIONS ADWS will
be used, which is CPU1 by default.
If the job name argument of the ADDJOB keyword contained wildcards, the
submission fails if not matching job is found, regardless of the setting of NOTFOUND.
Note: If the combination of PFX, job name, and SFX exceeds 16 characters it will be
truncated at 16 characters.
CONSOLE <command>
Where <command> can be any valid REXX expression that resolves to a valid console
command. For more details about REXX expressions and available functions, see
TSO/E REXX Reference manual.
The commands could be contained within a file and read into the process:
//RUNWAPL EXEC EQQYXJPX,
// SUBSYS=WSLC
//COMMANDS DD *
F WSIC,STATUS
F WSJC,STATUS
F WSKC,STATUS
F WSLC,STATUS
//SYSIN DD *
VARSUB SCAN
READ COMMANDS OBJECT(CMDS)
DO X = 1 TO !@CMDS
CONSOLE @V(@CMDS-!X.)
END
To run the commands, ensure the you have the appropriate MCS console authority.
By default the console name will be the same as the job name. This can be altered
by OPTIONS CONNAME.
After the command is issued, the process waits 2 seconds for the first messages to
be issued, then waits up to 1 second for each subsequent message to be displayed.
After one second passed with no new messages, the CONSOLE command completes.
This can be altered by OPTIONS CONWAIT.
Any other messages retrieved will set return codes according to the message
severity:
v I and A return 0
150 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
v W returns 4
v Anything else returns 8
where:
<application>
The name of the application for which to generate the run dates. By
default, the command assumes the ACTIVE version of this, as an
APPLICATION definition only, that is valid on the day the command runs.
TYPE can be used to look for GROUP definitions and STATUS can be used to
calculate dates for PENDING versions.
<valid-on>
The date used to find the version of the application. By default, it uses the
current date.
hhmm The input arrival time to select matching run cycles to calculate the run
dates from. For applications that might have multiple runs within one day,
this allows a specific single run to be calculated. If omitted, the run dates
for all run cycles are calculated.
<from> The date from which the run dates are calculated, in the format YYMMDD.
The default is the current date.
<to> The date until which the run dates are calculated, in the format YYMMDD.
The default is the FROMDATE value plus 90 days.
<pfx> The name of the SAVELIST to be produced, containing the combined run
dates for all run cycles. This is also used as a prefix of internally generated
SAVELIST for run cycle. It is required that SAVELIST entries are generated to
enable internal use of the MERGE command to calculate the composite effect
of all run cycles.
Output can be in the form of a SAVELIST and optionally output files if an OUTPUT
GNDAY statement has been coded ahead of the command. The SAVELIST output can
be used to generate interval dates within Periods using the PRSTART DATELIST
keyword.
The amount of output can be influenced by the OUTPUT keyword, which can have
the following values:
ALL Generates SAVELIST and optionally file output for each individual run
cycles and the combined result for all of the run cycles.
COMBINED
Only generate SAVELIST and optional file output for the combined result
for all of the run cycles.
Note:
1. For run cycles using the EVERY or UNTIL, only the initial Input Arrival time is
used to select the run cycle with the IAT keyword.
2. Run cycle level SAVELIST output is named using the SAVELIST prefix followed
by _cccc, where cccc is the run cycle sequence number.
3. For run cycles of type N and X, a rule definition is automatically generated
internally, therefore the LIST GENDAYS command can calculate offsets of a
period, for example ONLY(1) DAY(DAY) PERIOD(MYDATES). Period based run
cycles can generate more offsets than a rule definition can support (11 positive
and 11 negative). In these instances, multiple rules are generated until all of the
period offsets have been accounted for. The run cycle SAVELIST name will be
suffixed with _cccc_iiii, where cccc is the run cycle sequence number and
iiii is the instance number of the multiple rules generated for the single run
cycle.
4. For the limitations related to FROMDATE and TODATE, see “LIST GENDAYS –
Generate dates from a rule” on page 93.
5. The LIST GENDAYS PIF call uses the same internal IBM Workload Scheduler for
z/OS code that is used to generate the dates for GENDAYS in ISPF.
6. The GETDATES command is available only starting from IBM Workload
Scheduler for z/OS V8.6 SPE, or later.
where:
The first positional parameter
The job name to find.
ADID A filter field to restrict the search to the application specified. Wildcards
are allowed.
DETAIL How much detail to return. APPL lists only the applications in which the
job is found. OPER also lists the operation attributes, extended information,
automation information, special resources, dependencies, conditional
dependencies, and user fields. SUCC lists external successors.
DISPLAY
Whether to generate the output to SYSTSPRT.
152 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
FLOW The column width at which one line of output flows to another. If not
specified, the data will flow appropriate to the length of the output stream.
GROUPDEF
A filter field to restrict the search to the members of the application group
specified. Wildcards are allowed.
GROUP A filter field to restrict the search to the authority group specified.
Wildcards are allowed.
IGNORE A list of elements that define the internal dependencies to be ignored when
listing the dependencies of the job. The default is =FIRST =LAST to ignore
the internal dependencies to the first and last operations. The default is set
by OPTIONS IGNORE.
You can combine the following arguments:
=ALL Ignore all internal dependencies.
=NONE Do not ignore any internal dependencies.
=FIRST Ignore the first operation (as defined by OPTIONS FIRST).
=LAST Ignore the last operation (as defined by OPTIONS LAST).
<wstype>
Ignore the operations that use a specific workstation type. Valid
types are: AUTO, CPU, DUMMY, FTA, PRINT, REMOTE-D,
REMOTE-Z, SETUP, STC, VIRTUAL, WAIT, WTO, or
ZCENTRIC.
<wsname>
Ignore the operations that use a specific workstation.
<opno> Ignore the operations on a specific operation number.
MULTI Specifies what to do if the job is found more than once:
ALL Reports all places found.
FAIL Ends with RC=8, if more than one match is found.
FIRST Reports only the first place found.
LAST Reports only the last place found.
For example, LISTJOB JOB040 lists all the applications in which JOB040 is
contained.
The output from LISTJOB is similar to Batch Loader, though not directly executable
as Batch Loader. The fields shown are the fields that are not set to their default
values, and the values themselves are stripped of trailing spaces.
For the DISPLAY output, each segment type is shown as descriptive labels.
For the OBJECT output, the Batch Loader command name prefixes each record, with
the exception of dependencies. The OBJECT structure includes a record counter
contained in the high level object variable and a record for each segment of output.
The following command:
154 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
VARSUB SCAN
LISTJOB JOB005 DETAIL(SUCC) OBJECT(FREDDO) DISPLAY(N) MULTI(FAIL)
ADID(DEEPFROG6)
DO X = 1 TO !@FREDDO
DISPLAY @V(@FREDDO-!X.)
END
The exception to Batch Loader format is how dependencies are presented. The
database works only with predecessors, but LISTJOB shows also successor
relationships for each job. Instead of ADDEP, the dependencies are represented by
ADPRE and ADSUC with -INT or -EXT appended to show whether the dependency is
internal or external. The application name is shown, even for internal
dependencies, so that the ADDJOB function can use this to resolve relationships. Also
in an exception to the Batch Loader convention the job name is listed as the first
word on any ADPRE or ADSUC record.
The LISTSTAT command is similar to the Batch Command Interface Tool (BCIT)
command of LISTSTAT, but supports more resources. The return codes for the BCIT
supported resources are the same for Workload Automation Programming
Language.
Note: LISTSTAT performs a LIST request to find the relevant elements within IBM
Workload Scheduler for z/OS. If the LIST request returns multiple records, the
command ends with RC=8.
The arguments for LISTSTAT are the same as the arguments for the related LIST
request for the same resource with the exception of POLICY which is used to set the
return code policy for the request.
If you want to set your own Return Code policy you can add the POLICY keyword
to the LISTSTAT command. The POLICY keyword allows you to set specific return
codes for groups of status values, and set a return code for anything that does not
match any of your listed statuses:
POLICY(<status_list1>=<rc1>,<status_list2>=<rc2>,...,
<status_listn>=<rcn>,<catch_all>)
If you omit to supply a catch all return code then you will get RC=99 when no
match occurs. The return code must be a non-negative whole number.
would return 10 if the status was A, R or *, it would return 20 if the status was S
or W, it would return 30 if the status was C and return 40 if any other status was
encountered. If the operation was not found in the current plan then 90 would be
returned.
This command ends with return code zero if the operation is complete or it is not
in the current plan, but returns 20 if it is in any other state.
Note:
v Workload Automation Programming Language will return 4 if the item being
listed is not found, 8 if more than one item is found, 12 if you have made a
syntax error and 16 if an initialization error occurs. It is recommended, that you
avoid using these return codes in your POLICY if you need to distinguish those
errors from your return codes.
v If you run multiple LISTSTAT commands in one session, the highest return code
is returned.
v If any command other than LISTSTAT breaches the OPTIONS STOPRC setting, the
LISTSTAT return code is not returned.
v The LISTSTAT command itself will only ever complete with return codes 0, 4, 8
or 12. The actual return code for the status is returned as Workload Automation
Programming Language terminates.
v The SETMAX command has no impact on the return code set by LISTSTAT.
v If the LISTSTAT command does not find an operation, a return code of 4 is set.
However if you have a POLICY keyword and you have not added a specific entry
for the special status of ?, then the “catch all” return code will be returned
which may override the 4 if it is higher. This allows you to treat “not found” as
a undesired status along with any others in the scope of the “catch all”.
156 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
12 Workload Automation Programming Language error
99 Unexpected status returned or no match in POLICY
The following list shows the return codes that are set when POLICY is not specified:
4 Resource not found or user ID has no RACF authorization to read the
resource
31 Occurrence status C (completed)
32 Occurrence status D (deleted)
33 Occurrence status E (ended in error)
34 Occurrence status P (processor pending)
35 Occurrence status S (started)
36 Occurrence status U (undecided)
37 Occurrence status W (no started operations)
40 Operation status *
41 Operation status A (waiting for input to arrive)
42 Operation status R (ready)
43 Operation status S (started)
44 Operation status C (completed)
45 Operation status D (deleted)
46 Operation status I (interrupted)
47 Operation status E (ended in error)
48 Operation status W (waiting for a predecessor)
49 Operation status U (undecided)
50 Operations status X (excluded)
60 Workstation status A (active)
61 Workstation status O (offline)
62 Workstation status F (failed)
63 FT Workstation status L (linked FTA)
64 FT Workstation status U (unlinked FTA)
70 Special resource available
71 Special resource unavailable
OBJECT
Use the OBJECT keyword to create an object variable for the LISSTAT process and
the record identified.
OBJECT(<name>)
The primary object for the LISSTAT command is a simple object variable that
contains the number of records found by the LISTSTAT command. This is either 1
or 0, because LISSTAT is designed to identify only one record.
Int the following example, the object for the identified record is the object name
suffixed by 1:
LISTSTAT CPOPCOM ADID(TWSCDAILYPLAN) OPNO(010) IA(0805281200)
POLICY(C=0,?=0,20) OBJECT(CHK)
The plus sign (+), minus sign (–), or exclamation mark (!) used as prefix for special
resources indicates whether to set the availability to YES (+), NO (–) or RESET (!).
If neither the plus sign (+), minus sign (–), or exclamation mark (!) is specified,
YES is assumed.
To direct the SRSTAT event to a tracker or controller different from the value
specified in the SUBSYS= symbolic in combination with any setting of OPTIONS
TRACKERS, you can append the subsystem to the end of the special resource name
using the slash (/).
Note:
v Special Resource names containing the slash (/) or the parenthesis cannot be
used with this command.
v If the special resource name begins with the plus sign (+) or minus sign (–), you
must specify an additional plus sign or minus sign to explicitly set the
availability.
In the following example, the job looks for operation 10 of an application called
DAILYPLANNING that runs at 12:00 on the same input arrival date as the
application running this Workload Automation Programming Language job.
v It ends with RC=0 if the operation is complete.
v It ends with RC=2 if the operation is not found in the current plan.
v It ends with RC=8 and generate an SRSTAT event to set resource
MY.SR.TRIGGER to available, which will be sent to SUBSYS(WSIT).
In the following example, the job looks for MYJOB10 and MYJOB20 of an
application called MYJOBS that arrives at 23:00 the day before input arrival date as
the application running this Workload Automation Programming Language job.
v The command ends always with RC=0.
v If MYJOB10 is in error it sets resource JOB.FAIL.MYJOB10 to available.
v If MYJOB10 is waiting it sets resource JOB.WAIT.MYJOB10 to available.
v If MYJOB20 is in error it sets resource JOB.FAIL.MYJOB20 to available.
v If MYJOB20 is waiting it sets resource JOB.WAIT.MYJOB20 to available.
v OPTIONS TRACKERS is used to determine where to send the event. Ordinarily this
would be specified in your site options member.
158 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
//RUNWAPL EXEC EQQYXJPX,
// SUBSYS=WSIC
//SYSIN DD *
OPTIONS TRACKERS(WSIC.*.WSIT)
VARSUB SCAN
VARDATE YESTERDAY BASE(!OYMD1.) OFFSET(-1)
LISTSTAT CPOP ADID(MYJOBS) JOBNAME(MYJOB10) IA(!YESTERDAY.2300)
POLICY(E=JOB.FAIL.MYJOB10,W=JOB.WAIT.MYJOB10,0)
LISTSTAT CPOP ADID(MYJOBS) JOBNAME(MYJOB20) IA(!YESTERDAY.2300)
POLICY(E=JOB.FAIL.MYJOB20,W=JOB.WAIT.MYJOB20,0)
where:
<text> The text of the message to send.
<userid>
The TSO user ID to whom to send the message.
If the USER keyword is omitted, the message is sent to the JES job log and can be
displayed on SYSLOG and the console.
where:
EXCLUDE(<wsid1>,<wsid2>,...)
Allows a list of workstations to be specified to exclude from being
processed by the command.
FROM(yymmddhhmm)
Specifies the start of the period to alter the parallel server capacity for.
PSCAP(n|RESET)
Specifies the number of parallel servers to set for this interval. RESET can be
160 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
used to reset the parallel servers to the level planned for this interval.
RESET can be used only if this interval has already been set by a previous
command. If this keyword is not set, for a new interval IBM Workload
Scheduler for z/OS will assume 0.
R1CAP(n|RESET)
Specifies the number of workstation resource 1 to set for this interval.
RESET can be used to reset the parallel servers to the level planned for this
interval. RESET can be used only if this interval has already been set by a
previous command. If this keyword is not set, for a new interval IBM
Workload Scheduler for z/OS will assume 0.
R2CAP(n|RESET)
Specifies the number of workstation resource 2 to set for this interval.
RESET can be used to reset the parallel servers to the level planned for this
interval. RESET can only be used if this interval has already been set by a
previous command. If this keyword is not set, for a new interval IBM
Workload Scheduler for z/OS will assume 0.
TO(yymmddhhmm)
Specifies the end of the period to alter parallel server capacity for.
UPDATE(Y|N)
Determines whether to perform the updates described by the command. If
updates are requested to not be performed setting OPTIONS TRACE(1) will
show what update commands would have been executed.
WSAUTO(Y|N)
Optional search criteria to search for workstations by the automation
attribute.
WSNAME (<wsid>)
Optional search criteria to search for workstations to alter by name.
Wildcards are allowed.
WSREP(A|S|C|M)
Optional search criteria to search for workstations by the reporting type.
WSRETYPE(D|Z)
Optional search criteria to search for workstations by remote engine type.
WSTWS(Y|N)
Optional search criteria to search for workstations by the fault tolerant
attribute.
WSTYPE(G|C|P|R)
Optional search criteria to search for workstations by workstation type.
WSWAIT(Y|N)
Optional search criteria to search for workstations by the wait attribute.
WSZCENTR(Y|N)
Optional search criteria to search for workstations by the z-centric
attribute.
Note:
v IBM Workload Scheduler for z/OS TSO commands are asynchronous: they
generate an event to perform the action. Successful completion of the command
indicates only that the event was generated, it does not mean that the event
reached the target or that the keywords identified an object with the correct state
for update.
| v With the EQQWAPL load module, you cannot use the TSO commands
| BULKDISC, DEFINE, DELETE, JSUACT, and REPRO.
For detailed documentation and syntax about TSO commands, see IBM Workload
Scheduler for z/OS: Managing the Workload.
BACKUP <arguments>
BULKDISC <arguments>
Note: The BULKDISC request is available only starting from IBM Workload
Scheduler for z/OS V8.3, or later.
JSUACT <arguments>
OPINFO <arguments>
OPSTAT <arguments>
WSSTAT <arguments>
Depending on the TSO PROFILE PREFIX setting for the user running the job, any
data set names in TSO commands can be prefixed with the user ID. To avoid
prefixing, you can specify data set names within single quotes.
164 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Chapter 10. Batch loader commands
The batch loader function of Workload Automation Programming Language uses a
set of statements to define or modify objects within the IBM Workload Scheduler
for z/OS database.
Each IBM Workload Scheduler for z/OS object can be constructed using one or
more batch loader statements, each statement relates to a component of the object.
For example, an Application needs and ADSTART statement to define the core
elements, such as the name and owner ID, an ADRUN statement for each run cycle
and ADOP statements for each operation. The statements are hierarchical, so each
ADOP statement can be followed by multiple ADDEP statements to define
dependencies and ADSR statements to define Special Resource usage.
Every Batch Loader construct begins with a command that ends in START, such as
ADSTART or ETTSTART. The end of the construct will be when either a new xxxSTART
statement, or a statement not belonging to that object is encountered.
Modes of operation
The batch loader processing supports several modes of operation, which you can
specify by setting either OPTIONS DBMODE or the ACTION keyword of individual batch
loader statements. Behaviors are different at the different levels.
OPTIONS DBMODE
The following values are valid for the OPTIONS DBMODE statement.
ADD The entire content of the object must be specified within Batch Loader
statements and cannot exist already within the database (this is the
default).
COPY An object and its segments can be identified for updating using key fields
(or SAVELIST), then only the fields that require changing need to be
specified. If new values for key fields are given, a new object is created in
the database and the original object is also kept in the database at
completion. If an object with the same name already exists, the COPY fails.
EXPORT An object is built from a combination of TRANSLATE and batch loader
statements, then, instead of sending the object to the database, it is written
out again as batch loader statements. In this way, input batch loader is
translated to new batch loader, as part of life-cycle management, before
applying to a database.
REPLACE
The entire content of the object must be specified within Batch Loader
statements, but can already exist within the database and is replaced if an
object with the same name and type already exists. If an object had been
selected for replacing but given a new name for output, the original object
is deleted from the database at completion.
Note:
v With OPTIONS FIRST and OPTIONS LAST, you cannot use COPY and UPDATE in
conjunction with AUTOPRED, AUTOSUCC, or LINK.
v Under EQQYLTOP, OPTIONS ACTION is the equivalent to OPTIONS DBMODE.
Workload Automation Programming Language also recognizes OPTIONS ACTION
for backwards compatibility. Use OPTIONS DBMODE to distinguish database
between Record and Segment level actions.
The default (and most used action) is ADD, meaning that the statement is used to
define a segment.
The following values are valid for ACTION within batch loader statements:
ADD The statement is defining an object or part of an object to be stored in the
database.
DELETE
The segment is removed from the object. DELETE is not valid for primary
batch loader statements (for example, ADSTART, CLSTART), objects
themselves must be deleted by the DELETE command, not ACTION(DELETE)
within batch loader statements. DELETE is valid only in conjunction with
OPTIONS DBMODE(COPY) or OPTIONS DBMODE(UPDATE).
EXPORT The Batch Loader input is translated into ISPF loader output without being
sent to the database. This is to allow Batch Loader to be sent into ISPF
format, using ILSON, for manipulation before being sent into the database.
SUBMIT When an Application is created using ACTION(SUBMIT), instead of being
stored in the Database it is inserted into the Current Plan without updating
the database (only valid for ADSTART). Any occurrence created using this
option will be Valid for all dates.
SETDEFAULT
If you specify SETDEFAULT, the remaining keyword values of the statement
become default values for all the statements of the same type that follow.
No database element is updated. Keywords that you do not specify are
assigned their standard defaults. For more information about how
SETDEFAULT works within Workload Automation Programming Language,
see “SETDEFAULT behaviour in Workload Automation Programming
Language” on page 170.
166 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
v On ADOP keywords WSID, JOBN, PREWSID, PREOPNO and PREJOBN can not be used
with SETDEFAULT. Using OPNO with SETDEFAULT does not set the default operation
number, instead it sets the interval to add to previous operation numbers when
automatic operation numbering is used.
v On ADOPEXTN keyword EXTNAME can not be used with SETDEFAULT.
v On ADRULE no keywords can be used with SETDEFAULT.
v On ADRUN keywords NAME and PERIOD can not be used with SETDEFAULT.
v On ADSR keyword RESOURCE can not be used with SETDEFAULT.
v On OISTART keywords ADID, JOBN, OPNO and MEMBER can not be used with
SETDEFAULT.
Output masking
Use output masking to update the content of existing fields using the percent sign
(%) and asterisk (* ).
Use the percent sign (%) as a wildcard for a single character, use the asterisk (*) as
a wildcard for any number of characters at the end of the mask. Using the *
anywhere but the end of the mask will cause the character to be treated as a literal
asterisk.
Note: By default, the output masking facility is turned off, to prevent accidental
changes if you have the percent sign (%) or asterisk (* ) in any of your database
fields. To turn it on, use OPTIONS OUTMASK(Y).
Some enhancements are automatically available and do not require any OPTIONS to
be set to exploit them or stop them.
v Quotation marks: Workload Automation Programming Language does not
require you to specify the keyword values within quotation marks, but it
supports them if used.
v Only primary batch loader statements (for example ADSTART, CLSTART) are
required at the beginning of a new line.
v You can use as input alternative keywords that are shorter, more consistent, and
meaningful.
Continuation rules have been amended to be able to use the full width of the input
dataset, whatever the width may be, but to process batch loader generated under
EQQYLTOP syntax rules you can set OPTIONS SYNTAX(LEGACY) to force EQQYLTOP
compliance.
The following list shows the alternative and extra keywords available:
v ADSTART
– ADSTAT becomes STATUS
– ADTYPE becomes TYPE
– ADVALFROM becomes VALFROM
– GROUP becomes AUTHGRP
– ADGROUPID becomes GROUPDEF
v ADCIV
– ADCIVADID becomes ADID
– ADCIVID becomes CONDID
– ADCIVOPNO becomes OPNO
– ADCIVTYPE becomes TYPE
– ADCIVFWHE becomes FROMWHEN
– ADCIVFHHH becomes FROMHHH
– ADCIVFHH becomes FROMHH
– ADCIVFMM becomes FROMMM
– ADCIVFD becomes FROMDAYS
– ADCIVTWHE becomes TOWHEN
– ADCIVTHHH becomes TOHHH
– ADCIVTHH becomes TOHH
– ADCIVTMM becomes TOMM
– ADCIVTD becomes TODAYS
v ADCNC
– CONDDEPNO is no longer required
– CONDCOUNT becomes COUNT
– CONDDESCR becomes DESCR
v ADCNS
– CONDDEPCONDID is no longer required
– CONDDEPPREADID becomes PREADID
– CONDDEPPRECSEL becomes PRECSEL
– CONDDEPPREWSID becomes PREWSID
– CONDDEPPREOPNO becomes PREOPNO
– CONDDEPDEPTYP is no longer required
– CONDDEPTYP becomes CHECK
– CONDDEPLOG becomes LOGIC
– CONDDEPVALRC becomes RC1
– CONDDEPVALRC2 becomes RC2
– CONDDEPVALST becomes STATUS
– CONDDEPPROCSTEP becomes PROCSTEP
– CONDDEPSTEPNAME becomes STEPNAME
v ADDEP
– PRINT is a new keyword to allow the LTP Print option to be set
168 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
v ADOP
– ADOPWTO becomes WTO
– ADOPCATM becomes CLEANUP
– ADOPJOBCRT becomes CRITICAL
– ADOPJOBPOL becomes POLICY
– ADOPUSRSYS becomes USRSYS
– ADOPEXPJCL becomes EXPJCL
– ADOPWLMCLASS becomes WLMCLASS
v ADRUN
– SEQ is a new keyword to enable a specific run cycle to be identified for
update, rather than having to specify every ADRUN statement again.
– ADRJTAB becomes JCLVTAB
v ADOPSAI
– COMMTEXT is no longer required.
– CT1 is a new keyword that maps to the first 64 characters of COMMTEXT in line
with the way the command is displayed within the ISPF interface.
– CT2 is a new keyword that maps to the second 64 characters of COMMTEXT.
– CT3 is a new keyword that maps to the third 64 characters of COMMTEXT.
– CT4 is a new keyword that maps to the final 63 characters of COMMTEXT.
– COMPINFO becomes CI.
The original syntax for ADOPSAI breaks keyword values across multiple lines. In the
following example, the text is meaningless, used only to show the flow of complete
keywords.
ADOPSAI
COMMTEXT('AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBCCCCCC
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDD
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD')
AUTFUNC(AFAFAFAF) SECELEM(SESESESE)
COMPINFO('CICICICICICICICICICICICICICICICICICICICICICICICICICICICICICICI
CI')
SYNTAX(EXTENDED) presents the same values in the following format, which is easier
to read and follows the layout used to enter the information through the product
dialogs.
ADOPSAI
CT1(AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA)
CT2(BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB)
CT3(CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC)
CT4(DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD)
AUTFUNC(AFAFAFAF) SECELEM(SESESESE)
CI(CICICICICICICICICICICICICICICICICICICICICICICICICICICICICICICICI)
v ADXIV
– ADXIVADID becomes ADID
– ADXIVWSID becomes WSID
– ADXIVOPNO becomes OPNO
– ADXIVTYPE becomes TYPE
– ADXIVFWHE becomes FROMWHEN
– ADXIVFHHH becomes FROMHHH
– ADXIVFHH becomes FROMHH
For example, in EQQYLTOP the following commands set the default workstation
to CPU1 and use that default value in the remaining statements:
ADOP ACTION(SETDEFAULT) DURATION(10)
ADSTART ADID(NEWAPPL)
ADOP WSID(CPU1) OPNO(001) JOBN(JOB1)
ADOP WSID(CPU1) OPNO(002) JOBN(JOB2)
Note: All the statements within a SETDEFAULT structure can specify only the
SETDEFAULT ACTION. If ACTION is not specified for child batch loader statements,
SETDEFAULT is assumed.
Keyword abbreviation
In Workload Automation Programming Language, you must specify all keywords
completely, they cannot be abbreviated. This allows optimum performance for the
Workload Automation Programming Language parsing engine. However, the
EXTENDED syntax shortens many of the longer EQQYLTOP keywords.
170 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Suffixing
Some Batch Loader statements support the SUFFIX keyword. This allows a variable
value to be suffixed onto the name of the object.
Note: OPTIONS SUFFIX is used to control the behavior of the SUFFIX keyword, to
manage situations where the addition of the suffix might exceed the maximum
allowed length of the object name.
NEW_ keywords
With OPTIONS DBMODE(UPDATE) you can change the "name" of an object, by
modifying its key fields. In the same way, with OPTION DBMODE(COPY) new key
fields must be specified to save a copy to. To do this, the key fields of any IBM
Workload Scheduler for z/OS object can have alternate names specified by using a
NEW_ prefix for any of the key fields you wish to alter.
For example:
OPTIONS DBMODE(COPY)
ADSTART ADID(MYAPPL1) NEW_ADID(MYAPPL1COPY)
The key fields can be identified by looking in the default OUTPUT definitions
shipped with Workload Automation Programming Language in the SEQQWAPL
library.
Note: This does not apply to temporary Operator Instructions. They cannot have
their validity range changed by NEW_ keywords. To modify the validity of
temporary Operator Instructions they must be deleted and created again.
172 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
|
+= ADCIV = Conditional dependency interval(s)
|
+= ADUSRF = User field(s)
|
+= ADVDD = Variable duration(s)
|
+- ADRE =- Remote job (1 per op)
Note: Some segments have Batch Loader statements with slightly different names:
v ADCOM has a Batch Loader statement of ADSTART
v ADOPEXT has a Batch Loader statement of ADEXT
v ADOPSAI has a Batch Loader statement of ADSAI
v ADUSRF has a Batch Loader statement of ADUSF
If you omit the OPNO argument from an ADOP statement, Workload Automation
Programming Language can automatically allocate operation numbers for you.
Workload Automation Programming Language calculates the operation number by
adding an interval (the default is 1) to the previous operation number. If the first
operation number is omitted, the previous operation number is assumed to be
zero, meaning the first operation number will be equal to the interval.
The interval can be set by using the ACTION(SETDEFAULT) process to set OPNO, the
operation number you set using this method is not the default operation number,
but becomes the interval between them when OPNO is omitted.
If the interval is larger than the previous operation number, the generated
operation number is set to the value of the interval. In the following example,
JOB1 is given an operation number of 005, with 010 and 015 for JOB2, and JOB3
respectively:
ADSTART ACTIONS(SETDEFAULT)
ADOP OPNO(005) DURATION(1)
ADSTART ADID(MYAPPL) OWNER(TWS)
ADOP WSID(NONR) OPNO(001) JOBN(START) AUTOPRED(PREV)
ADOP WSID(CPU1) JOBN(JOB1)
ADOP WSID(CPU1) JOBN(JOB2)
ADOP WSID(CPU1) JOBN(JOB3)
ADOP WSID(NONR) OPNO(255) JOBN(LAST)
Automatic dependencies
Batch loader can create automatic dependencies within an application by using the
OPTIONS ADDEP keyword and the ADOP AUTOPRED and ADOP AUTOSUCC statements,
when adding or replacing an entire application.
The AUTOPRED and AUTOSUCC keywords are set in the ADOP statements and cause the
automatic creation of dependencies based on the batch loader statements for any
operations that follow.
The OPTIONS FIRST and OPTIONS LAST keywords can also specify automatic
dependencies to the FIRST and LAST operations by using LINK argument.
For example, OPTIONS FIRST(1,LINK) names operation 1 as the first operation and
will make operation 1 an automatic predecessor to any operations specified in
batch loader with no explicit predecessors.
For example, AUTOPRED(FIRST) will only make operations dependent on the first
operation that do not have any explicitly specified predecessors, equally
AUTOSUCC(LAST) will only make the last operation dependent on operations that
have no explicit successors.
174 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
2. AUTOSUCC keywords
3. AUTOPRED keywords
4. OPTIONS LAST
5. OPTIONS FIRST
Note:
1. Automatic dependencies can ONLY be addressed to specific operations by the
operation number, not by using Jobname or Workstation name. When
considering whether an operation already has a predecessor or successor
Workload Automation Programming Language only acknowledges them from a
statement that uses the operation number. It is therefore recommended that any
manual dependencies made in conjunction with automatic dependencies should
be performed using PREOPNO to ensure the desired result is achieved.
2. Automatic dependencies are not permitted when using OPTIONS UPDATE or
OPTIONS COPY.
3. Automatic dependencies are for internal dependencies only.
4. Automatic dependencies rely on the order of the ADOP statements when
resolving dependencies. The ADOP statements do not have to be specified in
numerical order to build an application, as Workload Automation Programming
Language will ensure the resulting application has operations in numeric
sequence so it is possible to exploit this, for example, to have 255 as your
logical end point of an application, and still have higher numbered operations
as predecessors to it, as long as you specify operation 255 last.
In the following example, operations 010 to 110 are all successors to 001 and
predecessors to 255.
OPTIONS FIRST(1,LINK) LAST(255,LINK)
ADSTART ADID(MYAD) OWNER(TWS)
ADOP OPNO(001) WSID(NONR) DURATION(1)
ADOP OPNO(010) WSID(CPU1) JOBN(JOB01) DURATION(1)
ADOP OPNO(020) WSID(CPU1) JOBN(JOB02) DURATION(1)
ADOP OPNO(030) WSID(CPU1) JOBN(JOB03) DURATION(1)
ADOP OPNO(040) WSID(CPU1) JOBN(JOB04) DURATION(1)
ADOP OPNO(050) WSID(CPU1) JOBN(JOB05) DURATION(1)
ADOP OPNO(060) WSID(CPU1) JOBN(JOB06) DURATION(1)
ADOP OPNO(070) WSID(CPU1) JOBN(JOB07) DURATION(1)
ADOP OPNO(080) WSID(CPU1) JOBN(JOB08) DURATION(1)
ADOP OPNO(090) WSID(CPU1) JOBN(JOB09) DURATION(1)
ADOP OPNO(100) WSID(CPU1) JOBN(JOB10) DURATION(1)
ADOP OPNO(110) WSID(CPU1) JOBN(JOB11) DURATION(1)
ADOP OPNO(099) WSID(NONR) DURATION(1)
The ADSTART and subsequent segments perform the equivalent of an INSERT CPOC,
so the batch loader must be followed by an EXECUTE MCPBLK to commit the
For example:
OPTIONS ADDEP(AUTO)
ADSTART ACTION(SETDEFAULT)
ADOP DURATION(1)
ADSTART ACTION(SUBMIT) ADID(DYNAMAPPL) DESCR(’DEMONSTRATE SUBMIT’)
OWNER(TWS) ODESCR(’TWS INFRASTRUCTURE’) PRIORITY(5)
ADOP WSID(CPU1) OPNO(1) JOBN(JOB1) DESCR(’FIRST JOB’)
ADOP WSID(CPU1) OPNO(10) JOBN(JOB2) DESCR(’SECOND JOB’)
ADOP WSID(CPU1) OPNO(20) JOBN(JOB3) DESCR(’THIRD JOB’)
ADOP WSID(CPU1) OPNO(30) JOBN(JOB4) DESCR(’FOURTH JOB’)
ADOP WSID(CPU1) OPNO(255) JOBN(JOB5) DESCR(’LAST JOB’)
MODIFY CPOP OPNO(1)
INSERT CPPRE PREADID(PLANNEDAPPL) PREIA(0803081200) PREOPNO(030)
EXECUTE MCPBLK
Note: The entire object must be specified in batch loader before any INSERT or
MODIFY statements can be used to alter it. Batch loader statements (such as, for
example, ADSTART and ADOP) cannot be interleaved with current plan commands
(such as, for example, MODIFY and INSERT).
176 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Table 105. ADSTART keywords (continued)
Keyword Description
VALFROM Specifies the start date of the validity period of the AD. Only the
start date can be specified. The end of the validity period is set so
that the time up to 31 December 2071 is covered, taking existing
application descriptions into account.
For DBMODE(ADD), the VALFROM keyword sets the valid from date of
the application. For all other DBMODE values, VALFROM identifies the
application to REPLACE, UPDATE, or COPY. The nearest match with the
same value or earlier will be selected. To set a new valid from date
for an existing application, use NEW_VALFROM.
Where:
ADL The actual deadline, considered as the elapsed minutes
between the IA and the completion time of the occurrence
or operation.
ODL The old deadline estimated for the run cycle or operation
(considered as offset in minutes from the IA) currently
stored in the application description database.
DLF The deadline limit for feedback.
178 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Table 105. ADSTART keywords (continued)
Keyword Description
DSMOOTHING The smoothing factor. It determines how much the actual deadline
influences the new deadline estimated for a run cycle or operation
in the application description database. The smoothing factor is
applied only if the actual deadline lies within the deadline
feedback limits. The DSMOOTHING keyword value is used only
if you did not set a smoothing factor in the application
description.
Where:
NDL The new deadline estimated for the run cycle or operation
(considered as offset in minutes from the IA) to be stored
in the application description database.
ODL The old deadline estimated for the run cycle or operation
(considered as offset in minutes from the IA) currently
stored in the application description database.
ADL The actual deadline, considered as the elapsed minutes
between the IA and the completion time of the occurrence
or operation.
DSF The smoothing factor.
AUTHGRP Specifies the name of the application authority group to be used
for additional authority checking, up to 8 characters.
180 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Table 107. Keywords for ADRUN (continued)
Keyword Description
RPTEVRY Specifies the repeating frequency for the EVERY options, in the
format hhmm. It specifies that the application has an occurrence
in the long-term plan every hhmm, starting from the IA time to
the repeat end time (RPTENDT keyword). If this keyword is not
set, only the occurrence related to the IA time is added to the
long-term plan.
RULE Defines which free-day rule is in effect:
E Count only work days when using the rule or offset.
That is, free days are excluded. This option ensures
that the scheduled day will always be a work day.
This is the default for offset-based run cycles.
1 Count work days and free days when using the rule
or offset. If this gives a free day, schedule the
application on the closest work day before the free day.
2 Count work days and free days when using the rule
or offset. If this gives a free day, schedule the
application on the closest work day after the free day.
3 Count work days and free days when using the rule
or offset. If this gives a free day, schedule the
application on the free day. This is the default for
rule-based run cycles.
4 Count work days and free days when using the rule
or offset. If this gives a free day, do not schedule the
application at all.
SHIFT The number of days to shift the rule dates. This field is
optional. It provides the means to define a run cycle relative to
another, where the run cycle without the shifting offset is used
to schedule an application in relation to which, using the same
rule with a negative or positive shift of days, another
application is scheduled.
Note: VALTO specifies the last day when the run cycle is valid.
This is not the same as displayed in the ISPF panels, which
uses “Out of effect” date that shows the first date when the
run cycle is no longer valid. The “Out of effect” date is the day
after the VALTO date, with the exception of the use of HIGHDATE
(711231) as VALTO, which will show the same in the ISPF
panels.
ADRULE - Rule
The ADRULE statement defines a run cycle rule.
182 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Table 108. Keywords for ADRULE (continued)
Keyword Description
LAST Specifies the number (for ONLY) of the day or days to be
selected. For LAST(3), read “third last,” so ONLY LAST(3)
DAY(DAY) JANUARY specifies JANUARY 29.
For EVERY, this specifies the interval of the series, starting from
the end, so EVERY LAST(3) DAY(DAY) JANUARY specifies January
31, 28, 25 etc. The origin of the series is the last day unless you
also specify ORIGINSHIFT. The number is in the range 1 to 999.
DAY Specifies the day or days. You can abbreviate the names of the
days to MON TUE WED THU FRI SAT SUN WORK and FREE.
WEEK Specifies the week number or numbers. The number might
range from 1 to 53. Week 1 is defined as the first week with at
least 4 days of the new year. If you omit the number, the rule
selects every week.
MONTH Specifies the month or months. If you omit the name of the
month, the rule selects every month.
Note: You can abbreviate the names of the months to the first
three characters.
v JANUARY
v FEBRUARY
v MARCH
v APRIL
v MAY
v JUNE
v JULY
v AUGUST
v SEPTEMBER
v OCTOBER
v NOVEMBER
v DECEMBER
YEAR Used to specify that the cycle is a year, as in EVERY(2) DAY(DAY)
YEAR, which gives January 1, January 3, January 5 etc. for each
year. ONLY LAST DAY(FRIDAY) YEAR gives the last Friday in each
year.
PERIOD The name of a user-defined period, which must be in the period
database. If you specify a period name such as JULY, which is
the same name as a predefined cycle, IBM Workload Scheduler
for z/OS looks for a user-defined period JULY, and gives an
error if one does not exist.
ORIGINSHIFT Specifies the origin shift in days. The number is in the range 1
to 999. Use this only with the EVERY keyword, when the origin
is not the first (or, with LAST, the last) day of the cycle or
period. If you specify EVERY(4) DAY(DAY) MONTH
ORIGINSHIFT(1), for example, the rule selects a series starting at
the second day of each month, with an interval of 4 days:
January 2, 6, 10 etc., then February 2, 6, 10 etc., for each month
in the year.
184 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Table 109. Keywords for ADOP (continued)
Keyword Description
DURATION The estimated duration of this operation in minutes or seconds
according to the DURUNIT value in OPTIONS. It must be an integer
greater than 0. The maximum value is 99 hours 59 minutes 00
seconds. If you specify 99 hours 59 minutes 01 seconds, you do
not receive an alert message if the actual duration is greater
than the planned duration.
CLEANUP The cleanup type for this operation:
A Automatic. When the operation is ready to be
submitted and the controller selects it for submissions,
the controller automatically finds the cleanup actions to
be taken and also inserts them as the first step in the
JCL of the restarted job. Whenever the operation is
started from the panels, the cleanup actions are shown
to the user for confirmation, only if the AUTOMATIC
CHECK OPC panel option is set to YES.
I Immediate. data set cleanup is immediately performed
if the operation ends in error. The operation is treated
as if it had the automatic option when it is rerun.
M Manual. data set cleanup actions are deferred for the
operation. They are performed when initiated manually
from the panel.
N None. No data set cleanup actions are performed.
186 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Table 109. Keywords for ADOP (continued)
Keyword Description
AJSUB Automatic job submission.
CLATE Specify Y to cancel this operation if it is time-dependent and
late.
Note: IBM Workload Scheduler for z/OS never cancels a job
that has already started running.
CSCRIPT Use this keyword to set the centralized script flag (Y or N).
DESCR A free-format description of the operation. It can be up to 24
characters.
DLDAY Specifies the number of days, relative to the start of the
application, when this operation must be completed. This must
be an integer. 0 means that the deadline is on the same day as
the occurrence input arrival.
DLTIME Required if you have specified DLDAY. DLTIME specifies the time,
on the day specified by the DLDAY keyword, by which this
operation should be completed. This must be in the format
hhmm.
FORM If this operation is a printing operation, the printer form
number that will appear on the daily plan and on ready lists.
For printer workstations with automatic reporting, the printer
class and form number let IBM Workload Scheduler for z/OS
identify the different print operations belonging to a specific job.
This can be up to 8 characters.
188 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
ADDEP - Dependency
Use the ADDEP statement to define a predecessor for an operation.
Table 110. Keywords for ADDEP
Keyword Description
PREADID If the predecessor operation is in a different application from
the one being built, or is in a different occurrence of the same
application, you must identify the application ID with the
PREADID keyword.
PRECSEL Specifies on which basis a matching predecessor is selected:
C Closest preceding. The matching predecessor is the
one with the nearest preceding input arrival time.
This is the default.
S Same scheduled date. The matching predecessor is the
one with the nearest input arrival time within the
same day of the operation (occurrence) under
consideration. A matching predecessor is first
searched before the IA time of the operation. Then, if
not found, it is searched after the IA time of the
operation.
A Within an absolute interval. The matching predecessor
is the one with the closest input arrival time in the
specified interval. The interval boundaries are
specified by a time and a number of days before or
after the IA time of the operation (occurrence). The
interval can be timed entirely before, entirely after, or
across the IA time of the operation (occurrence).
If you select this option, the ADXIV statement must
follow ADDEP with the specification of the interval
boundaries.
R Within a relative interval. The matching predecessor is
the one with the closest input arrival time in the
specified interval. The interval boundaries are
calculated using an offset expressed in hours and
minutes before or after the IA time of the operation
(occurrence). The interval can be timed entirely before,
entirely after, or across the IA time of the operation
(occurrence).
If you select this option, the ADXIV statement must
follow ADDEP with the specification of the interval
boundaries.
Note: The PRECSEL keyword is available only starting from
IBM Workload Scheduler for z/OS V9.1, or later.
190 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
ADXIV – External dependency interval
Use the ADXIV statement to define the absolute or relative interval specified with
the A or R value in the ADDEP PRECSEL parameter.
You can use only one ADXIV for each ADDEP statement. The statement must be
nested within the ADDEP to which it refers.
Note: The ADXIV statement is available only starting from IBM Workload Scheduler
for z/OS V9.1, or later.
Table 111. Keywords for ADXIV
Keyword Description
ADID The application name of the external predecessor to
which the interval applies.
FROMDAYS The start of the absolute interval in days. The allowed
range is 0-7.
FROMHH The start of the absolute interval in the HH format. The
allowed range is 00-24. To be specified together with
FROMMM. For example, if the absolute interval starts at
10:30 of the day before the input arrival time of the
successor, it is defined by FROMHH(10) FROMMM(30)
FROMDAYS(1) FROMWHEN(B)
FROMHHH The start of the relative interval in hours. The format is
HHH and the allowed range is 0-167. To be specified
together with FROMMM.
FROMMM The minutes fraction of the start of the relative or
absolute interval.
FROMWHEN Specifies if the start of the relative or absolute interval is
before (B) or after (A) the input arrival time of the
successor.
ADCNC – Condition
Use the ADCNC statement to define a condition for an operation that combines a set
of following conditional dependencies (ADCNS).
Note:
1. Workload Automation Programming Language does not require an equivalent
to the CONDDEPNO keyword, this is calculated automatically.
2. The ADCNC statement is available only starting from IBM Workload Scheduler
for z/OS V8.5, or later.
Table 112. Keywords for ADCNC
Keyword Description
CONDID Condition identified (1 -999).
COUNT Count of conditional dependencies that must be true for
the condition to be met:
0 All conditions must be true (default).
Any number higher than zero
Minimum number of conditional dependencies
that must be true for this condition to be met.
Note:
1. Workload Automation Programming Language does not require an equivalent
to the following keywords:
192 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
v CONDDEPCONDID is inherited from the preceding ADCNC statement.
v CONDDEPDEPTYPE is determined from the setting of PREADID.
2. The ADCNS statement is available only starting from IBM Workload Scheduler
for z/OS V8.5, or later.
Table 113. Keywords for ADCNS
Keyword Description
CONDID The CONDID keyword should be set to the same value as in
the ADCNC statement to which this belongs.
PREADID If the predecessor operation is in a different application
from the one being built, or is in a different occurrence of
the same application, you must identify the application ID
with this keyword. If you use DBCS characters, you must
enter them as a quoted string started by a shift-out and
ended by a shift-in.
PRECSEL Specifies on which basis a matching predecessor is selected:
C Closest preceding. The matching predecessor is the
one with the nearest preceding input arrival time.
This is the default.
S Same scheduled date. The matching predecessor is
the one with the nearest input arrival time within
the same day of the operation (occurrence) under
consideration. A matching predecessor is first
searched before the IA time of the operation. Then,
if not found, it is searched after the IA time of the
operation.
A Within an absolute interval. The matching
predecessor is the one with the closest input arrival
time in the specified interval. The interval
boundaries are specified by a time and a number
of days before or after the IA time of the operation
(occurrence). The interval can be timed entirely
before, entirely after, or across the IA time of the
operation (occurrence).
If you select this option, the ADCIV statement must
follow ADCNS with the specification of the interval
boundaries.
R Within a relative interval. The matching
predecessor is the one with the closest input arrival
time in the specified interval. The interval
boundaries are calculated using an offset expressed
in hours and minutes before or after the IA time of
the operation (occurrence). The interval can be
timed entirely before, entirely after, or across the
IA time of the operation (occurrence).
If you select this option, the ADCIV statement must
follow ADCNS with the specification of the interval
boundaries.
Note: The PRECSEL keyword is available only starting from
IBM Workload Scheduler for z/OS V9.1, or later.
PREOPNO Operation number of conditional predecessor.
PROCSTEP Proc Step name for a step dependency.
STEPNAME Job Step name for a step dependency.
You can set only one ADCIV per ADCNS, but the same ADCIV can be used by more
ADCNS statements if they refer to the same external predecessor application and
operation. The statement must be nested within the ADCNS to which it refers.
Note: The ADCIV statement is available only starting from IBM Workload Scheduler
for z/OS V9.1, or later.
Table 114. Keywords for ADCIV
Keyword Description
ADID The application name of the conditional external predecessor to
which the interval applies.
CONDID The condition ID of the conditional external predecessor to
which the
interval applies.
FROMDAYS The start of the absolute interval in days. The allowed range is
0-7.
FROMHH The start of the absolute interval in the HH format. The allowed
range is 00-24. Goes together with FROMMM. For example, if the
absolute interval starts at 10:30 of the day before the input
arrival time of the successor, it is defined by FROMHH(10)
FROMMM(30) FROMDAYS(1) FROMWHEN(B) .
FROMHHH The start of the relative interval in hours. The format is HHH
and the allowed range is 0-167. To be specified together with
FROMMM.
194 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Table 114. Keywords for ADCIV (continued)
Keyword Description
FROMMM The minutes fraction of the start of the relative or absolute
interval.
FROMWHEN Specifies if the start of the relative or absolute interval is before
(B) or after (A) the input arrival time of the successor.
For relative intervals only, you can choose to make the interval
start at an indefinite time in the plan (in this case the
mechanism used is similar to that of the closest preceding
predecessor). To do this, do not specify this parameter, nor any
of the other FROM... ones.
OPNO The operation number of the conditional external predecessor to
which the interval applies.
TODAYS The end of the absolute interval in days. The allowed range is
0-7.
TOHH The end of the absolute interval in the HH format. The allowed
range is 00-24. To be specified together with TOMM. For example,
if the absolute interval ends at 12:30 two days after the input
arrival time of the successor, it is defined by TOHH(12) TOMM(30)
TODAYS(2) TOWHEN(A)
TOHHH The end of the relative interval in hours. The format is HHH
and the allowed range is 0-167. To be specified together with
TOMM.
TOMM The minutes fraction of the end of the relative or absolute
interval.
TOWHEN Specifies if the end of the relative or absolute interval is before
(B) or after (A) the input arrival time of the successor.
TYPE The interval type:
A Absolute interval. Must be defined by the following
parameters:
FROMWHEN, FROMHH, FROMMM, FROMDAYS,
TOWHEN, TOHH, TOMM, TODAYS.
R Relative interval. Must be defined by the following
parameters:
[FROMWHEN, FROMHHH, FROMMM, ]
TOWHEN, TOHHH, TOMM.
Note: The ADEXT statement is available only starting from IBM Workload
Scheduler for z/OS V8.2, or later.
Table 116. Keywords for ADEXT
Keyword Description
EXTNAME A free-format name for the operation. It can include blanks
and special characters for a maximum of 54 characters.
EXTSE The name of the scheduling environment for this operation.
Special characters are allowed.
Note: The ADRE statement is available only starting from IBM Workload Scheduler
for z/OS V8.6, or later.
Table 117. Keywords for ADRE
Keyword Description
RECOMPL Specifies if the shadow job status must be automatically set to
complete, if the remote job does not exist:
Y Sets the operation status to complete.
N Sets the operation status to error.
REJOBNAME Specifies the remote job name. It can be up to 40 characters
and must be specified between single quotation marks. This
parameter is required if the remote job runs on an IBM
Workload Scheduler for z/OS remote engine.
REJSNAME Specifies the name of the remote application (for IBM
Workload Scheduler for z/OS) or of the remote job stream (for
IBM Workload Scheduler for z/OS). It can be up to 16
characters and must be specified between single quotation
marks.
196 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Table 117. Keywords for ADRE (continued)
Keyword Description
REJSWS Specifies the name of the remote job stream workstation. It
can be up to 16 characters and must be specified between
single quotation marks. This parameter is required if the
remote job runs on an IBM Workload Scheduler for z/OS
remote engine.
REOPNO Specifies the remote operation number. It must be a number in
the range 1-255. This parameter is required if the remote job
runs on an IBM Workload Scheduler for z/OS remote engine.
Note: The ADSAI statement is available only starting from IBM Workload
Scheduler for z/OS V8.3, or later.
Table 118. Keywords for ADSAI
Keyword o LouDescription
CT1 Free-format name for the command text of the operation. It
can include blanks and special characters for a maximum
CT2 of 255 characters.
Note: The ADUSF statement is available only starting from IBM Workload Scheduler
for z/OS V8.5.1 SPE, or later.
Note: The ADVDD statement is available only starting from IBM Workload Scheduler
for z/OS V9.3, or later.
Table 120. Keywords for ADVDD
Keyword Description
| CRIT Specifies a variable job critical indicator to be associated
| with a variable run cycle:
| N Not eligible for WLM assistance.
| P Critical Path target.
| Y Eligible for WLM assistance.
DLDAY Relative deadline day (00-99).
DLTIME Deadline time (HHMM).
DURATION Estimated duration for this run (in seconds).
| MH Specifies a variable MH (Manually Hold) option to be
| associated with a variable run cycle:
| Y The MH option is set to Y in the AD database
| that is associated with the related variable
| duration and deadline run cycle.
| N The MH option is set to N in the AD database
| that is associated with the related variable
| duration and deadline run cycle.
| NOP Specifies a variable NOP option to be associated with a
| variable run cycle:
| Y The NOP option is set to Y in the AD database
| that is associated with the related variable
| duration and deadline run cycle.
| N The NOP option is set to N in the AD database
| that is associated with the related variable
| duration and deadline run cycle.
RCGROUP Run cycle or run cycle group name to which you
associate the variable duration and deadline.
There is one AWSCL record for every day that all workstations are to be closed.
198 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
AWCSTART – All workstations closed
Use the AWCSTART statement to define an entire All Workstations Closed record. A
statement begins with AWCSTART and can be followed by any of the following
additional arguments.
Table 121. Keywords for AWCSTART
Keyword Description
DATE Specifies a date, in the YYMMDD format, when all
workstations are closed.
DESCR Specifies text of up to 30 characters that describes why all
workstations are closed.
FROM Specifies the start of the period when the workstations are
closed, in the HHMM format.
TO Specifies the end of the period when the workstations are
closed, in the HHMM format.
CL – Calendar record
The CL record is a multi segment record, with the following structure.
CLCOM -+- Common segment (1 per CL)
|
+= CLSD = A specific date (many per CL)
|
+= CLWD = A day of the week (up to 7 per CL)
Note: Some segments have Batch Loader statements with slightly different names:
v CLCOM has a Batch Loader statement of CLSTART
v CLSD has a Batch Loader statement of CLDATE
v CLWD has a Batch Loader statement of CLDAY
For example, to drop any dates over a year old issue the
following command:
OPTIONS DBMODE(UPDATE)
CLSTART CALENDAR(BATCHCAL) DROP(-365)
In the following example, you create a free day for 18 May 2014:
CLDATE DATE(140518) STATUS(F)
200 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Table 124. Keywords for CLDAY (continued)
Keyword Description
STATUS Specifies the status of the day of the week (which can be
overridden by the status assigned to a specific date):
F A free day
W A working day
A statement begins with ETTSTART and can be followed by the following additional
arguments.
Table 125. Keywords for ETTSTART
Keyword Description
ETTNAME Specifies the name of a job or a special resource, up to 44
characters.
You can also use the wildcards asterisk (*) and percent sign
(%) to specify a generic name.
ETTTYPE Specifies the type of event that you want to cause a dynamic
update of the current plan. Required.
J A job reader event is the triggering event.
R A special resource availability event is the triggering
event.
ADID Specifies the name of an application defined in the application
description (AD) database that you want adding to the current
plan when the event occurs.
AS Availability status switch indicator. Valid only with
ETTTYPE(R). Indicates if ETT adds an occurrence only if there is
a true availability status switch for a special resource from
status Available=N to Available=Y, or if ETT adds an
occurrence each time the availability status is set to
Available=Y (regardless of the previous status of the special
resource).
The LISTJOB command extracts application and job details from the database for a
single job, but can be made to output this detail in the form of a JBSTART
command. So where the ADDJOB command will extract job details and then submit
the job directly to the plan with the extracted attributes, by using LISTJOB to create
the JBSTART command this allows you to manipulate the extracted attributes before
submitting the job to the current plan.
202 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
The JB batch loader statements are similar to the equivalent AD statements, with
the difference that the AD prefix is replaced with JB. For a complete description of
the AD syntax, see “AD – Application description record” on page 172.
In addition to the JB versions of the ADSTART keywords, the JBSTART command also
supports the following keywords from the ADDJOB command:
COMPSUCC
Specifies how to manage completed successors.
CPDEPR Specifies whether to resolve dependencies.
CRITERIA
Specifies the dependency resolution criteria.
DEPTIME
Specifies the input arrival time to consider for resolving dependencies.
EXTLINK
Specifies which elements to use to identify an external predecessor.
HOLD Specifies whether to hold the job that was added.
IA Specifies the Input Arrival with which to submit the occurrence.
INTLINK
Specifies which elements to use to identify an internal predecessor.
JCL Provides external JCL to the submitted job.
PFX Specifies the prefix to use for the application name.
SFX Specifies the suffix to use for the application name.
UPDATE Determines whether to actually perform the updates, or just trial the
process to see what actions would have been taken.
For detailed information about these keywords, see “ADDJOB – Add job to the
current plan” on page 146.
Both JBPRE and JBSUC have a suffix of either -INT or -EXT to define whether this
was originally an internal or external dependency, as the selection criteria can be
managed differently for each by using the INTLINK and EXTLINK keywords of the
JBSTART statements respectively.
Both JBPRE and JBSUC have a positional first argument of the job name of the
dependency. If the operation being referred to has no job name, then -BLANK is
presented by LISTJOB. If the operation being referred to does not exist -MISSING is
presented by LISTJOB.
For JBPRE, the remaining keywords are identical to ADDEP. For JBSUC the keywords
are similar to ADDEP, with the difference that the PRE prefix is replaced by SUC.
Note: Some segments have Batch Loader statements with slightly different names.
JCLVCOM has a Batch Loader statement of JCLVSTART.
204 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
JCLVVAR – Variable details
Use the JCLVVAR statement to define a variable.
Table 127. Keywords for JCLVVAR
Keyword Description
VARNAME Specifies the name of the variable.
COMP Specifies the way in which the LENGTH field is used to validate
the length of the replaced value. This field is optional, unless
you specify a length value.
For example, CC99 means that the first two characters can have
any value and characters 3 and 4 must be in the range 0-9.
206 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Table 127. Keywords for JCLVVAR (continued)
Keyword Description
VALID1 Line 1 of LIST/RANGE values for use in validating the variable
(up to 51 characters).
Note:
1. Some segments have batch loader statements with slightly different names.
JSCOM has a batch loader statement of JSSTART.
2. The Workload Automation Programming Language interpretation of the JS
record is slightly different from the PIF specification in which interval dates are
store in the field JST within the Common Segment. Within Workload
Automation Programming Language, the Common Segment includes JST as an
Chapter 10. Batch loader commands 207
unresolved field, if requested in an OUTPUT statement, but will also decode the
JST into separate JST segments for each line of JCL. This makes for more
flexible processing in batch loader.
JSSTART behaviour
Current plan JCL records (JS) are related to Current plan operation records (CPOP)
in using the same information as the key: Application Name, Input Arrival, and
Operation number.
Even if an Operation exists, this does not mean that an equivalent JS record exists.
A JS record is created by IBM Workload Scheduler for z/OS when job setup runs
for an operation, or if no setup occurs at Job Submission. A JS record can also be
created by a user editing JCL through the Current Plan ahead of submission and
saving the results. Equally after submission someone could delete a JS record.
Because of this behaviour, JSSTART searches for the Operation, rather than just the
JCL, to obtain all of the operation details, then it determines if a JS record exists so
if DBMODE(ADD) is used the appropriate actions can be taken. If a matching
operation does not exist, the JSSTART command fails.
Because the information in the common segment is inherited from the CPOP
record and the JCL is specified as a whole, you cannot use OPTIONS DBMODE(UPDATE)
and OPTIONS DBMODE(COPY) together with JSSTART.
Note: If you do not specify ADID, IA, and OPNO, the JSSTART statement uses the
other keywords to find matching jobs and update all the operations matching your
criteria.
208 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Table 129. Keywords for JSSTART (continued)
Keyword Description
MEMBER Names a member in the EQQJSPDS DD statement that contains
the JCL. The JCL is copied from there into EQQTEMP for
addition into the JS record.
Note:
1. Some segments have Batch Loader statements with slightly different names.
OICOM has a Batch Loader statement of OISTART.
2. The Workload Automation Programming Language interpretation of the OI
record is slightly different from the PIF specification in which interval dates are
store in the field OIT within the Common Segment. Within Workload
Automation Programming Language, the Common Segment includes OIT as an
unresolved field, if requested in an OUTPUT statement, but will also decode the
OIT into separate OIT segments for each line of text. This makes for more
flexible processing in Batch Loader.
3. DBMODE(UPDATE) cannot be used to update individual lines of text.
The default is the current date if other VAL* keywords are set.
VALFROMT The start time of validity of this OI. You must specify this in
the format hhmm. See the notes about VAL* keywords.
The default is the current time if other VAL* keywords are set.
VALTOD The end date of validity of this OI. You must specify this in
the format
Note:
1. If you do not specify any of these VAL* keywords, IBM Workload Scheduler for
z/OS assumes that the operator instruction is permanent.
2. NEW_VALTOD and NEW_VALTOT are not valid for temporary Operator Instructions.
They cannot have their validity range changed by NEW keywords. To alter the
validity of temporary Operator Instructions they must be deleted and recreated.
The following example shows how to use DLM to specify operator instructions:
OISTART ADID(’TESTGROUP02 ’) OPNO(001) DLM(-TEXT-END-)
If the job fails you need to wake Doug up
Don’t worry what the time is, he lives for this kind of thing
Just to be on the safe side, wake him up if the job works as well
-TEXT-END-
210 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
OIT – Line of Text (OIT field of OICOM)
If DLM or MEMBER was not used, a OIT statement can be used to define each line of
text. The text must be coded on the same line following the OIT keyword.
The following example shows how to use OIT to specify operator instructions:
OISTART ADID(’TESTGROUP02 ’) OPNO(001)
OIT ’If the job fails you need to wake Doug up’
OIT ’Don’t worry what the time is, he lives for this kind of thing’
OIT ’Just to be on the safe side, wake him up if the job works as well’
PR – Period record
The PR record is a multi segment record, with the following structure.
PRCOM -+- Common segment (1 per PR)
|
+= PRDATE = A date interval (many per PR)
Note:
1. Some segments have Batch Loader statements with slightly different names.
PRCOM has a Batch Loader statement of PRSTART.
2. The Workload Automation Programming Language interpretation of the PR
record is slightly different from the PIF specification in which interval dates are
store in the field PRTAB within the Common Segment. Within Workload
Automation Programming Language, the Common Segment includes PRTAB as
an unresolved field, if requested in an OUTPUT statement, but will also decode
the PRTAB into separate PRDATE segments for start and end date pairs. This
makes for more flexible processing in Batch Loader.
212 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Table 133. Keywords for PRSTART (continued)
Keyword Description
DATELIST If used without ADID, this specifies a SAVELIST output from a
previous command that generated a GNDAY SAVELIST to use
as input to generate interval dates for the period.
Note:
1. The ability to base periods on applications is available only starting from IBM
Workload Scheduler for z/OS V8.6 SPE, or later.
2. Any period generated using an application will have only dates within the
FROMDATE/TODATE range. The period will need to be regenerated when that
range expires, or the Application or and prerequisites, such as referenced
calendars or periods, are changed.
3. Periods based on Applications must be non-cyclic.
4. Do not use an application that references the period you are updating with
PRSTART. The command works, but the dates will be based on the values of the
period prior to the command executing, which might result in different
intervals being placed in the period.
5. You can use OPTIONS PREMPTY to control what happens when no dates are
generated.
Note:
1. Some segments have Batch Loader statements with slightly different names.
RGCOM has a Batch Loader statement of RGSTART.
2. The rule text within the RGRUN segment is an ADRULE statement, not RGRULE.
After an RGSTART control statement there are one or more RGRUN control statements,
one for every run cycle of the run cycle group.
The ADRULE control statement must immediately follow the RGRUN statement. See
ADRULE for details.
Note: The RGSTART statement is available only starting from IBM Workload
Scheduler for z/OS V9.1, or later.
This value becomes the default deadline day for the entire
group. It is overruled at run cycle level by a value in the
DLDAY keyword of RGRUN.
DLTIME The deadline time that the application should be completed
by, in the format hhmm.
This value becomes the default deadline time for the entire
group. It is overruled at run cycle level by a value in the
DLTIME keyword of RGRUN.
IATIME The default input arrival time that will be generated by this
run cycle group in the hhmm format. This field is optional,
but if you do not specify here a value for the whole group,
you must specify input arrival times for each run cycle of
the group in the RGRUN control statement.
JVTAB The name of the JCL variable table associated with the run
cycle group (up to 16 characters). This field is optional. The
run cycle group variable table is superseded by the variable
table specified for each run cycle, if any.
OWNER The run cycle group owner's name (from 1 to 16 characters).
This field is optional.
RGID The name of the run cycle group. The name must be from 1
to 8 alphanumeric characters long and must start with a
letter or national character. This field is required.
RGRUN statements follow the RGSTART statement that defines a run cycle group, and
are followed each by the ADRULE statement that defines the run cycle rule.
Note: The RGRUN statement is available only starting from IBM Workload Scheduler
for z/OS V9.1, or later.
Table 135. Keywords for RGRUN
Keyword Description
CALENDAR The name of the calendar used by this run cycle. The name can
be of up to 16 characters. If it is not specified, the run cycle uses
the calendar specified for the run cycle group.
214 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Table 135. Keywords for RGRUN (continued)
Keyword Description
JVTAB The name of the JCL variable table to be used for the
occurrences generated. The name can be of up to 16 characters.
If it is not specified, the run cycle uses the variable table
specified for the run cycle group.
DESCR A free-format description of the run cycle, up to 50 characters
and enclosed in single quotation marks.
DLDAY The number of days (from 1 to 99) from the input arrival day
that the application should be completed in: 0 means that the
deadline is on the same day as the input arrival day. This must
be an integer.
A value specified here overrules for this run cycle any value
defined with RGDLDAY for the entire group.
DLTIME The deadline time that the application should be completed by,
in the format hhmm.
A value specified here overrules for this run cycle any value
defined with RGDLTIME for the entire group.
IATIME The time, in the format hhmm, that the application is to arrive at
the first workstation. If it is not specified here, the run cycle
uses the input arrival time specified for the run cycle group.
NAME The run cycle name. It can be of up to 8 characters.
RPTEND The repeat end time for the EVERY options, in the format hhmm.
It must be a time between the IA time of the run cycle and the
calendar work day end time of the application.
RPTEVRY The repeating frequency for the EVERY options, in the format
hhmm. It specifies that the application has an occurrence in the
long-term plan every hhmm, starting from the IA time to the
repeat end time (RPTENDT keyword). If this keyword is not set,
only the occurrence related to the IA time is added to the
long-term plan.
RULE Defines which free-day rule is in effect:
E Count only work days when using the rule or offset.
That is, free days are excluded. This option ensures
that the scheduled day will always be a work day. This
is the default for offset-based run cycles.
1 Count work days and free days when using the rule or
offset. If this gives a free day, schedule the application
on the closest work day before the free day.
2 Count work days and free days when using the rule or
offset. If this gives a free day, schedule the application
on the closest work day after the free day.
3 Count work days and free days when using the rule or
offset. If this gives a free day, schedule the application
on the free day. This is the default for rule-based run
cycles.
4 Count work days and free days when using the rule or
offset. If this gives a free day, do not schedule the
application at all.
Note: Some segments have Batch Loader statements with slightly different names.
SRCOM has a Batch Loader statement of SRSTART.
216 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
SRSTART – Special Resource common details (SRCOM
segment)
Use the SRSTART statement to define the common part of a Special Resource.
Table 136. Keywords for SRSTART
Keyword Description
DROP Specifies a date in the format YYMMDD, or + or – a number of
days, which ensures that any Interval Date preceding that date is
dropped from the Interval.
For example, to drop any dates over a year old, issue the
following command:
OPTIONS DBMODE(UPDATE)
MAXTYPE The value to which the global availability of the resource is reset,
when its maximum usage limit is reached:
Y Sets the global availability to Yes.
N Sets the global availability to No.
R Sets the global availability to blank.
MAXLIMIT The number of allocations of this resource after which the
resource global availability is changed to the value specified by
Max Usage Type.
QUANTITY A value from 0 to 999 999.
AVAIL Whether the resource is available, Y or N.
218 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Table 136. Keywords for SRSTART (continued)
Keyword Description
MATCHTYP This argument is required when spaces, asterisks (*) or percent
signs (%) form part of the name of the object, to indicate how to
treat the special characters.
EXA Use the name exactly as typed, treating asterisks (*) and
percent signs (%) as characters to include in the name.
PFX Treat as a prefix match, to find an item beginning with
what was typed but treating asterisks (*) and percent
signs (%) as characters included in the name.
SFX Treat as a suffix match, to find an item ending with
what was typed but treating asterisks (*) and percent
signs (%) as characters included in the name.
SRIVL - Interval
Use the SRIVL statement to define an interval within the Special Resource.
Note: To delete an interval, you must specify at least DAY or DATE, and the FROM
time.
Table 138. Keywords for SRIVL
Keyword Description
DAY For DAY, the day of the week:
DATE v STANDARD (default for days not defined)
v MONDAY
v TUESDAY
v WEDNESDAY
v THURSDAY
v FRIDAY
v SATURDAY
v SUNDAY
WS – Workstation record
The WS record is a multi segment record with the following structure.
WSCOM -+- Common segment (1 per WS)
|
+- WSAM – Access Method (up to 1 per WS)
|
+= WSSD =+= Specific Date (many per WS)
| |
| += WSIVL = Workstation Interval
| (many per WSSD)
|
+= WSWD =+= Weekday (up to 8 per WS)
| |
| += WSIVL = Workstation Interval
| (many per WSWD)
|
+= WSDEST = Virtual Workstation Destination
(many per WS)
Note:
1. Some segments have Batch Loader statements with slightly different names.
WSCOM has a batch loader statement of WSSTART.
2. The WSDEST statements do not define the full details of the Virtual Workstation
Destination, instead the make a reference to a WSV record which contains the
complete details. WSV records must be defined with WSVSTART and subordinate
statements. A default WSV record is automatically created when a WSDEST
statement is processed.
Fro example, to drop any dates over a year old, issue the
following command:
OPTIONS DBMODE(UPDATE)
WSSTART WSNAME(CPU1) DROP(-365)
WSNAME Name of the workstation (up to 4 characters).
TYPE Type of workstation:
G General (default)
C Computer
P Print
220 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Table 140. Keywords for WSSTART (continued)
Keyword Description
REPATTR The workstation reporting attribute:
A Automatic (default)
C Completion only
N Non reporting
S Start and Completion
JOBSETUP Specifies whether the workstation is a JCL setup workstation:
N No (default)
Y Yes
TRANSPORT Default Workstation transport time that is used for planning if
no transport time is specified on a dependency.
DURATION The default duration for an operation on this workstation.
PRINTOUT The DD Name to send the report for this workstation in the
planning jobs.
DESCR The description of this workstation
USAGE Parallel server usage:
P Planning
C Control
B Both
N None
SPLITABLE Whether operations on this workstation are splittable (Y or N).
R1NAME Name of workstation resource 1.
R1PLAN Whether workstation resource 1 is used for planning (Y or N).
R1CONT Whether workstation resource 1 is used for control (Y or N).
R2NAME Name of workstation resource 2.
R2PLAN Whether workstation resource 2 is used for planning (Y or N).
R2CONT Whether workstation resource 2 is used for control (Y or N).
DEST Destination to use, which must have a matching destination in
the IBM Workload Scheduler for z/OS ROUTOPTS statement.
STC Whether this is a Started Task workstation (Y or N).
WTO Whether this is a WTO workstation (Y or N).
AUTO Whether this is an Automation workstation (Y or N).
FTWS Whether this is a Fault Tolerant Workstation (Y or N).
WAIT Whether this is a Wait workstation (Y or N).
VIRTUAL Whether this is a Virtual workstation (Y or N).
ZCENTRIC Whether this is a z/OS Centric distributed workstation (Y or N).
222 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Note: The WSDEST statement is available only starting from IBM Workload
Scheduler for z/OS V8.5, or later.
Table 145. Keywords for WSDEST
Keyword Description
DEST Name of the destination. For using the controller as a
destination, enter a value of ********.
Note: After you have referenced a destination with the
WSDEST statement, IBM Workload Scheduler for z/OS
automatically creates a Virtual Workstation destination object
by using default values.
Note:
1. Some segments have Batch Loader statements with slightly different names.
WSVCOM has a segment name of WSVSTART.
2. A default WSV record is automatically created when a WSDEST statement is
processed. This means a WSVSTART statement can never be created by Batch
Loader statements, only replaced or updated. Since a full unload of a virtual
workstation will include the Batch Loader for both the WS and WSV portions,
DBMODE(ADD) makes an exception with WSV records and will REPLACE the record
automatically created when the WS record is created by INSERT with any values
contained within the WSVSTART construct.
3. Virtual workstations are available only starting from IBM Workload Scheduler
for z/OS V8.5, or later.
Note: The WSVSTART statement is available only starting from IBM Workload
Scheduler for z/OS V8.5, or later.
Table 146. Keywords for WSVSTART
Keyword Description
WSDEST Virtual Workstation Destination name. For using the controller
as a destination, enter a value of ********.
USAGE Parallel Server usage of the destination:
C Control
N None
Note: The WSVSD statement is available only starting from IBM Workload Scheduler
for z/OS V8.5, or later.
Table 147. Keywords for WSVSD
Keyword Description
DATE Date in the format YYMMDD.
DESCR Description of the date.
Note: The WSVWD statement is available only starting from IBM Workload Scheduler
for z/OS V8.5, or later.
Table 148. Keywords for WSVWD
Keyword Description
DAY Day of the week:
v MONDAY
v TUESDAY
v WEDNESDAY
v THURSDAY
v FRIDAY
v SATURDAY
v SUNDAY
v STANDARD
DESCR Description of the day.
Note: The WSVIVL statement is available only starting from IBM Workload
Scheduler for z/OS V8.5, or later.
224 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Table 149. Keywords for WSVIVL
Keyword Description
START Start time of the interval (HHMM).
END End time of the interval (HHMM).
PS Number of parallel servers available for the interval.
R1 Number of workstation resource 1 available for the interval.
R2 Number of workstation resource 2 available for the interval.
This also means that IBM Workload Scheduler for z/OS information becomes
available to jobs tracked by IBM Workload Scheduler for z/OS that were not
necessarily submitted by IBM Workload Scheduler for z/OS. Variables from the
JCL Variable tables can also be referenced along with Workload Automation
Programming Language variables defined directly in the Workload Automation
Programming Language SYSIN.
For more detailed information about variables, see “Variable naming convention.”
The VARSUB SCAN also opens the GLOBAL and APPLICATION tables (if set) at this
point, if no tables are already open, to allow searching for variables when needed.
At any point, except within a Batch Loader object construct, you can issue VARSET
If a variable is not found anywhere, the default behaviour is that the resolution
fails and the statement is not run. You can change this default by setting VARSUB
VARFAIL.
Is resolved as follows:
000001 VARSUB SCAN
000002 VARSET CODE VALUE(YY)
000003 VARSET SUFFIX VALUE(1234)
000004 MODIFY CPOC ADID(MYAPPL) IA(1101241002)
000005 MODIFY CPOP OPNO(005)
000006 MODIFY CPUSRF UFNAME(CODE) UFVALUE(XXYYZZ)
000007 MODIFY CPUSRF UFNAME(COMPOUND) UFVALUE(YY.1234)
000008 VARSUB NOSCAN
000009 MODIFY CPUSRF UFNAME(!OK) UFVALUE(It worked!!!)
Note:
1. The VARSUB SCAN statement activates variable substitution.
2. A user variable called CODE is set to YY.
3. A user variable called SUFFIX is set to 1234.
228 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
4. !OADID is resolved to the occurrence name, terminated by the closing
parenthesis. !OYMD1 is resolved to the occurrence IA date, terminated by the
prefix of the next variable. !OHHMM is resolved to the occurrence IA time,
terminated by the closing parenthesis.
5. !OOPNO is resolved to the number of the running operation, terminated by the
period (.), which will not appear in the resolved command because it is the
optional termination character. In this case, the period was not needed because
the closing parenthesis terminates the variable name anyway.
6. !CODE is resolved to YY, terminated by the period (.). In this case, the
termination character is required to distinguish the variable name CODE from
the subsequent ZZ characters. The termination character does not appear in the
resolved statements (just like in JCL).
7. !CODE is resolved to YY and !SUFFIX is resolved to 1234. In this case, the code
and the suffix are to be intentionally separated by a period in the resolved
statement, therefore a second period needs to be coded after the termination
character (just like in JCL).
8. The VARSUB NOSCAN statement deactivates variable substitution.
9. Even though the last line contains !OK and other exclamation marks, because
the variable substitution is turned off the statement is run as is. Hence, the
result is a user field called !OK with the value “It worked!!!”
Dependent variables work slightly differently from how they work with IBM
Workload Scheduler for z/OS JCL Tailoring. The target variable, on which the
dependency is related to, does not need to have been previously referenced in prior
Workload Automation Programming Language statements. Instead, Workload
Automation Programming Language automatically searches for and loads the
target variable, and if the target variable has a dependency it repeats the process,
until a static variable is found. If dependent variables were coded so that the
references are circular, the parsing fails and a message highlighting the variables in
the loop is issued.
It is important to understand this concept for situations where REXX functions are
used, because the presence of spaces within the value of a variable might modify
the way a command is run. Every time a variable is referenced, if it could contain
spaces, the variable name must be surrounded by quotation marks.
For example:
IF (“!TAG” = “-JOBNAME”) THEN
DO WHILE RIGHT(“!LINE”,1) <> “1”
An alternative way is to use the @V function, which returns a variable value into a
REXX expression and automatically returns quoted values into the expression. It
also works without variable substitution being active, which allows variables to be
used in expressions that might include the variable prefix for other purposes.
For example:
IF (@V(TAG) = “-JOBNAME”) THEN
DO WHILE RIGHT(@V(LINE),1) <> “1”
This function can also used in conjunction with variable substitution, to subscript a
variable, such as an object variable, without the need for a separate VARSET
VARIABLE statement.
Object variables
Some commands that read data from the databases or plans have an OBJECT
keyword to create a set of object variables that allows programmatic access to all of
the fields within the object that was accessed.
Object variables are all prefixed with the at sign (@) followed by the object name.
The number sign (#) is used as a prefix to indicate a count of subordinate elements.
The hyphen character is then used to separate the rest of the elements of each
object.
230 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Understanding the structure of the database and plan objects being represented is
crucial to understanding the syntax of the object variables as they directly
represent the structure of the records.
IBM Workload Scheduler for z/OS records can have up to 3 levels of information
(segments). The common segment is always level one, but then most records have
at least a second level, and some of those might also have a third level.
For example, in an application ADCOM is the level 1, then there can be multiple
ADRUN (run cycles) and ADOP (operations) at level 2, and ADOP has many level
3 sub segments such as ADDEP (dependencies) and ADSR (special resources)
amongst others. The record structures can be seen in the relationship diagrams in
the Batch Loader section.
where:
<object>
The object name that was specified in the OBJECT keyword.
<field>
The field name.
where:
<object>
The object name that was specified in the OBJECT keyword.
<segment2>
The name of the 2nd level segment.
where:
<object>
The object name that was specified in the OBJECT keyword.
<segment2>
The name of the 2nd level segment.
<n2> The sequence number of the 2nd level segment.
<field>
The field name.
where:
<object>
The object name that was specified in the OBJECT keyword.
<segment2>
The name of the 2nd level segment.
<n2> The sequence number of the 2nd level segment.
<segment3>
The name of the 3rd level segment.
<n3> The sequence number of the 3rd level segment.
<field>
The field name.
To obtain the special resource name of the 3rd resource of the 2nd operation
@OBJ-ADOP-2-ADSR-3-ADSRN, you can display the complete object structure of any
record type by using the SHOW OBJECT command.
In the following example, the SHOW OBJECT(CL) command shows all the available
object variables for a calendar with nshowing where sequence numbers fit into the
syntax:
08/22 10.47.39 EQQI200I SHOW OBJECT(CL)
08/22 10.47.39 EQQI601A Object: @OBJ-CLNAME
08/22 10.47.39 EQQI601A Object: @OBJ-CLDAYS
08/22 10.47.39 EQQI601A Object: @OBJ-CLSHIFT
08/22 10.47.39 EQQI601A Object: @OBJ-CLDESC
08/22 10.47.39 EQQI601A Object: @OBJ-CLVERS
08/22 10.47.39 EQQI601A Object: @OBJ-CLLDATE
08/22 10.47.39 EQQI601A Object: @OBJ-CLLTIME
08/22 10.47.39 EQQI601A Object: @OBJ-CLLUSER
08/22 10.47.39 EQQI601A Object: @OBJ-CLLUTS
08/22 10.47.39 EQQI601A Object: @OBJ-#CLSD
08/22 10.47.39 EQQI601A Object: @OBJ-CLSD-n-CLSDDATE
08/22 10.47.39 EQQI601A Object: @OBJ-CLSD-n-CLSDSTAT
08/22 10.47.39 EQQI601A Object: @OBJ-CLSD-n-CLSDDESC
08/22 10.47.39 EQQI601A Object: @OBJ-#CLWD
08/22 10.47.39 EQQI601A Object: @OBJ-CLWD-n-CLWDDAY
08/22 10.47.39 EQQI601A Object: @OBJ-CLWD-n-CLWDNUM
08/22 10.47.39 EQQI601A Object: @OBJ-CLWD-n-CLWDSTAT
08/22 10.47.39 EQQI601A Object: @OBJ-CLWD-n-CLWDDESC
08/22 10.47.39 EQQI299I Statement completed - RC=0 (00000014)
232 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
The VARSET VARIABLE keyword allows loop variables to be used as subscripts to
cycle through values within an object.
The following example shows a simple loop cycling through each job name in a
application object:
DO X = 1 TO @MYOBJ-#ADOP
VARSET JOB VARIABLE(@MYOBJ-ADOP-!X-ADOPJN)
DISPLAY !JOB
END
Note:
1. If the object variable does not exist, the resolution fails in accordance with the
VARFAIL setting or the VARSUB statement. As well as basic syntax, this applies
also to the sequence numbers. For example, @MYOBJ-ADCOM-2-ADOPNO is not
resolved if at least 2 operations do not exist in the object. The #<segment>
elements can be used to determine how many of each object exists.
2. Field names and segment names for each object can be obtained from the
EQQFLALL member of the Workload Automation Programming Language
member.
3. Object variables depend on the IBM Workload Scheduler for z/OS version. The
SHOW OBJECT command lists the variables that are valid for the IBM Workload
Scheduler for z/OS version in use.
4. Because object variables can contain a hyphen (-), you must use a period (.) to
delimit the variable name if the following character is a hyphen, as in the
following example:
VARSET APDATE VALUE([email protected]!@MYOBJ-ADFROM)
5. When an object variable is created from a Current Plan Operation command,
there will be an entry found by the identification arguments. To process only
the rows that were selected by the filter arguments, the object has an @FILTER
attribute, which contains a list of the item numbers returned by the filter
arguments.
For example:
VARSUB SCAN
DO X = 1 TO WORDS(@V(@CPO-@FILTER))
VARSET Y = WORD(@V(@CPO-@FILTER),@V(X))
DISPLAY "IA="||@V(@CPO!Y.-CPOPIA)
END
At the highest level, the number of entries in the SAVELIST can be accessed using
the following convention:
@<savelist-name>
Note: To make a SAVELIST accessible as an OBJECT variable, ensure that you use
different names. If an OBJECT variable and SAVELIST use the same name, the
SAVELIST can be completely accessed only by USELIST keywords and SHOW
SAVELIST.
The VARDATE command can either generate a variable, or can be used to set defaults
for other VARDATE commands by using the equal sign (=) in place of the variable
name.
For example, VARDATE = YEAR(+1) does not create a variable, but makes all
subsequent VARDATE commands calculate dates for the following year.
Note:
1. Even if VARDATE command looks similar to a run cycle rule, it is designed to
define only a single date within the specified year.
2. Because VARDATE is designed to help determine the Free days within the
calendar, it does not refer to calendars. For the purposes of calculation, it
considers only the differences between weekdays and weekends.
BASE(yymmdd|EASTER)
Provides a base date for setting an OFFSET against. The base date can either
be provided in the yymmdd format, either hard coded or from a Workload
Automation Programming Language variable, or it can be calculated using
a special base name.
Special base names currently include EASTER. This returns the date of
Easter Sunday. Defined as the Sunday following the first full moon after
the Vernal Equinox, it cannot be easily calculated by VARDATE rules, so a
special BASE name is used to access the complex calculation needed.
Note: When you have two consecutive holidays that could be moved by
weekends, it is best to use BASE in the second, to reference the variable
generated by the first. In this way if the first date moves, the second date
does not clash with it. For example:
VARDATE PH_CHRISTMAS ONLY(25) MONTH(DEC) RULE(AFTER)
VARDATE PH_BOXING_DAY BASE(!PH_CHRISTMAS) OFFSET(1) RULE(AFTER)
234 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
CALENDAR(<calendar-name>)
Sets the calendar to use if UNIT(WORKDAY) is used.
DAY(ALL|MON|TUE|WED|THU|FRI|SAT|SUN)
Defines which day to count within the calculation period. The default
value is ALL, which counts every day in the period.
For example, VARDATE PH-CHRISTMAST ONLY(25) MONTH(DEC) RULE(AFTER)
returns 25 December as the primary result, but if that day falls on a
weekend it moves it to the following Monday.
If a specific DAY is chosen, the ONLY|LAST count refers only to that type of
day. For example, VARDATE PH_THANKSGIVING ONLY(4) DAY(THU) MONTH(NOV)
returns the fourth Thursday in November, not the fourth day in November.
FORMAT(<date-format>)
By default, VARDATE returns a date in the native IBM Workload Scheduler
for z/OS format YYMMDD.
You can use the FORMAT keyword to change the format to an alternative
layout by using a combination of the following case sensitive values:
Table 150. Values for the FORMAT keywords
Value Description Example
aa Part of the day in lower case. pm for 1.05 pm
v midnight for exactly 00.00.00
v am for 00.00.01 – 11.59.59
v noon for exactly 12.00.00
v pm for 12.00.01 – 23.59.59
Note: The text is set in the LANGxx file
using TERM entries DP00, DPAM, DP12
and DPPM respectively. If you want to
provide alternative values, a user
language member can be concatenated
after the system member to override the
supplied value.
AA Part of the day in upper case. PM for 1.05 pm
v MIDNIGHT for exactly 00.00.00
v AM for 00.00.01 – 11.59.59
v NOON for exactly 12.00.00
v PM for 12.00.01 – 23.59.59
Note: The text is set in the LANGxx file
using TERM entries DP00, DPAM, DP12
and DPPM respectively. If you want to
provide alternative values, a user
language member can be concatenated
after the system member to override the
supplied value.
CC The century part of the year. 20 for 9 July 2014
D Day of the month with no leading zeros. 9 for 9 July 2014
DD Day of the month with leading zeros. 09 for 9 July 2014
DDD Day of the year (julian day). 190 for 9 July 2014
h Hours in 12 hour format with no leading 1 for 1.05 pm.
zeroes.
MONTH(ALL|JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC| )
Defines the scope of the period to start counting the days from. By default,
ALL covers the whole year, therefore ONLY counts from the start of the year
and LAST counts from the end of the year. Specifying a month targets the
scope to an individual month.
For example:
236 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
VARDATE PH_NEW_YEARS_DAY ONLY(1) /* First day of the year */
VARDATE PH_NEW_YEARS_EVE LAST(1) /* Last day of the year */
VARDATE PH_LABOR_DAY ONLY(1) DAY(MON) MONTH(MAY) /* First Monday in May */
VARDATE PH_CHRISTMAS ONLY(25) MONTH(DEC) /* 25th of December */
Specifying MONTH with no value corresponds to the current month, unless
you set OPTIONS DATE, in which case it uses the month specified.
For example, VARDATE Q2_W9 ONLY(9) DAY(MON) MONTH(APR) /* 9TH Monday
of 2ND Quarter */VARDATE FIRST_MON ONLY(1) DAY(MON) MONTH /*
1ST Monday current month */
Note: Even if the MONTH keyword sets the frame of reference to a particular
month, it does not restrict the results to that month. For example, VARDATE
Q2_W9 ONLY(9) DAY(MON) MONTH(APR) /* 9TH Monday of 2ND Quarter */
OFFSET(+n|-n)
After the date has been set by either BASE or ONLY|LAST, the OFFSET
keyword can be used to move the date backwards or forwards a number
of days. For example:
VARDATE MYFRI ONLY(5) DAY(WED) MON(AUG) OFFSET(2) /* FRI after 5th WED */
VARDATE GDFRI BASE(EASTER) OFFSET(-2) /* Good Friday */
ONLY|LAST(n)
Used to calculate dates entirely by rules, rather than use a BASE date as the
starting point. ONLY refers to a number of days from the start of the
calculation period, LAST refers to a number of days from the end of the
calculation period.
RULE(BEFORE|AFTER|ON|NEAREST)
After calculation and OFFSET, the date could point to a weekend date. This
might not be appropriate if VARDATE is being used to calculate public
holidays. The RULE keyword determines what to do with a weekend date:
BEFORE If the date points to a Saturday or Sunday move the date to the
Friday.
AFTER If the date points to a Saturday or Sunday move the date to the
Monday.
ON Do not adjust the date (default).
NEAREST
If the date points to a Saturday move the date to Friday, if it points
to a Sunday move the date to Monday.
SAVE(YES|NO)
The SAVE keyword determines whether and when the variable is written to
an IBM Workload Scheduler for z/OS JCL variable table:
YES The variable is written directly in the associated table at this point.
NO The variable is not written in the associated table, but might be
written later if a VARSAVE command is run referencing the table
associated to this variable.
If you specify the SAVE keyword with no argument, SAVE(YES) is assumed.
For example, VARSET MYVAR VALUE(Hello World) TABLE(MYTABLE) SAVE
Note: If you want to set several variables to be written to the same table, it
is more efficient to use a subsequent VARSAVE command than SAVE on every
VARSET.
Note:
1. Variables do not need to already exist within a table. They are added to
the table if needed.
2. Tables to not need to exist to have variables saved to them. If a table
does not exist, it is created automatically, using OPTIONS OWNER to set
the Owner ID and the description is set to the creating Job name, Jes
Number and current date.
SETUP(YES|NO|PROMPT)
Sets the SETUP value for any new variables when saved into a JCL Variable
Table:
YES Resolve variable at SETUP phase.
NO Resolve variable at SUBMIT phase (default).
PROMPT Promptable variable.
The default value can be changed by OPTIONS SETUP.
TABLE(table)
Assigns an IBM Workload Scheduler for z/OS JCL Variable Table to a
Workload Automation Programming Language variable, so that it can be
saved in a JCL Variable Table. If the variable has already been referenced
from a JCL Variable Table, the TABLE keyword is not needed. If a Workload
Automation Programming Language variable does not have an assigned
table name, it cannot be saved.
In the following example, RUNCOUNT might not exist in MYTABLE, but
VARFAIL(NULL) will cause the first table in the search sequence at the point
to be assigned as the source table name:
VARSUB SCAN TABLE(MYTABLE) VARFAIL(NULL)
VARSET RUNCOUNT VALUE(!RUNCOUNT) DELTA(1) SAVE(YES)
You can however use the TABLE keyword to override the name of the table
from which the variable originally came, so the value can be saved to a
new table.
TIME(hhmmss) or TIME(hhmm)
Provides the time portion of a variable. The time can be specified in either
the format hhmmss or hhmm. If hhmm is used, zero seconds is assumed. If the
TIME keyword is not specified, the current time is assumed.
UNIT (DAY|WEEK|MONTH|YEAR|WORKDAY|<day-of-week>|HOURS|MINUTES|SECONDS)
Sets the unit by which the OFFSET is counted:
DAY Adds or subtracts a number of days (default).
WEEK Adds or subtracts 7 days per value of OFFSET.
MONTH Uses the same day of the month using the OFFSET value to move
backwards or forwards that number of months. If the resulting
month is too short for the origin date, the last day of the month is
used.
YEAR Uses the same day of the month in the resulting year, adjusting 29
February to 28 if necessary.
238 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
WORKDAY
Adds or subtracts a number of work days.
Any day of the week
You can also use any day of the week as a UNIT, for
exampleMONDAY, such that OFFSET(-1) UNIT(MONDAY) would find the
Monday preceding the origin date, and OFFSET(+1) UNIT(MONDAY)
would find the Monday following the origin date. If the origin
date and the unit are the same day of the week, the offset is seven
days.
HOURS Adds hours to the time portion of the date.
MINUTES
Adds minutes to the time portion of the date.
SECONDS
Adds seconds to the time portion of the date.
YEAR(yyyy|+n|-n)
Sets the year for which the date is calculated. By default, it uses the current
Workload Automation Programming Language Date, but can be set it to an
individual year, or a relative year. The YEAR keyword is most effectively
used by setting the default relative to the running job; in this way the same
job can run annually to calculate sets of dates for each year. For example,
VARDATE = YEAR(+1) /* Calculate dates for next year */
OPTIONS DBMODE(UPDATE)
The following example shows an annual job to maintain calendars with public
holidays. The member DATEIT generates variables, which can be referenced in
Batch Loader as required:
Note:
1. In some countries, rules relating to public holidays falling on weekends may
vary regionally. In this case, the RULE keyword is not coded in the DATE
member so that a regionally appropriate statement can be coded before
referencing the DATE member. See the comments within the DATE member
before using it. For example:
VARDATE = RULE(NEAREST)
INCLUDE EQQFILE(DATEUS)
2. The DATExx members are provided to help ease the generation of calendars; if
the rules do not meet your requirements, you can create your own versions.
3. When VARDATE is run, message 033 is issued to show the value that is set. This
also adds the day of the week at the end of the message to confirm that the
date was set as you expected, as shown in the following example:
EQQI033A Variable TO set to 1503082100 (Sunday)
VARSAVE [table-1,table-2,...,table-n]
You can specify as many tables as you want. For each table, the command saves
any variables flagged as SAVE(NO) and update the JCL Variable Table in IBM
Workload Scheduler for z/OS.
To update multiple variables in the same table, this is the most effective way
because the command updates all the variables in the same table
contemporaneously. Instead, VARSET and SAVE(YES) perform individual table
updates for each specified variable.
240 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Note:
1. Variables do not need to exist within a table. They are added to the table, if
needed.
2. Tables do not need to exist to have variables saved to them. If a table does not
exist, it is created automatically using OPTIONS OWNER to set the Owner ID; the
description is set to the creating Job Name, Jes Number and current date.
or
VARSET variable [VALUE(value)] [USRF(user-field-name)]
[@V(input-variable-name)] [SYMBOL(system-symbol-name)]
[MISSING(ERROR|FAIL|NULL|ASIS)] [ENVATTR(major,minor,item)]
[LEFT(n)] [RIGHT(n)] [SUBSTR(start[,length])]
[WORD(n,[ALL|BASIC|COMMA|NONE|PERIOD|SPACE],[<other>])]
[UPPER(YES|NO)] [DELTA(n)]
[TABLE(table)] [SAVE(YES|NO)] [SETUP(YES|NO|PROMPT)]
The VARSET command can be either a simple REXX style assignment or a keyword
driven process. You can also use the alternative command name SETVAR.
The REXX style is identified by an equal sign (=) after the variable name. The
characters following the equal sign (=) must be a standard REXX expression and
can use REXX functions. For more details about the REXX expressions and
available functions, see the TSO/E REXX Reference manual.
The first keyword of each VARSET command must be the variable to which the
command refers. All other keywords are optional. A VARSET command without
optional keywords, sets the variable to a null value. But if the variable was already
set or referenced in the Workload Automation Programming Language statements,
that value is kept.
242 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
v CMD, for information about Workload Automation Programming
Language commands.
v DD, for information about DD statements in the running step.
v JCL, for information about steps in the JCL.
v OPTIONS, for values of a Workload Automation Programming
Language OPTIONS keyword.
minor The type of information you want, which varies depending on
major.
item Key information to identify the item from which you require
information.
For CMD, the item can be one of the following:
v The label of the command.
v The absolute command number, for example 1 is the command
in the current step.
v The relative command number, for example -1 is the command
before the current command.
v Special command labels:
LAST_RC
The previous command.
LAST_XRC
The last command that was actually run.
MAX_RC The command that issued the highest return code.
MAX_RESP
The command that issued the highest response code.
For DD the item can be one of the following:
v A DD name. If the DD name has multiple data sets coded, a
fourth argument can be coded to identify the number of the DD
statement. For example, ENVATTR(DD,DSNAME,MYDD,3) refers to the
3rd data set on the MYDD concatenation. If omitted, the first DD
statement for the DD name is returned.
v Absolute DD number. For example, 1 is the first DD statement in
the current step.
v Relative DD number. For example, -1 is the last DD statement in
the current step.
For JCL, the item can be one of the following:
v PROCSTEP or STEPNAME.PROCSTEP values tTo specify the step. If
duplicates occur, the latest name is used.
v Absolute step number. For example, 1 is the first step in the JCL.
v Relative step number. For example, -1 is the step before the
current step, 0 is the current step.
v Special step labels:
LAST_RC
The previous step.
LAST_XRC
The last step that was actually run.
244 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Table 151. Valid combinations for ENVATTR (continued)
Major Minor Item Description
JCL STEP yes Fully qualified step name of the
identified step. If this is a step in a
proc, the step name is composed
by the step calling the procedure
and the step within the procedure
that is running, separated by a
period. For example,
STEPNAME.PROCSTEP. If this is a
step running directly within the job
JCL, this value is only the single
step name without period.
JCL STEPNAME yes The name of the step calling the
procedure, if this step is within a
procedure. Otherwise, this value is
blank.
JCL PROCSTEP yes The name of the step actually
running the program.
JCL RC yes The return code of the step.
JCL PGM yes The name of the program for the
current step.
JCL PARM yes The PARM value for the current
step.
OPTIONS <keyword> no The value of the specified OPTIONS
keyword.
OPTIONS SPE yes Whether the SPE has been
activated (Y or N).
LEFT(n)
Sets the n left most characters of the current variable value as the new
value of the variable.
For example, VARSET MYPFX VALUE(!OADID) LEFT(4) causes MYPFX to contain
the first 4 characters of the application name.
You can use LEFT and RIGHT together in the same statement to extract
characters relative to the end of value of unknown length. For example,
VARSET MYPFX VALUE(!OADID) RIGHT(4) LEFT(1) causes MYPFX to contain
the 4th from last non-blank character of the application name.
RIGHT(n)
Sets the n right most non-blank characters of the current variable value as
the new value of the variable.
For example, VARSET MYPFX VALUE(!OADID) RIGHT(4) causes MYPFX to
contain the last 4 characters of the application name, regardless of how
long the application name actually is.
You can use RIGHT and LEFT together in the same statement to extract
characters relative to the end of value of unknown length. For example,
VARSET MYPFX VALUE(!OADID) RIGHT(4) LEFT(1) causes MYPFX to contain
the 4th from last non-blank character of the application name.
SUBSTR(start[,length])
Allows you to extract a specific portion of the current value of a variable,
246 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
exception is when the variable is set to a null value, which is considered
zero. This allows for new counter variables to be self initialising.
You can use this keyword to increment variables within JCL variable
tables. In the following example, the table MYTABLE is opened. Before the
VARSET command is run, the value of RUNCOUNT is substituted into the VALUE
keyword. Then, the VARSET command adds 1 to the current value and saves
it into MYTABLE. If RUNCOUNT does not already exist in MYTABLE, the
VARFAIL(NULL) results in the VALUE keyword containing a null value, which
the DELTA process considers as zero. The end result being RUNCOUNT contains
1 and is added to MYTABLE.
VARSUB SCAN TABLE(MYTABLE) VARFAIL(NULL)
VARSET RUNCOUNT VALUE(!RUNCOUNT) DELTA(1) SAVE(YES)
TABLE(table)
Assigns a JCL Variable Table to a Workload Automation Programming
Language variable, so that it can be saved in a JCL Variable Table. If the
variable has already been referenced from a JCL Variable Table, the TABLE
keyword is not needed. If a Workload Automation Programming Language
variable is not assigned to a table name, it cannot be saved.
In the following example, RUNCOUNT could not exist in MYTABLE, but
VARFAIL(NULL) causes the first table in the search sequence to be assigned
as the source table name. You can, however, use the TABLE keyword to
override the name of the table from which the variable originally came,
and save the value in a new table.
VARSUB SCAN TABLE(MYTABLE) VARFAIL(NULL)
VARSET RUNCOUNT VALUE(!RUNCOUNT) DELTA(1) SAVE(YES)
SAVE(YES|NO)
Determines if and when the variable is written to a JCL variable table:
YES The variable is written directly into the associated table at this
point.
NO The variable is not written into the associated table, but could be
written later if a VARSAVE command is run by referencing the table
associated to this variable.
If you specify SAVE without argument, SAVE(YES) is assumed.
Note:
1. To set several variables in the same table, it is more effective to use a
subsequent VARSAVE command than using SAVE on every VARSET.
2. Variables do not need to already exist within a table. They are added to
the table, if needed.
3. Tables to not need to exist to have variables saved to them. If a table
does not exist, it is created automatically, using OPTIONS OWNER to set
the Owner ID. The description is set to the creating Job name, Jes
Number, and current date.
SETUP(YES|NO|PROMPT)
Sets the SETUP value for any new variables when saved into a JCL Variable
Table:
YES Resolve variable at SETUP phase.
NO Resolve variable at SUBMIT phase (default).
PROMPT Promptable variable.
Note: The sequence of keywords on the VARSET statement does affect the result of
the command. Each keyword will act upon the value as it would stand at that
point in the sequence of actions performed by the keyword. For example,
Note: If you use the same character for prefix and suffix, you must specify
both the prefix and suffix each time a variable immediately follows another
variable, such as in %MYVAR1%%MYVAR2%
When a VARSUB SCAN statement is found, it automatically opens the
Application and Global tables.If you want to open only specific tables, use
the SEARCH keyword before the SCAN keyword, as in the following example:
VARSUB SEARCH(MYTABLE,NOAPPL,NOGLOBAL) SCAN
NOSCAN deactivates Workload Automation Programming Language variable
substitution. The table search sequence is left as it is; if variable
substitution is activated again in the statements, the same search sequence
is used.
If substitution is being deactivated and you don not plan to activate it
again in the Workload Automation Programming Language statements,
close all open tables by using the CLOSE keyword in conjunction with
NOSCAN, as in the following example:
VARSUB NOSCAN CLOSE
CLOSE[(table)]
Closes a table and remove it from the search sequence. The variable
definitions and any dependencies are dropped from storage, so it is good
practice for systems with large tables or many dependent variable values.
It does not drop the value of any variable that has already been referenced
from the closed table, those values remain accessible for the remainder of
the Workload Automation Programming Language process.
248 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
You can close a single table, for example VARSUB CLOSE(MYTABLE), or close
all open tables, including the Application and Global tables, by not
specifying a table name.
If you need to close multiple tables, the CLOSE keyword can be repeated,
for example VARSUB CLOSE(MYTABLE1) CLOSE(MYTABLE2)
SEARCH(table,table,table,APPL|NOAPPL,GLOBAL|NOGLOBAL)
Sets the order in which tables are searched for variables. By default,
Workload Automation Programming Language first searches tables opened
with TABLE keywords, starting with the most recently opened. Then it
searches the Application table (if one is specified for the occurrence
running the Workload Automation Programming Language job) and the
Global table.
If not specified in the SEARCH keyword, the Application and Global tables
are automatically added as the last 2 tables in the sequence. Specifying
NOAPPL means that the Application table is not searched, and specifying
NOGLOBAL means that the Global table is not searched.
For example:
v VARSUB SEARCH(MYTABLE1,MYTABLE2) sets the search sequence to
MYTABLE1, then MYTABLE2, then the Application table, followed by
the Global table.
v VARSUB SEARCH(MTABLE1,APPL,MYTABLE2) sets the search sequence to
MYTABLE1, then the Application table, then MYTABLE2, followed by
the Global table.
v VARSUB SEARCH(MTABLE1,APPL,MYTABLE2,NOGLOBAL) sets the search
sequence to MYTABLE1, then the Application table, then MYTABLE2.
The Global table is not searched.
Tables already open but not specified in the SEARCH keyword, are
automatically closed. Tables that were not open and are specified in the
SEARCH keyword, are automatically opened.
VARFAIL(ASIS|FAIL|NULL)
Defines what to do if a variable referenced in a Workload Automation
Programming Language statement is not found:
ASIS The variable is left unresolved in the Workload Automation
Programming Language statement.
FAIL The parsing for the statement fails and it is not performed
(default).
NULL The variable is considered to have a null value and is assumed to
belong to the first table in the table search sequence, at the point
where it is referenced.
TABLE(table)
Opens a table and add it to the front of table search sequence. Opening a
table loads the definition, including the dependencies, of each variable
within the table, but it does not set any values of Workload Automation
Programming Language variables. This occurs only when a variable is
referenced within a Workload Automation Programming Language
statement.
With the TABLE keyword you can open only one table at a time. To add
multiple tables to the search sequence, you can repeat the TABLE keyword
as in the following example:
VARSUB TABLE(MYTABLE1) TABLE(MYTABLE2)
Note:
v The sequence of keywords on the VARSUB statement does affect the result of the
command.
v VARSUB SCAN turns on variable substitution for subsequent statements. Variables
cannot be used within the same VARSUB statement that uses the SCAN keyword.
Hence, VARSUB SCAN TABLE(MYTABLE) is valid, while VARSUB SCAN TABLE(!OADID)
is not valid, because it uses a the variable !OADID. These should be coded on
separate statements, as in the following example:
VARSUB SCAN
VARSUB TABLE(!OADID)
250 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Chapter 12. Record processing
Record processing within Workload Automation Programming Language and
WAPLEXECs can account for a significant part of the processing time. When
processing thousands of records, there are some considerations you can make
within Workload Automation Programming Language to reduce the amount of
record processing and save run time.
If the SELECT statements are being generated as a result of a LIST statement using
OPTIONS SELECT(Y) and only the common segment is needed, a LIST statement is
sufficient to extract the data you need. Setting OPTIONS SELECT(N) (default) results
in smaller records being retrieved and prevents extra requests to IBM Workload
Scheduler for z/OS for each identified object.
Note: If you need to produce Batch Loader output, you can use only a SELECT
command and the complete record must be retrieved.
| When a record is retrieved from IBM Workload Scheduler for z/OS using the
| SELECT statement, the entire record is retrieved and the header is processed to
| identify each segment. The segment is then processed only if there is a reference to
| it. If you code only OUTPUT statements for the segments you need, the processing is
| reduced.
| Record processing involves extracting every field in the segment, creating a data
| output record for the segment, running a Segment Processing Exit (if requested,)
| and generating Batch Loader. Some of this processing is avoided if you code only
| OUTPUT statements for the fields from which you require data.
| Use the LOADDEF command to load in-built OUTPUT statements. The following
| example shows how to load definitions of every field for every segment. Use this
| command only when you need to extract entire objects, for example for Batch
| Loader generation.
| LOADDEF *
| To load OUTPUT definitions for particular records, use LOADDEF in a more selective
| way. For example, to load the in-built OUTPUT statements for the Application
| Definition records specify:
| LOADDEF AD*
252 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Appendix A. Resource reference
Alternative resource names
The following alternative resource names can be used as alternatives to increase
the clarity of the command syntax.
Table 152. Alternative resource names
Action Resource Alternative name
DELETE AD ADCOM APPLICATION APPL
SCHEDULE SCHED JOBSTREAM
DELETE CL CLCOM CAL CALENDAR
DELETE CPOC OCCURENCE OCC
DELETE CPOP CPOPCOM OPERATION OP
DELETE CPPRE PRED PREDECESSOR
DELETE ETT TRIGGER
DELETE JCLV JCLVCOM TABLE
DELETE JS JSCOM JCL
DELETE OI OICOM INSTRUCTION TEXT
DELETE PR PRCOM PERIOD
DELETE SR SRCOM RESOURCE
DELETE WS WSCOM WORKSTATION
INSERT CPOC OCCURENCE OCC
INSERT CPOP CPOPCOM OPERATION OP
INSERT CPPRE PRED PREDECESSOR
LIST ADCOM AD APPLICATION APPL
SCHEDULE SCHED JOBSTREAM
LIST CLCOM CL CAL CALENDAR
LIST CPOC OCCURENCE OCC
LIST CPOPCOM CPOP OPERATION OP
LIST CPWSCOM CPWS
LIST ETT TRIGGER
LIST JCLVCOM JCLV TABLE
LIST JSCOM JS JCL
LIST OICOM OI INSTRUCTION TEXT
LIST PRCOM PR PERIOD
LIST SRCOM SR RESOURCE
LIST WSCOM WS WORKSTATION
MODIFY CPOC OCCURENCE OCC
MODIFY CPOP OPERATION OP
MODIFY IVL INTERVAL
SELECT AD APPLICATION APPL SCHEDULE
SCHED JOBSTREAM
FIELDS(ADMONITOR , /* Monitor AD */
ADTO , /* Valid-To date */
ADDESC , /* Descriptive text */
ADGROUP , /* Authority group name */
ADOWNER , /* Owner ID */
ADODESC , /* Owner description */
ADPRIOR , /* Priority */
254 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
ADCAL , /* Calendar */
ADLDATE , /* Date last updated */
ADLTIME , /* Time last updated */
ADLUSER , /* Userid of last updater */
ADCOMVERS , /* Record version number */
ADGROUPID , /* Group definition ID */
/* ADLUTS , /* TOD clock at last update */
ADDSM , /* Deadline smoothing factor */
ADDLIM) /* Deadline feedback limit */
/*--------------------------------------------------------------------+
| SEGMENT=ADKEY - Key |
+--------------------------------------------------------------------*/
OUTPUT ADKEY DATA(OUTDATA) LOADER(OUTBL)
KEYS(ADID , /* Application ID */
ADSTAT , /* Application status */
/* A=Active, P=Pending */
ADTO) /* Valid-To date */
/*--------------------------------------------------------------------+
| SEGMENT=ADRUN - Run cycle |
+--------------------------------------------------------------------*/
OUTPUT ADRUN DATA(=) LOADER(=)
KEYS(ADCOM.ADID , /* Application ID */
ADCOM.ADSTAT , /* Application status */
/* A=Active, P=Pending */
ADCOM.ADTYPE , /* Application type */
/* A=Application, G=Group Def */
ADCOM.ADFROM , /* Valid-From date */
ADRSEQ) /* Sequence number */
/*--------------------------------------------------------------------+
| SEGMENT=ADOP - Operation |
+--------------------------------------------------------------------*/
OUTPUT ADOP DATA(OUTDATA) LOADER(=)
KEYS(ADCOM.ADID , /* Application ID */
ADCOM.ADSTAT , /* Application status */
FIELDS(ADOPWSID , /* Workstation */
ADOPJN , /* Jobname */
ADOPDESC , /* Operation description */
ADOPDUR , /* Duration in minutes */
ADOPSM , /* Smoothing factor (or -1) */
ADOPLIM , /* Limit for feedback (or -1) */
ADOPHRC , /* Highest OK RC (or -1) */
ADOPSTD , /* Relative day input arrival */
ADOPSTT , /* Input arrival time */
ADOPDD , /* Relative day deadline */
ADOPDT , /* Deadline time */
ADOP#R1 , /* Number of R1 resources required */
ADOP#R2 , /* Number of R2 resources required */
ADOP#PS , /* Number of servers used */
ADOPJCL , /* Job class */
ADOPPCL , /* Print class */
ADOPFOR , /* Form number */
ADOPSUB , /* Automatic submit (Y/N) */
ADOPAJR , /* Automatic CPU release (Y/N) */
ADOPCAN , /* Cancel if late time (Y/N) */
ADOPTIM , /* Submit job on time (Y/N) */
ADOPAEC , /* Automatic error compl (Y/N) */
ADOPVERS , /* Record version number */
ADOPWTO , /* Deadline WTO (Y/N) */
ADOPRES , /* Restartable (Y/N/blank) */
ADOPRER , /* Rerouteable (Y/N/blank) */
ADOPCM , /* Restart and Cleanup */
/* A=Automatic */
/* I=Immediate */
/* M=Manual */
/* N=None */
/* ADOPWSINFO , /* Workstation info */
ADOPWSISET , /* Info available (Y/N) */
ADOPWSTYPE , /* Type G|C|P */
ADOPWSREP , /* Reporting attr (A/S/C/N) */
ADOPWSSUBT , /* Subtype JCL, STC, WTO */
/* none J/S/W/blank */
ADOPJCRT , /* (WLM) Critical job */
ADOPJPOL , /* (WLM) Late job policy */
ADOPUSRSYS , /* User sysout needed */
ADOPEXPJCL , /* Expanded jcl needed */
ADOPDURI , /* Duration in 100th of sec */
ADOPMON , /* Operation monitored */
ADOPCENSCR , /* Centralized script */
ADOPUSEEXT , /* Use ADEXTNAME field */
ADOPUSESE , /* Use ADEXTSE field */
ADOPUSESA , /* Use System Automation (Y/N) */
ADOPWLMCLASS , /* WLM Service Class */
ADOPCONDRJOB) /* Conditional recovery job */
/*--------------------------------------------------------------------+
| SEGMENT=ADEXT - Extended name |
+--------------------------------------------------------------------*/
OUTPUT ADEXT DATA(=) LOADER(=)
KEYS(ADCOM.ADID , /* Application ID */
ADCOM.ADSTAT , /* Application status */
/* A=Active, P=Pending */
ADCOM.ADTYPE , /* Application type (for EQQILSON) */
ADCOM.ADFROM , /* Valid-From date */
ADOP.ADOPNO) /* Operation number (for EQQILSON) */
256 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
ADEXTNAME , /* Extended name */
ADEXTVERS , /* Record version number */
ADEXTSENAME) /* Scheduling environment name */
/*--------------------------------------------------------------------+
| SEGMENT=ADRE - Remote job information |
+--------------------------------------------------------------------*/
OUTPUT ADRE DATA(OUTDATA) LOADER(=)
KEYS(ADCOM.ADID , /* Application ID */
ADCOM.ADSTAT , /* Application status */
/* A=Active, P=Pending */
ADCOM.ADTYPE , /* Application type */
ADCOM.ADFROM , /* Valid-From date */
ADOP.ADOPNO) /* Operation number */
/*--------------------------------------------------------------------+
| SEGMENT=ADSAI - Operation system automation information |
+--------------------------------------------------------------------*/
OUTPUT ADSAI DATA(OUTDATA) LOADER(=)
KEYS(ADCOM.ADID , /* Application ID */
ADCOM.ADSTAT , /* Application status */
/* A=Active, P=Pending */
ADCOM.ADTYPE , /* Application type (for EQQILSON) */
ADCOM.ADFROM , /* Valid-From date */
ADOP.ADOPNO) /* Operation number (for EQQILSON) */
/*--------------------------------------------------------------------+
| SEGMENT=ADSR - Special resource |
+--------------------------------------------------------------------*/
OUTPUT ADSR DATA(OUTDATA) LOADER(=)
KEYS(ADCOM.ADID , /* Application ID */
ADCOM.ADSTAT , /* Application status */
/* A=Active, P=Pending */
ADCOM.ADTYPE , /* Application type (for EQQILSON) */
ADCOM.ADFROM , /* Valid-From date */
ADOP.ADOPNO , /* Operation number (for EQQILSON) */
ADSRN) /* Special resource name */
/*--------------------------------------------------------------------+
| SEGMENT=ADXIV - External Dependency Interval Definition |
+--------------------------------------------------------------------*/
OUTPUT ADXIV DATA(=) LOADER(=)
KEYS(ADCOM.ADID , /* Application ID */
ADCOM.ADSTAT , /* Application status */
/* A=Active, P=Pending */
ADCOM.ADTYPE , /* Application type (for EQQILSON) */
ADCOM.ADFROM , /* Valid-From date */
ADOP.ADOPNO , /* Operation number (for EQQILSON) */
ADXIVADID , /* Predecessor application name */
ADXIVWSID , /* Predecessor workstation ID */
ADXIVOPNO) /* Predecessor operation number */
/*--------------------------------------------------------------------+
| SEGMENT=ADCNC - Condition |
+--------------------------------------------------------------------*/
OUTPUT ADCNC DATA(=) LOADER(=)
KEYS(ADCOM.ADID , /* Application ID */
ADCOM.ADSTAT , /* Application status */
/* A=Active, P=Pending */
ADCOM.ADTYPE , /* Application type */
ADCOM.ADFROM , /* Valid-From date */
ADOP.ADOPNO , /* Operation number */
ADCNCID) /* Condition ID */
258 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
ADCNCSIMPNO , /* Nuber of condition dependencies */
ADCNCCOUNT , /* Rule type: */
/* 0 = All */
/* N>0 = At least N of */
ADCNCVERS , /* Record version */
ADCNCDESC) /* Condition description */
/*--------------------------------------------------------------------+
| SEGMENT=ADCNS - Condition dependency |
+--------------------------------------------------------------------*/
OUTPUT ADCNS DATA(=) LOADER(=)
KEYS(ADCOM.ADID , /* Application ID */
ADCOM.ADSTAT , /* Application status */
/* A=Active, P=Pending */
ADCOM.ADTYPE , /* Application type (for EQQILSON) */
ADCOM.ADFROM , /* Valid-From date */
ADOP.ADOPNO , /* Operation number (for EQQILSON) */
ADCNSID , /* Condition ID */
ADCNSSEQ) /* Sequence number */
/*--------------------------------------------------------------------+
| SEGMENT=ADCIV - Conditional Dependency Interval Definition |
+--------------------------------------------------------------------*/
OUTPUT ADCIV DATA(=) LOADER(=)
KEYS(ADCOM.ADID , /* Application ID */
ADCOM.ADSTAT , /* Application status */
/* A=Active, P=Pending */
ADCOM.ADTYPE , /* Application type */
ADCOM.ADFROM , /* Valid-From date */
ADOP.ADOPNO , /* Operation number */
ADCIVADID , /* Predecessor application name */
ADCIVCID , /* Predecessor condition ID */
ADCIVOPNO) /* Predecessor operation number */
/*--------------------------------------------------------------------+
| SEGMENT=ADUSF - User field |
+--------------------------------------------------------------------*/
OUTPUT ADUSF DATA(OUTDATA) LOADER(=)
KEYS(ADCOM.ADID , /* Application ID */
ADCOM.ADSTAT , /* Application status */
/* A=Active, P=Pending */
ADCOM.ADTYPE , /* Application type (for EQQILSON) */
ADCOM.ADFROM , /* Valid-From date */
ADOP.ADOPNO , /* Operation number (for EQQILSON) */
ADUSFNAME) /* Field name */
/*--------------------------------------------------------------------+
| RECORD=AWSCL - All workstations closed |
+--------------------------------------------------------------------*/
/*--------------------------------------------------------------------+
| SEGMENT=AWSCL - All workstations closed interval |
+--------------------------------------------------------------------*/
OUTPUT AWSCL DATA(OUTDATA) LOADER(OUTBL)
KEYS(AWCDATE) /* Date */
/*--------------------------------------------------------------------+
| RECORD=CL - Calendar |
+--------------------------------------------------------------------*/
/*--------------------------------------------------------------------+
| SEGMENT=CLCOM - Calendar common segment |
+--------------------------------------------------------------------*/
OUTPUT CLCOM DATA(OUTDATA) LOADER(OUTBL)
KEYS(CLNAME) /* Calender name */
/*--------------------------------------------------------------------+
| SEGMENT=CLSD - Specific date |
260 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
+--------------------------------------------------------------------*/
OUTPUT CLSD DATA(=) LOADER(=)
KEYS(CLCOM.CLNAME, /* Calender name */
CLSDDATE) /* Specific date */
/*--------------------------------------------------------------------+
| SEGMENT=CLWD - Weekday |
+--------------------------------------------------------------------*/
OUTPUT CLWD DATA(=) LOADER(=)
KEYS(CLCOM.CLNAME, /* Calender name */
CLWDDAY) /* Weekday */
/*--------------------------------------------------------------------+
| RECORD=ETT - Event triggered tracking criteria |
+--------------------------------------------------------------------*/
/*--------------------------------------------------------------------+
| SEGMENT=ETT - Event triggered tracking criteria |
+--------------------------------------------------------------------*/
OUTPUT ETT DATA(OUTDATA) LOADER(OUTBL)
KEYS(ETTTYPE, /* Type of trigger */
ETTNAME) /* Trigger name */
/*--------------------------------------------------------------------+
| RECORD=GENDAYS - Output from the GENDAYS command |
+--------------------------------------------------------------------*/
/*--------------------------------------------------------------------+
| SEGMENT=GNDAY - GENDAYS date |
+--------------------------------------------------------------------*/
OUTPUT GNDAY DATA(OUTDATA)
KEYS(GNDAYDATE /* Generated run day */
GNDAYIAT) /* IA Time (IAT keyword) */
FIELDS(GNDAYFLAGS, /* Flags */
GNDAYFMOB, /* Moved before - Free day rule */
GNDAYFMOA, /* Moved after - Free day rule */
GNDAYFKEP, /* Kept */
GNDAYFCAN, /* Cancelled - Free day rule */
GNDAYFEIA, /* Run on free day - Early IA */
GNDAYFOUT, /* Moved outside interval */
GNDAYFREM, /* Work date outside interval */
GNDAYFROM, /* From date (FROMDATE keyword) */
GNDAYTO, /* To date (TODATE keyword) */
GNDAYCAL, /* Calendar (CALENDAR keyword) */
GNDAYFDRULE, /* Free day rule (FDAYRULE keyword) */
GNDAYRULEDEF, /* Rule definition (RULEDEF keyword) */
TAG) /* GENDAYS: ADID,NUM,ADRPER,ADRTYPE */
/*--------------------------------------------------------------------+
| RECORD=JCLV - JCL variable table |
/*--------------------------------------------------------------------+
| SEGMENT=JCLVVAR - Variable definition |
+--------------------------------------------------------------------*/
OUTPUT JCLVVAR DATA(=) LOADER(=)
KEYS(JCLVCOM.JCLVCTAB, /* Jcl variable table id */
JCLVVVAR) /* Jcl variable name */
/*--------------------------------------------------------------------+
| SEGMENT=JCLVDEP - Variable dependency |
+--------------------------------------------------------------------*/
OUTPUT JCLVDEP DATA(=) LOADER(=)
KEYS(JCLVCOM.JCLVCTAB, /* Jcl variable table id */
JCLVVAR.JCLVVVAR, /* Jcl variable name */
JCLVDIV) /* Value of setting variable */
/*--------------------------------------------------------------------+
| RECORD=OI - Operator instruction |
+--------------------------------------------------------------------*/
/*--------------------------------------------------------------------+
| SEGMENT=OICOM - Operator instruction |
+--------------------------------------------------------------------*/
OUTPUT OICOM DATA(OUTDATA) LOADER(OUTBL)
KEYS(OIADID, /* Application name */
OIOPNO, /* Operation number */
OITOD, /* Valid to date */
262 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
OITOT, /* Valid to time */
OIFROMD, /* Valid from date */
OIFROMT, /* Valid from time */
OIWSN) /* Workstation name */
/*--------------------------------------------------------------------+
| SEGMENT=OIT - Operator instruction text |
+--------------------------------------------------------------------*/
OUTPUT OIT DATA(=) LOADER(=)
KEYS(OICOM.OIADID, /* Application name */
OICOM.OIOPNO, /* Operation number */
OICOM.OITOD, /* Valid to date */
OICOM.OITOT, /* Valid to time */
OICOM.OIFROMD, /* Valid from date */
OICOM.OIFROMT, /* Valid from time */
OICOM.OIWSN, /* Workstation name */
OITSEQ) /* Line number */
/*--------------------------------------------------------------------+
| RECORD=PR - Period |
+--------------------------------------------------------------------*/
/*--------------------------------------------------------------------+
| SEGMENT=PRCOM - Period Common Segment |
+--------------------------------------------------------------------*/
OUTPUT PRCOM DATA(OUTDATA) LOADER(OUTBL)
KEYS(PRNAME) /* Period name */
/*--------------------------------------------------------------------+
| SEGMENT=PRDATE - Period date |
| (derived from PRTAB in PRCOM) |
+--------------------------------------------------------------------*/
OUTPUT PRDATE DATA(=) LOADER(=)
KEYS(PRCOM.PRNAME /* Period name */
PRDSTART) /* Period start date */
/*--------------------------------------------------------------------+
| RECORD=RG - Run cycle group |
+--------------------------------------------------------------------*/
/*--------------------------------------------------------------------+
| SEGMENT=RGCOM - Common |
+--------------------------------------------------------------------*/
OUTPUT RGCOM DATA(OUTDATA) LOADER(OUTBL)
KEYS(RGID) /* Run cycle group ID */
/*--------------------------------------------------------------------+
| SEGMENT=RGRUN - Run cycle |
+--------------------------------------------------------------------*/
OUTPUT RGRUN DATA(=) LOADER(=)
KEYS(RGCOM.RGID , /* Run cycle group ID */
RGRSEQ) /* Sequence number */
/*--------------------------------------------------------------------+
| RECORD=SR - Special resource |
+--------------------------------------------------------------------*/
/*--------------------------------------------------------------------+
| SEGMENT=SRCOM - Common |
+--------------------------------------------------------------------*/
OUTPUT SRCOM DATA(OUTDATA) LOADER(OUTBL)
KEYS(SRCNAME) /* Special resource name */
FIELDS(SRCGROUP, /* Group id */
SRCHIPER, /* Dlf resource (Y/N) */
SRCUSEDFOR, /* Used for (N/P/C/B) */
SRCONERROR, /* On error option */
SRCIVLNUM, /* Number of intervals */
SRCDESC, /* Description */
264 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
SRCONCOMPL, /* On complete (Y/N/R/blank) */
SRCMAXTYPE, /* Max limit type (Y/N/R) */
SRCMAXLIMIT, /* Max limit value */
SRCDEFQUANT, /* Default quantity */
SRCDEFAVAIL, /* Default availability */
SRCLUSER, /* Last updating user */
SRCLDATE, /* Date of last update */
SRCLTIME, /* Time of last update */
SRCLUTS, /* Tod clock at last update */
SRCVER , /* Record version */
SRCWXDBZ , /* WAXD Analyse: In TWSz database */
SRCWXREF , /* WAXD Analyse: Referenced */
SRCWXMAX , /* WAXD Analyse: Maximum usage */
SRCWXUSE , /* WAXD Analyse: Usage type */
SRCWXDEF , /* WAXD Analyse: Default workstation */
SRCWXCTL) /* WAXD Analyse: Control usage */
/*--------------------------------------------------------------------+
| SEGMENT=SRIVL - Interval |
+--------------------------------------------------------------------*/
OUTPUT SRIVL DATA(=) LOADER(=)
KEYS(SRCOM.SRCNAME, /* Special resource name */
SRIVLDAY, /* Day number */
SRIVLDATE, /* Specific date */
SRIVLFTIME) /* From time */
FIELDS(SRIVLTTIME, /* To time */
SRIVLQUANT, /* Max number of SRs to allocate */
SRIVLWSCNUM, /* Number of connected WSs */
SRIVLAVAIL) /* Workstation name */
/*--------------------------------------------------------------------+
| SEGMENT=SRIWS - Interval workstation |
+--------------------------------------------------------------------*/
OUTPUT SRIWS DATA(=) LOADER(=)
KEYS(SRCOM.SRCNAME, /* Special resource name */
SRIVL.SRIVLDAY, /* Day number */
SRIVL.SRIVLDATE, /* Specific date */
SRIVL.SRIVLFTIME, /* From time */
SRIWSNAME) /* Workstation name */
/*--------------------------------------------------------------------+
| SEGMENT=SRDWS - Default workstation |
+--------------------------------------------------------------------*/
OUTPUT SRDWS DATA(=) LOADER(=)
KEYS(SRCOM.SRCNAME, /* Special resource name */
SRDWSNAME) /* Workstation name */
/*--------------------------------------------------------------------+
| RECORD=WS - Workstation description |
+--------------------------------------------------------------------*/
/*--------------------------------------------------------------------+
| SEGMENT=WSCOM - Common |
+--------------------------------------------------------------------*/
OUTPUT WSCOM DATA(OUTDATA) LOADER(OUTBL)
KEYS(WSNAME) /* Workstation name */
/*--------------------------------------------------------------------+
| SEGMENT=WSCPUREC - Workstation CPU record |
+--------------------------------------------------------------------*/
OUTPUT WSCPUREC DATA(OUTDATA) LOADER(OUTBL)
KEYS(WSNAME) /* Workstation name */
/*--------------------------------------------------------------------+
| SEGMENT=WSSD - Specific date |
266 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
+--------------------------------------------------------------------*/
OUTPUT WSSD DATA(=) LOADER(=)
KEYS(WSCOM.WSNAME , /* Workstation name */
WSSDDATE) /* Specific date */
/*--------------------------------------------------------------------+
| SEGMENT=WSWD - Weekday |
+--------------------------------------------------------------------*/
OUTPUT WSWD DATA(=) LOADER(=)
KEYS(WSCOM.WSNAME , /* Workstation name */
WSWDDAY) /* Week day */
/*--------------------------------------------------------------------+
| SEGMENT=WSAM - Workstation access method |
+--------------------------------------------------------------------*/
OUTPUT WSAM DATA(=) LOADER(=)
KEYS(WSCOM.WSNAME) /* Workstation name */
/*--------------------------------------------------------------------+
| SEGMENT=WSDEST - Workstation destination |
+--------------------------------------------------------------------*/
OUTPUT WSDEST DATA(=) LOADER(=)
KEYS(WSCOM.WSNAME , /* Workstation name */
WSDVDEST) /* Destination */
/*--------------------------------------------------------------------+
| SEGMENT=WSVCOM - Common |
+--------------------------------------------------------------------*/
OUTPUT WSVCOM DATA(OUTDATA) LOADER(OUTBL)
KEYS(WSVNAME, /* Workstation name */
WSVDESTN) /* Workstation destination */
/*--------------------------------------------------------------------+
| SEGMENT=WSVIVLD - Open interval |
+--------------------------------------------------------------------*/
OUTPUT WSVIVLD DATA(=) LOADER(=)
KEYS(WSVCOM.WSVNAME , /* Workstation name */
WSVCOM.WSVDESTN , /* Workstation destination */
/*--------------------------------------------------------------------+
| SEGMENT=WSVSDD - Specific date |
+--------------------------------------------------------------------*/
OUTPUT WSVSDD DATA(=) LOADER(=)
KEYS(WSVCOM.WSVNAME , /* Workstation name */
WSVCOM.WSVDESTN , /* Workstation destination */
WSVSDDDATE) /* Specific date */
/*--------------------------------------------------------------------+
| SEGMENT=WSVWDD - Weekday |
+--------------------------------------------------------------------*/
OUTPUT WSVWDD DATA(=) LOADER(=)
KEYS(WSVCOM.WSVNAME , /* Workstation name */
WSVCOM.WSVDESTN , /* Workstation destination */
WSVWDDDAY) /* Week day */
/*--------------------------------------------------------------------+
| GROUP=CP - All Current Plan objects |
+--------------------------------------------------------------------*/
/*--------------------------------------------------------------------+
| RECORD=CPOC - Current plan occurrence |
+--------------------------------------------------------------------*/
/*--------------------------------------------------------------------+
| SEGMENT=CPOC - Current plan occurrence |
+--------------------------------------------------------------------*/
OUTPUT CPOC DATA(OUTDATA)
KEYS(CPOCADI , /* Application ID */
/* CPOCIA , /* Input arrival */
CPOCIAD , /* Modified if IA is modified */
CPOCIAT) /* else original from plan */
268 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
CPOCADDED , /* Added to current plan (Y/N) */
CPOCLATE , /* Latest out passed (Y/N) */
CPOCADDF , /* Adding function (E/D/P/A/ ) */
CPOCMON , /* Monitoring flag */
CPOCPRI , /* Priority */
CPOC#OP , /* No. ops in occurrence */
CPOCOPC , /* No. ops completed */
CPOC#ER , /* No. ops ended in error */
CPOC#UN , /* No. ops undecided */
CPOC#ST , /* No. ops started */
CPOCRDU , /* Remaining dur critical path */
CPOCROP , /* Remaining ops critical path */
CPOCCWS , /* Wsname of 1st critical op */
CPOCCOP , /* Op no. of 1st critical op */
CPOCVERS , /* Version number=1 */
CPOCJVT , /* JCL variable table */
CPGROUPID , /* Group definition ID */
CPOCCAL , /* Calendar name */
CPOCRDUI , /* Remain. dur crit. path sec */
CPOCOCTO , /* Occurrence token */
/* CPOCCLO , /* First critical op latest out */
CPOCCLOD , /* Date */
CPOCCLOT , /* Time in 100th of sec. */
CPOCETTCRIT , /* ETT criteria */
CPOCETTTYP , /* ETT type: J or R */
CPOCETTJOB , /* ETT job name */
CPOCETTJID , /* ETT job ID */
CPOCETTGROOT , /* ETT GDG root */
CPOCETTEVNAM , /* Complete ETT event name */
CPOCETTGGEN) /* ETT GDG generation */
/*--------------------------------------------------------------------+
| RECORD=CPOP - Current plan operation |
+--------------------------------------------------------------------*/
/*--------------------------------------------------------------------+
| SEGMENT=CPOPCOM - Common |
+--------------------------------------------------------------------*/
OUTPUT CPOPCOM DATA(OUTDATA)
KEYS(CPOPADI , /* Application ID */
CPOPNO , /* Operation number */
/* CPOPIA , /* Application input arrival */
CPOPIAD , /* modified if ia is modified */
CPOPIAT) /* else original from plan */
270 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
CPOPJCRT , /* Workload monitor critical job */
CPOPJPOL , /* Workload monitor late job policy */
CPOPEDUI , /* Estimated dur. in 100th of sec */
CPOPADUI , /* Actual dur. in 100th of sec */
CPOPPSTI , /* Plan. start time 100th of sec */
CPOPPETI , /* Plan. end time in 100th of sec */
CPOPLOTI , /* Latest out time 100th of sec */
CPOPASTI , /* Actual start time 100th of sec */
CPOPAATI , /* Actual arr. time 100th of sec */
CPOPISTI , /* Int. start time 100th of sec */
CPOPAETI , /* Actual end time 100th of sec */
CPOPEXPJCL , /* Expanded JCL needed */
CPOPUSRSYS , /* User sysout needed */
CPOPOCTO , /* Occurrence token */
CPOPMON , /* Monitoring flag */
CPOPCENSCR , /* Centralised script */
CPOPNLVL , /* Max nesting level */
CPOPRECIS , /* Y if CPREC segment exists */
CPOPTWSJN , /* Rule used for jobname in Symphony */
CPOPINSYM , /* Job in Symphony (N/S/Y) */
CPOPDELAY , /* Started on wait workstation (Y/N) */
CPOPCRITPATH , /* Belonging to critical path */
CPOPWLMCLASS , /* WLM service class */
CPOPWAITSE , /* Waiting for scheduling */
/* environment (N/S/Y) */
CPOPVIRTDEST , /* Submission destination */
CPOPEXECDEST , /* Execution destination */
CPOPDREM , /* Removable by DP */
CPOPCONDRJOB , /* Conditional recovery job */
CPOPUNEXPRC , /* Unexpected RC (Y/N) */
CPOPSHADOW , /* Shadow job (Y/N) */
CPOPFTRC , /* FTA WS numeric RC */
CPOP#CPROP , /* Number of conditional predecessors */
CPOP#CSUOP , /* Number of conditional successors */
CPOP#CONDTOT , /* Number of conditions */
CPOP#COND_T , /* Number of True conditions */
CPOP#COND_F , /* Number of False conditions */
CPOP#PX , /* Number of predecessors in X status */
CPOPORIGRC , /* Original return code */
CPOPBNDST , /* Bind status for shadow jobs */
/* Possible values for CPOPBNDST are: */
/* P - Bind sent */
/* J - Sending bind */
/* B - Bind error */
/* I - Bind OK */
CPOPWPEND , /* Waiting for at least 1 P-Pred */
CPOPWMPEND , /* Waiting for at least 1 Mand Pred */
CPOPWMPPEND) /* Waiting for at least 1 Mand/P-Pred */
/*--------------------------------------------------------------------+
| SEGMENT=CPEXT - Operation extended name |
+--------------------------------------------------------------------*/
OUTPUT CPEXT DATA(=)
KEYS(CPOPCOM.CPOPADI , /* Application ID */
CPOPCOM.CPOPIA , /* Application input arrival */
CPEXTOWNOP) /* Owning op number */
/*--------------------------------------------------------------------+
| SEGMENT=CPSAI - Operation system automation information |
+--------------------------------------------------------------------*/
/*--------------------------------------------------------------------+
| SEGMENT=CPREND - Distributed remote job info |
+--------------------------------------------------------------------*/
FIELDS(CPRDVERS , /* Version */
CPRDCOMP , /* Complete on failed bind (Y/N) */
CPRDJSN , /* Job stream name */
CPRDJSWS , /* Job stream workstation */
/* CPRDIAD , /* Input arrival date (YYMMDD) | blank */
/* CPRDIAT , /* Input arrival time (HHMM) | blank */
CPRDIA) /* Input arrival (YYMMDDHHMM) | blank */
/*--------------------------------------------------------------------+
| SEGMENT=CPRENZ - z/OS remote job info |
+--------------------------------------------------------------------*/
OUTPUT CPRENZ DATA(=)
KEYS(CPOPCOM.CPOPADI , /* Owning application ID */
CPOPCOM.CPOPIA , /* Owning application input arrival */
CPRZOWOP) /* Owning operation number */
FIELDS(CPRZVERS , /* Version */
CPRZCOMP , /* Complete on failed bind (Y/N) */
CPRZOPNO , /* Operation number */
CPRZOCCN , /* Application ID */
CPRZWS , /* Job workstation */
CPRZJOBN , /* Job name */
/* CPRZIAD , /* Input arrival date (YYMMDD) | blank */
/* CPRZIAT , /* Input arrival time (HHMM) | blank */
CPRZIA) /* Input arrival (YYMMDDHHMM) | blank */
/*--------------------------------------------------------------------+
| SEGMENT=CPSR - Special resource |
+--------------------------------------------------------------------*/
OUTPUT CPSR DATA(=)
KEYS(CPOPCOM.CPOPADI , /* Owning application ID */
CPOPCOM.CPOPIA , /* Owning application input arrival */
CPOPCOM.CPOPNO , /* Owning operation number */
CPSRN) /* Name */
/*--------------------------------------------------------------------+
| SEGMENT=CPOPSRU - Special resource usage |
+--------------------------------------------------------------------*/
OUTPUT CPOPSRU DATA(OUTDATA)
KEYS(CPOPUADI, /* Application id */
CPOPUIA, /* Application input arrival */
CPOPUNO) /* Operation number */
272 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
CPOPUVERS, /* Version */
CPOPUPRI, /* Priority */
CPOPUSRQ, /* Sr quantity used/needed */
CPOPUWRS, /* Reason for wait for sr */
CPOPUSRU, /* Sr allocation type */
CPOPUEDUI) /* Est dur in 100th sec */
/*--------------------------------------------------------------------+
| SEGMENT=CPREC - Operation recovery |
+--------------------------------------------------------------------*/
OUTPUT CPREC DATA(=)
KEYS(CPRECAID , /* Application ID */
CPRECNO , /* Operation number */
CPRECJREID , /* ID of recovery job */
CPRECIA) /* Input arrival */
/*--------------------------------------------------------------------+
| SEGMENT=CPPRE - Predecessor |
+--------------------------------------------------------------------*/
OUTPUT CPPRE DATA(=)
KEYS(CPOPCOM.CPOPADI , /* Owning application ID */
CPOPCOM.CPOPIAD , /* Owning application IA date */
CPOPCOM.CPOPIAT , /* Owning application IA time */
CPOPCOM.CPOPNO , /* Owning operation number */
CPPREADI , /* Application ID */
CPPRENO , /* Operation number */
/* CPPREIA , /* Input Arrival */
CPPREIAD , /* Modified if IA is modified */
CPPREIAT) /* else original from plan */
/*--------------------------------------------------------------------+
| SEGMENT=CPCPR - Current plan conditional predecessor |
+--------------------------------------------------------------------*/
OUTPUT CPCPR DATA(=)
KEYS(CPOPCOM.CPOPADI , /* Application ID */
CPOPCOM.CPOPIA , /* Application input arrival */
CPOPCOM.CPOPNO , /* Owning op number */
CPCPREADI , /* Predecessor application ID */
CPCPREIA , /* Predecessor input arrival */
/* CPCPREIAD , /* Predecessor input arrival date */
/* CPCPREIAT , /* Predecessor input arrival */
CPCPRENO , /* Predecessor operation number */
CPCPRE_CID) /* Condition ID */
/*--------------------------------------------------------------------+
| SEGMENT=CPSUC - Successor |
+--------------------------------------------------------------------*/
OUTPUT CPSUC DATA(=)
KEYS(CPOPCOM.CPOPADI , /* Owning application ID */
CPOPCOM.CPOPIAD , /* Owning application IA date */
CPOPCOM.CPOPIAT , /* Owning application IA time */
CPOPCOM.CPOPNO , /* Owning operation number */
CPSUCADI , /* Application ID */
CPSUCNO , /* Operation number */
/* CPSUCIA , Input Arrival */
CPSUCIAD , /* Modified if IA is modified */
CPSUCIAT) /* else original from plan */
/*--------------------------------------------------------------------+
| SEGMENT=CPCSU - Current plan conditional succcessor |
+--------------------------------------------------------------------*/
OUTPUT CPCSU DATA(=)
KEYS(CPOPCOM.CPOPADI , /* Application ID */
CPOPCOM.CPOPIA , /* Application input arrival */
CPOPCOM.CPOPNO , /* Owning op number */
CPCSUCADI , /* Successor application ID */
CPCSUCIA , /* Successor input arrival */
/* CPCSUCIAD , /* Successor input arrival date */
/* CPCSUCIAT , /* Successor input arrival */
CPCSUCNO , /* Successor operation number */
CPCSUC_CID) /* Condition ID */
274 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
FIELDS(CPCSUCCR , /* On critical path */
CPCSUCVERS , /* Version */
CPCSUCJN , /* Job name */
CPCSUCST) /* Successor status */
/*--------------------------------------------------------------------+
| SEGMENT=CPUSRF - Operation User field |
+--------------------------------------------------------------------*/
OUTPUT CPUSRF DATA(OUTDATA)
KEYS(CPUFADID, /* Application ID */
CPUFOPNO , /* ID of recovery job */
CPUFIA , /* Input arrival */
CPUFNAME) /* User field name */
/*--------------------------------------------------------------------+
| RECORD=CPCOND - Current plan condition |
+--------------------------------------------------------------------*/
/*--------------------------------------------------------------------+
| SEGMENT=CPCONDCO - Current Plan Condition |
+--------------------------------------------------------------------*/
OUTPUT CPCONDCO DATA(OUTBL)
KEYS(CPCOADI , /* Application ID */
CPCOIA , /* Input arrival */
/* CPCOIAD , /* Input arrival date */
/* CPCOIAT , /* Input arrival time */
CPCOOPNO , /* Operation number */
CPCOCID) /* Condition ID */
/*--------------------------------------------------------------------+
| SEGMENT=CPSIMP - Current Plan Condition dependency |
+--------------------------------------------------------------------*/
OUTPUT CPSIMP DATA(=)
KEYS(CPCONDCO.CPCOADI , /* Application ID */
CPCONDCO.CPCOIA , /* Input arrival */
/* CPCONDCO.CPCOIAD , /* Input arrival date */
/* CPCONDCO.CPCOIAT , /* Input arrival time */
CPCONDCO.CPCOOPNO , /* Operation number */
CPCONDCO.CPCOCID , /* Condition ID */
CPSIPREADI , /* Predecessor application ID */
CPSIPREIA , /* Predecessor input arrival */
/* CPSIPREIAD , /* Predecessor input arrival date */
/* CPSIPREIAT , /* Predecessor input arrival time */
CPSIPREOPNO) /* Predecessor operation number */
/*--------------------------------------------------------------------+
| RECORD=CPST - Current plan status |
+--------------------------------------------------------------------*/
/*--------------------------------------------------------------------+
| SEGMENT=CPST - Common |
+--------------------------------------------------------------------*/
OUTPUT CPST DATA(OUTDATA)
FIELDS(CPSTVERS, /* Version number=1 */
CPSTCRD, /* Current plan create date */
CPSTCRT, /* Current plan create time */
CPSTENDD, /* Current plan end date */
CPSTENDT, /* Current plan end time */
CPSTBUD, /* Last backup date */
CPSTBUT, /* Last backup time */
CPST1ED, /* 1st event after backup date */
CPST1ET, /* 1st event after backup time */
CPST1EDTS, /* 1st evevt timestamp date */
CPST1ETTS, /* 1st evevt timestamp time */
CPSTTURN, /* Turnover produces ncp */
CPSTCP, /* Current plan exists (Y/N) */
CPSTCPDDN, /* Current plan ddname */
CPSTJTDDN, /* Job tracking ddname */
CPSTJSDDN) /* Jcl repository ddname */
/*--------------------------------------------------------------------+
| RECORD=CPWS - Current plan workstation |
+--------------------------------------------------------------------*/
/*--------------------------------------------------------------------+
| SEGMENT=CPWSCOM - Common |
+--------------------------------------------------------------------*/
OUTPUT CPWSCOM DATA(OUTDATA)
KEYS(CPWSN) /* Workstation name */
276 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
CPWSSTAT, /* Workstation status (A/O/F) */
CPWSRERUT, /* Reroute mode (Y/N) */
CPWSALTWS, /* Alternat ws name */
CPWSTWS, /* Fta ws status (Y/N) */
CPWSLNK, /* Link ws status */
CPWSDEST , /* Destination */
CPWSZCEN , /* Z-Centric workstation (Y/N) */
CPWSRETY , /* Remote engine type (D/Z/blank) */
CPWSSX) /* Sum of suppressed cond op */
/*--------------------------------------------------------------------+
| SEGMENT=CPIVL - Current plan workstation open interval |
+--------------------------------------------------------------------*/
OUTPUT CPIVL DATA(=)
KEYS(CPWSCOM.CPWSN, /* Workstation name */
CPIVLFR) /* From yymmddhhmm */
/*--------------------------------------------------------------------+
| SEGMENT=CPWSVCOM - Workstation instance |
+--------------------------------------------------------------------*/
OUTPUT CPWSVCOM DATA(OUTDATA)
KEYS(CPWSVNAM , /* Workstation name */
CPWSVDST) /* Workstation Destination */
FIELDS( /* */
/* CPWSVDESC , /* Description (not used) */
/* CPWSVSC# , /* Number of complete ops (not used) */
/* CPWSVSCE , /* Estimated duration (not used) */
/* CPWSVSCR , /* Real duration (not used) */
/* CPWSVSI# , /* Number of interupted ops (not used) */
/* CPWSVSIE , /* Estimated duration (not used) */
/* CPWSVSIR , /* Real duration (not used) */
/* CPWSVSS# , /* Number of started ops (not used) */
/* CPWSVSSE , /* Estimated duration (not used) */
CPWSVSR# , /* Number of started ops */
CPWSVSRE , /* Estimated duration */
/* CPWSVSW , /* Number of waiting ops (not used) */
/* CPWSVSWE , /* Estimated duration (not used) */
CPWSVR1IU# , /* No of Resource 1 in use */
CPWSVR2IU# , /* No of Resource 2 in use */
CPWSVIVL# , /* No of open intervals */
CPWSVTYPE , /* Work station type: C only */
CPWSVREP , /* Reporting attribute A only */
CPWSVPSC , /* Control on parallel servers */
CPWSVR1N , /* Resource 1 name */
/* CPWSVR1C , /* Res. used at control (not used) */
CPWSVR2N , /* Resource 2 name */
/* CPWSVR2C , /* Res. used at control (not used) */
CPWSVVERS , /* Version number=1 */
CPWSVSTC , /* Started task (Y/N) */
/*--------------------------------------------------------------------+
| SEGMENT=CPVIVL - Workstation instance interval |
+--------------------------------------------------------------------*/
OUTPUT CPVIVL DATA(OUTDATA)
KEYS(CPWSVCOM.CPWSVNAM , /* Workstation name */
CPWSVCOM.CPWSVDST , /* Destination */
/* CPVIVLFR , /* Interval start */
CPVIVLFD , /* Date YYMMDD */
CPVIVLFT) /* Time HHMM */
/*--------------------------------------------------------------------+
| RECORD=CRITPATH - Critical path |
+--------------------------------------------------------------------*/
/*--------------------------------------------------------------------+
| SEGMENT=CRPTHCOM - Critical path common (undocumented segment) |
+--------------------------------------------------------------------*/
OUTPUT CRPTHCOM DATA(OUTDATA)
KEYS(CRPTADIDHED, /* Critical job application ID */
CRPTOPNOHED) /* Critical job operation number */
/*--------------------------------------------------------------------+
| SEGMENT=CRPTHJOB - Job in the critical path (undocumented segment) |
+--------------------------------------------------------------------*/
OUTPUT CRPTHJOB DATA(OUTDATA)
KEYS(CRPTADID, /* Application ID */
CRPTOPNO, /* Operation number */
CRPTOI) /* Operation input arrival */
FIELDS(CRPTWSN, /* Workstation */
CRPTDESC, /* Description */
CRPTJOBN, /* Jobname */
CRPTXDH, /* Duration HH */
CRPTXDM, /* Duration MM */
CRPTXDS, /* Duration SS */
CRPTLS, /* Latest start */
CRPTPS, /* Planned start */
CRPTAS, /* Actual start */
CRPTOD, /* Operation Deadline */
CRPTAE, /* Actual end */
CRPTAETI, /* */
CRPTOPST, /* Operation status */
CRPTXST, /* Extended status */
CRPTMHLD, /* Manual hold */
CRPTNOP, /* NOP */
CRPTOPPRI) /* Priority */
278 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
/*--------------------------------------------------------------------+
| RECORD=CSR - Current plan special resource |
+--------------------------------------------------------------------*/
/*--------------------------------------------------------------------+
| SEGMENT=CSRCOM - Current plan resource common |
+--------------------------------------------------------------------*/
OUTPUT CSRCOM DATA(OUTDATA)
KEYS(CSRNAME) /* Special resource name */
FIELDS(CSRGROUP, /* Group id */
CSRHIPER, /* Dlf resource (Y/N) */
CSRUSEDFOR, /* Used for (n/p/c/b) */
CSRONERROR, /* On error (f /fx/fs/k / ) */
CSROVAV, /* Overrid availability (Y/N/ ) */
CSROVQ, /* Overrid quant, 0 if none */
CSRDEVI, /* Deviation */
CSRIVLNUM, /* Number of intervals */
CSRCIVLN, /* Current interval number */
CSRDESC, /* Description */
CSRLIFTIEDAT, /* Lifespan expiration date and time */
CSRDEFNWSC, /* No of connected workstations */
CSRDEFQUANT, /* Default quantity */
CSRDEFAVAIL, /* Default availability */
CSRLIFTIEACT, /* Lifespan action (Y/N/R) */
CSRONCOMPL, /* On complete (Y/N/R/blank) */
CSRMAXTYPE, /* Max usage type (Y/N/R) */
CSRLUSER, /* Last updating user */
CSRLDATE, /* Date of last update */
CSRLTIME, /* Time of last update */
CSRLUTS, /* Tod clock last update */
CSRVER, /* Record version */
CSRACTAVAIL, /* Actual availability */
CSRACTQUANT, /* Actual quantity */
CSRXUSE, /* Amount currently used excl */
CSRSUSE, /* Amount currently used shrd */
CSRXALL, /* Any all excl user now (Y/N) */
CSRSALL, /* Any all shrd user now (Y/N) */
CSRWAITQ, /* Any on waitq (Y/N) */
CSRCIDATE, /* Current interval date */
CSRCIFTIME, /* Current interval from time */
CSRCITTIME, /* Current interval to time */
CSRCIQUANT, /* Current interval quantity */
CSRCIADJQ, /* Current interval adjust qty */
CSRCIAVAIL) /* Current interval avail (Y/N) */
/*--------------------------------------------------------------------+
| SEGMENT=CSRIVL - Current plan special resource interval |
+--------------------------------------------------------------------*/
OUTPUT CSRIVL DATA(=)
KEYS(CSRCOM.CSRNAME, /* Special resource name */
CSRIDATE, /* Specific date */
CSRIFTIME) /* From time */
FIELDS(CSRITTIME, /* To time */
CSRIQUANT, /* Allocatable amount */
CSRIWSCNUM, /* Number of connected ws’s */
CSRIAVAIL) /* Available (Y/N) */
/*--------------------------------------------------------------------+
| SEGMENT=CSRIWS - CP resource interval connected workstation |
+--------------------------------------------------------------------*/
OUTPUT CSRIWS DATA(=)
KEYS(CSRCOM.CSRNAME, /* Special resource name */
CSRIVL.CSRIDATE, /* Specific date */
CSRIVL.CSRIFTIME, /* From time */
CSRIWSNAME) /* Workstation name */
/*--------------------------------------------------------------------+
| RECORD=JCLPREP - JCL setup variables |
+--------------------------------------------------------------------*/
/*--------------------------------------------------------------------+
| SEGMENT=JSVCOM - JCLPREP common |
+--------------------------------------------------------------------*/
OUTPUT JSVCOM DATA(OUTDATA)
KEYS(JSVCADID, /* Application id */
JSVCIAD, /* Input arrival date YYMMDD */
JSVCIAT, /* Input arrival time HHMM */
JSVCOPNO) /* Operation number */
/*--------------------------------------------------------------------+
| SEGMENT=JSVVAR - JCLPREP Variable definition |
+--------------------------------------------------------------------*/
OUTPUT JSVVAR DATA(=)
KEYS(JSVCOM.JSVCADID, /* Application id */
JSVCOM.JSVCIAD, /* Input arrival date yymmdd */
JSVCOM.JSVCIAT, /* Input arrival time hhmm */
JSVCOM.JSVCOPNO, /* Operation number */
JSVVNAME) /* Variable name */
/*--------------------------------------------------------------------+
| RECORD=JS - Job control language |
+--------------------------------------------------------------------*/
/*--------------------------------------------------------------------+
| SEGMENT=JSCOM - Job control language segment |
+--------------------------------------------------------------------*/
OUTPUT JSCOM DATA(OUTDATA) LOADER(OUTBL)
KEYS(JSADID, /* Application id */
JSIA, /* Occurrence input arrival */
JSOPNO) /* Operation number */
FIELDS(JSIAD, /* Date */
JSIAT, /* Time */
JSJOBN, /* Jobname */
JSWSN, /* Workstation name */
JSST, /* Status */
JSUPDT, /* Last updating function */
JSLDATE, /* Last updated date */
JSLTIME, /* Last updated time */
JSLUSER, /* Userid of last updater */
JSVERS, /* Record version number = 1 */
JSLINES, /* Number of text rows */
/* JST, /* JCL text rows */
JSJFROM) /* Jcl from js repository (Y/N) */
/*--------------------------------------------------------------------+
| SEGMENT=JST - Job control language text |
280 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
| (derived from the JST field in JSCOM) |
+--------------------------------------------------------------------*/
OUTPUT JST DATA(=) LOADER(=)
KEYS(JSCOM.JSADID, /* Application id */
JSCOM.JSIA, /* Input arrival yymmddhhmm */
JSCOM.JSOPNO, /* Operation number */
JSTSEQ) /* JCL row number */
/*--------------------------------------------------------------------+
| RECORD=JLCOM - Job log |
+--------------------------------------------------------------------*/
/*--------------------------------------------------------------------+
| SEGMENT=JLCOM - Common |
+--------------------------------------------------------------------*/
OUTPUT JLCOM DATA(OUTDATA)
KEYS(JLADID, /* Application id */
JLIA, /* Input arrival yymmddhhmm */
JLOPNO) /* Operation number */
/*--------------------------------------------------------------------+
| SEGMENT=JLT - Job Log Text (derived from segment JLTXT) |
+--------------------------------------------------------------------*/
OUTPUT JLT DATA(OUTDATA)
KEYS(JLCOM.JLADID, /* Application id */
JLCOM.JLIA, /* Input arrival yymmddhhmm */
JLCOM.JLOPNO, /* Operation number */
JLTSEQ) /* Line number of SYSOUT */
/*--------------------------------------------------------------------+
| GROUP=LTP - All Long Term Plan Objects |
+--------------------------------------------------------------------*/
/*--------------------------------------------------------------------+
| RECORD=LTOC - Long term plan occurrence |
+--------------------------------------------------------------------*/
/*--------------------------------------------------------------------+
| SEGMENT=LTOCCOM - Common |
+--------------------------------------------------------------------*/
OUTPUT LTOCCOM DATA(OUTDATA)
KEYS(LTOCIAD, /* Input arrival date */
LTOCADI, /* Application id */
LTOCIAT) /* Input arrival time */
/*--------------------------------------------------------------------+
| SEGMENT=LTOP - Operation |
+--------------------------------------------------------------------*/
OUTPUT LTOP DATA(=)
KEYS(LTOCCOM.LTOCIAD, /* Input arrival date */
LTOCCOM.LTOCADI, /* Application id */
LTOCCOM.LTOCIAT, /* Input arrival time */
LTOPNO) /* Operation number */
/*--------------------------------------------------------------------+
| SEGMENT=LTPRE - Predecessor |
+--------------------------------------------------------------------*/
OUTPUT LTPRE DATA(=)
KEYS(LTOCCOM.LTOCIAD, /* Input arrival date */
LTOCCOM.LTOCADI, /* Application id */
LTOCCOM.LTOCIAT, /* Input arrival time */
LTPREIAD, /* Run date yymmdd */
LTPREADI, /* Application id */
LTPREIAT) /* Input arrival time hhmm */
/*--------------------------------------------------------------------+
| SEGMENT=LTCPRE - Conditional predecessor |
+--------------------------------------------------------------------*/
OUTPUT LTCPRE DATA(=)
KEYS(LTOCCOM.LTOCIAD, /* Input arrival date */
LTOCCOM.LTOCADI, /* Application id */
LTOCCOM.LTOCIAT, /* Input arrival time */
LTCPREIAD, /* Run date yymmdd */
LTCPREADI, /* Application id */
LTCPREIAT) /* Input arrival time hhmm */
282 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
FIELDS(LTCPREDEL, /* Dependency deleted */
LTCPREPDONE, /* Predecessor completed */
LTCPREVERS) /* Version number=1 */
/*--------------------------------------------------------------------+
| SEGMENT=LTSUC - Successor |
+--------------------------------------------------------------------*/
OUTPUT LTSUC DATA(=)
KEYS(LTOCCOM.LTOCIAD, /* Input arrival date */
LTOCCOM.LTOCADI, /* Application id */
LTOCCOM.LTOCIAT, /* Input arrival time */
LTSUCIAD, /* Run date yymmdd */
LTSUCADI, /* Application id */
LTSUCIAT) /* Input arrival time hhmm */
/*--------------------------------------------------------------------+
| SEGMENT=LTCSUC - Conditional successor |
+--------------------------------------------------------------------*/
OUTPUT LTCSUC DATA(=)
KEYS(LTOCCOM.LTOCIAD, /* Input arrival date */
LTOCCOM.LTOCADI, /* Application id */
LTOCCOM.LTOCIAT, /* Input arrival time */
LTCSUCIAD, /* Run date yymmdd */
LTCSUCADI, /* Application id */
LTCSUCIAT) /* Input arrival time hhmm */
/*--------------------------------------------------------------------+
| GROUP=SYS - All System Objects |
+--------------------------------------------------------------------*/
/*--------------------------------------------------------------------+
| RECORD=XENV - Execution Environment |
+--------------------------------------------------------------------*/
/*--------------------------------------------------------------------+
| SEGMENT=XENV - Common |
+--------------------------------------------------------------------*/
OUTPUT XENV DATA(OUTDATA)
FIELDS(XENVFMID /* PIF Base FMID */
XENVCONLVL /* PIF connector level */
XENVFUNCLVL /* PIF functional level */
XENVDEFCAL /* Default calendar */
XENVCWBASE /* Base year for PIF dates */
XENVHIGHDATE /* Highest AD valid to date */
XENVADDBCS /* Application id in DBCS (Y/N/ ) */
XENVOWDBCS) /* Owner id in DBCS (Y/N/ ) */
One single level of a key is formed from the segment type followed by a hex 00
and then each key field separated by hex 00. Therefore, a single level of a key for
an application called MYAPPL with a status of Active that is valid until 31
December 2071 would have a single level key of ADCOM 00x MYAPPL 00x A 00x
711231.
A fully qualified key is a sequence of single keys separated by hex 01, to uniquely
identify a segment within an object within the database. Therefore, operation 010
within the previously described MYAPPL would be ADCOM 00x MYAPPL 00x A 00x
711231 01x ADOP 00x 010.
Reserved fields
Any areas of records marked as reserved in the PIF are also available to Workload
Automation Programming Language.
The field names for these fields are composed of RSVD and a 3 digit offset, for
example RSVD023 for ADCOM.
For more details about the program interface record formats, see IBM Workload
Scheduler Automation: Driving IBM Workload Scheduler for z/OS.
Composite fields
Some fields are composed from smaller fields. For example, ADOPWSINFO is
composed from ADOPWSISET, ADOPWSTYPE, ADOPWSREP, and ADOPWSSUBT.
Composite fields are listed in the EQQFLALL member, but are commented out.
These fields are listed in the EQQFLALL member, but are commented out.
284 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Appendix B. OPTIONS keywords
Use the following keywords with the OPTIONS statement.
Consistency checks involve looking in the application description data base for
matches for all the operator instructions in the application. Any operator
instruction without a match is deleted. The checks are made immediately after the
application description PIF action has completed with a zero return code.
Y Consistency checks are performed when an application description record
is deleted or replaced by using the PIF.
N Consistency checks are not performed (default).
However, with some code pages the at sign (@) character might be displayed
differently. The CHARAT keyword enables you to determine what character is
actually in use for your code page by issuing a SHOW OPTIONS command.
You can also set the character to be used, so that it matches the documented
character for the code page, for example OPTIONS CHARAT(@)
The characters you can use for these options cannot be standard upper or lower
case alphabetic characters, numbers, minus signs (-) or periods (.). They must not
be in conflict with any other CHARxxxx keywords or VARNAMES keyword.
Note: These OPTIONS keywords change only these character for the uses specified.
When the same characters are used as part of data in your system, or part of field
names in OUTPUT statements or object variables, the characters are displayed
according to your code page.
CHARBANG – Set the exclamation mark (!) for default variable prefix
Within Workload Automation Programming Language, the exclamation mark (!) is
used as the default variable prefix.
However, with some code pages the exclamation mark (!) character might be
displayed differently. The CHARBANG keyword enables you to determine what
character is actually in use for your code page by issuing a SHOW OPTIONS
command.
You can also set the character to be used, so that it matches the documented
character for the code page, for example OPTIONS CHARAT(!)
286 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
The characters you can use for these options cannot be standard upper or lower
case alphabetic characters, numbers, minus signs (-) or periods (.). They must not
be in conflict with any other CHARxxxx keywords or VARNAMES keyword.
Note: These OPTIONS keywords change only these character for the uses specified.
When the same characters are used as part of data in your system, or part of field
names in OUTPUT statements or object variables, the characters are displayed
according to your code page.
CHARHASH – Set the number sign (#) for count object field and
ENVATTR
Within Workload Automation Programming Language, the number sign (#) is used
to designate the count of the number of a specified segment in object variables and
a count within VARSET ENVATTR.
However, with some code pages the number sign (#) character might be displayed
differently. The CHARBANG keyword enables you to determine what character is
actually in use for your code page by issuing a SHOW OPTIONS command.
You can also set the character to be used, so that it matches the documented
character for the code page, for example OPTIONS CHARAT(#)
The characters you can use for these options cannot be standard upper or lower
case alphabetic characters, numbers, minus signs (-) or periods (.). They must not
be in conflict with any other CHARxxxx keywords or VARNAMES keyword.
Note: These OPTIONS keywords change only these character for the uses specified.
When the same characters are used as part of data in your system, or part of field
names in OUTPUT statements or object variables, the characters are displayed
according to your code page.
However, with some code pages the at sign (@) character might be displayed
differently. The CHARAT keyword enables you to determine what character is
actually in use for your code page by issuing a SHOW OPTIONS command.
You can also set the character to be used, so that it matches the documented
character for the code page, for example OPTIONS CHARAT(@)
The characters you can use for these options cannot be standard upper or lower
case alphabetic characters, numbers, minus signs (-) or periods (.). They must not
be in conflict with any other CHARxxxx keywords or VARNAMES keyword.
Note:
1. These OPTIONS keywords change only these character for the uses specified.
When the same characters are used as part of data in your system, or part of
field names in OUTPUT statements or object variables, the characters are
displayed according to your code page.
The value specified by commit is the maximum total across all output files.
Workload Automation Programming Language divides the commit total you enter
by the number of files opened and commit each file when that total is reached. For
example, if you specify COMMIT(1000) and have two output files, each file is
committed after 500 records.
The external data queue does not count as an output file and is not affected by
COMMIT, neither it influences the calculation.
COMPSUCC – Set the default values for the ADDJOB and JBSTART
commands
The COMPSUCC keyword of the ADDJOB and JBSTART commands determines what
action to take when a successor is identified as already complete.
Use SHOW OPTIONS to see the default values for this option.
The default is the name of the job currently running the command.
288 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
CONWAIT – Wait timing for response messages
Sets how long the CONSOLE command waits for a response message.
The option has 2 arguments. The first is how many seconds to wait for the first
message, the second is how many seconds to wait after the last message received,
before considering the command complete.
Use SHOW OPTIONS to see the default values for this option.
You can specify a third optional positional parameter if you are using an alternate
program to perform the delay. The third parameter can be used to specify the
delay period directly in the format supported by the alternate delay program.
For example, if the alternate delay program had a format of HHMMSSTT, a delay
of 1 minute, with 2 retries would be specified CONTENTION(60,2,00010000).
The first two arguments are still required for diagnostic messages.
OPTIONS DATE enables you to set a specific current DATE to use instead of the equal
sign (=) or any other function that requires the current date within Workload
Automation Programming Language.
The format of the date can either be ccyymmdd or yymmdd. If yymmdd is used, the
century is calculated by using IBM Workload Scheduler for z/OS HIGHDATE and
CWBASE settings.
You can also use OPTIONS DATE to set the internal Workload Automation
Programming Language date to be relative to the current date.
For example:
OPTIONS DATE(+1) sets the date that Workload Automation Programming Language
will use as current to tomorrow’s date.
OPTIONS DATE(-1) sets the date Workload Automation Programming Language will
use as current to yesterday’s date.
You can reset the internal Workload Automation Programming Language date and
time to the current date and time by using OPTIONS DATE(RESET).
290 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
DATA – ILSON data destination
File Destination (such as DD Name) to override value specified on the OUTPUT DATA
keyword.
OPTIONS DATA(-)
Note: OPTIONS DATA sets a DATA output destination for all segments referenced by
OUTPUT statements, regardless of whether they originally had a DATA keyword.
This keyword replaces OPTIONS ACTION to reduce confusion with the ACTION
keyword on Batch Loader statements. OPTIONS ACTION is still supported for
backwards compatibility with EQQYLTOP.
For more details, see Chapter 10, “Batch loader commands,” on page 165.
This is specifically to reduce the impact mass updates may have locking out other
users by providing gaps in processing. The command and return code are not
reported in the output until the delay has completed.
If you are using your own module to provide the WAIT functionality, you can
specify the delay as a second argument in the parameter format for your WAIT
module, such as DELAY(5,00000500). The first argument is still required for
messages.
Note: When OPTIONS DELETE(Y) is used together with OPTIONS SELECT(Y), the
automatically generated SELECT statements are processed before the DELETE
statements, allowing Batch Loader to be generated and saved for back out
processes.
where:
<predop>
An operation number, such as 001, to be used as a predecessor to both
sides of a dropped dependency, but only if <predop> is in a Complete
status. It does not add <predop>, if it does not already exist.
<succws>
Name of the workstation used to become a successor to both sides of the
dropped dependency. It must be a non-reporting general workstation.
<succjob>
Name of the job used to become a successor to both sides of the dropped
dependency. The default is ZRELINK
292 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
<succtext>
The operation description used if a successor operation is inserted. The
default is Relink dropped deps.
Setting this option determines how the duration against operations and the default
duration for workstations is managed.
Setting it to MINUTES means that the DURATION keyword on the ADOP and WSSTART
Batch Loader statements is output in minutes and is considered to be Minutes
when used as input. Setting it to SECONDS means that the DURATION keyword is
output and input in seconds (this is the default).
Setting the DURUNIT keyword will also set the PIF option DURSEC accordingly, to be
in line with the DURUNIT setting. There is no need to specify the PIF DURSEC option,
but if you do the Workload Automation Programming Language DURUNIT setting is
changed to the appropriate setting to match it.
Note: SECONDS is not the default for legacy tools BCIT (EQQYCAIN) and Batch
Loader (EQQYLTOP). If you are using Workload Automation Programming
Language together with these tools, you must consider the setting of DURUNIT based
on your usage of the legacy tools.
The DYNATTR keyword defines the TSO ALLOCATE attributes for the creation of the
file.
See the TSO Command Reference for details about the ALLOCATE command and
the attributes you can set. The FILE, DATASET, NEW, and REUSE keywords are already
set automatically and are not to be included in this keyword.
DYNLOG defines the prefix to use for creating the logs. It can be up to 18 characters.
For example, OPTIONS DYNLOG(MY.WAPLLOG) creates log files with the convention
MY.WAPLLOG.Dyymmdd.Thhmmssx.jjjjjjj
where:
yymmdd The current date.
hhmmss The time.
x Unique suffix, starting with A. If two jobs with the same name run within
the same second, the suffix is incremented.
jjjjjjjj
Name of the job.
Note:
| 1. DYNLOG cannot be used with the load module EQQWAPL.
2. All the messages related to the dynamic log are by default set to Advisory
severity. Failing to create or write to a dynamic log does not issue a non-zero
return code, because the processing performed by the job is not at risk. To
change this behavior, use the SETSEV command to modify the severity of
messages 306 and 308, which are related to failures in the dynamic log process.
294 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
references, any Period or Variable table referenced in a Run Cycle or
Rule, and any Operator Instruction, Workstation or Special Resource
referenced by an Operation.
v When an Event Trigger is SELECTed, it will LIST the Application it will
trigger, and the Special Resource if this is a Resource trigger.
v When a Period is SELECTed, it will LIST any Variable Table it may
reference.
v When a Workstation is SELECTed, it will LIST any Virtual Workstation
Destinations it may have.
FULL LISTs the items covered by YES but will also LIST extra items not required
to make the individual object work, but are referenced by it. The extra
items include:
v Applications referenced as external predecessors.
v Members of application groups.
When you use OPTIONS EXPAND, any SELECT statements generated by a LIST
statement with SELECT(Y) contains also a SELECT(Y) keyword. This means that any
items identified by the LIST statement for the EXPAND generate a SELECT request.
Using automatic EXPAND and SELECT together can result in Batch Loader being
generated for all related objects.
Note:
1. Applications LISTed by the EXPAND option use the keyword VALID(=) only to
LIST the versions valid on the running day. The DATE option can be used to
influence this.
2. When OPTIONS EXPAND(YES|FULL) is set, DUPAUTO(NO) is also automatically set.
Note: OPTIONS FAIL overrides any return codes from commands, including SETMAX,
but is overridden if OPTIONS SPOOF is coded.
For safe parsing of your data, ensure that you use a value that is not contained in
any data extracted (default is 00x).
Note: If you want to use EXIT or the EQQYXFLD function, ensure you do not use the
same value for FIELDSEP (default 00x) and LABELSEP (default =). NONE must not be
used. If this occurs, when an EXIT is called it is not used and EXIT is reset to
blank.
FIRST(<operation>[,LINK][,ALL])
where:
<operation>
The number of the operation to be considered the logical start point of the
application.
LINK Instructs Workload Automation Programming Language to create an
automatic ADDEP statement to link to the first operation for any operation
without a predecessor.
296 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
ALL Together with LINK, instructs Workload Automation Programming
Language to create automatic ADDEP statements to link to the first operation
for all operations, including those with predecessors.
Note:
1. ALL takes effect only if LINK is also specified.
2. LINK cannot be used in together with DBMODE(COPY) or DBMODE(UPDATE).
Anything up to this return code does not affect the highest return code of the job.
Available values are 0, 4 or 8 (default is 0).
Note: Any return codes you set before the HIGHRC option is processed, affects the
job highest return code.
IFJCL – Default step to consider for JCL step return code checking
The @JCL tag is used to check the return code of a previous JCL step in the current
job. If the command label is not specified, the default command to check is
determined by this OPTIONS keyword.
LAST_RC
Refers to the immediately preceding step.
Appendix B. OPTIONS keywords 297
LAST_XRC
Refers to the last step that was run and was not flushed. This is the
default.
MAX_RC Refers to the step that issued the maximum return code.
For the valid values, see “ADDJOB – Add job to the current plan” on page 146.
Levels 4 and 5 are not available for INCLUDE statements, because these levels are
reserved for internal Workload Automation Programming Language commands.
Note: This keyword is effective only if you specify it within EQQOPTS, the ARGS
symbolic parameter, or the argument when calling EQQYXTOP/EQQWAPL
directly.
298 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
JSFILE – DD name of input JCL for JSSTART
Used to set the input library for the JSSTART batch loader command. The default
value is EQQJSPDS.
You can set either a direct character reference, as in LABELSEP(=), or a hex value
either as a two byte notation, or two bytes suffixed with x, for example
FIELDSEP(01) or FIELDSEP(01x).
LAST(<operation>[,LINK][,ALL])
where:
<operation>
The number of the operation to be considered the logical end point of the
application.
LINK Instructs Workload Automation Programming Language to create an
automatic ADDEP statement to link to the last operation for any operation
without a successor.
ALL Together with LINK, instructs Workload Automation Programming
Language to create automatic ADDEP statements to link to the last operation
for all operations, including ones with successors.
Note:
1. ALL is effective only if LINK is also specified.
2. LINK cannot be used together with DBMODE(COPY) or DBMODE(UPDATE).
OPTIONS LOADER(-)
If no domain name is used in any email addresses, the value set in OPTIONS
MAILSERVER is automatically appended.
300 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
The special message levels are as follows:
-1 Lists only Fatal and Critical errors. When invoked with the SILENT
immediate option, it suppresses Workload Automation Programming
Language startup messages.
0 Lists only commands that did not complete successfully. Any command
that issues a return code higher than HIGHRC is considered to be
unsuccessful for this purpose. Startup and termination messages are
issued.
The OPID keyword must contain the application ID, occurrence input arrival, and
number of the operation with which you want to associate it, in the following
format:
APPL_ID YYMMDDHHMM NNN
For example:
S EQQYXJPX,ARGS='OPID(MYAPPL 1701241000 010)'
Regardless of this setting, you can still use masks in key fields to identify records.
Note: This works only when the Batch Loader statements refer to an individual
object. If wildcards are used in the batch loader key fields, or USELIST is used, the
command fails if the newly named object already exists. In these instances
additional Workload Automation Programming Language commands must first
delete the destination objects.
Use this option to manage calls to different versions of IBM Workload Scheduler
for z/OS from the same LPAR by providing specific versions of EQQYCOM for
each version.
302 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Note: If during the processing of the additional commands in the external data
queue, other commands are generated, they are also processed unless you reset the
POSTPROC option. This could lead to a looping condition.
When using PRSTART with either DATELIST or ADID, the list of calculated dates might
be empty within the range FROMDATE – TODATE. If the Period does not already have
interval dates, or is being replaced, an error condition is generated, because the
Period must have at least one interval.
OPTIONS RUNIF(<wsname>,<dropsr>,<droptime>)
where:
<wsname>
The default name of the workstation where to switch the workload. It must
be a general non-reporting workstation. If the workstation is not specified,
the RUNIF command fails.
For run cycle status within generated batch loader you can set the following
values:
ACTIVATE
Puts any run cycles that are Valid To LOWDATE back into effect with VALFROM
being the current Workload Automation Programming Language date and
VALTO being HIGHDATE (for example, 711231).
RETAIN Do nothing with run cycle VALFROM and VALTO values (default).
SUSPEND
Sets the VALFROM and VALTO values to LOWDATE (for example, 720101) for any
run cycles for which the Valid To date is set to the current Workload
Automation Programming Language date, or later.
Note:
1. If you SUSPEND a run cycle with a Valid To date set to a future date other than
HIGHDATE, this information is lost. When the application is later reinstated with
ACTIVATE, it uses HIGHDATE as the new Valid To date.
2. In the ISPF panels, the VALTO date is translated to an “Out of Effect” date. This
means that the date listed in the “Out Of Effect” column is actually one day
after the actual VALTO date (with the exception of HIGHDATE, which is listed the
same as VALTO as opposed to the day after). It is important to understand this
as a run cycle showing an “Out Of Effect” date in the panels of “today” will
actually have a VALTO date of “yesterday” and therefore not be affected by
RUNSTAT(SUSPEND).
304 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
SENDLOADER – Output Batch Loader
Whether to send Batch Loader information to files specified on the OUTPUT LOADER
keyword.
Y Writes data output (default).
N Does not write data output.
Note: If you suppress W or E, the return codes set by these types of messages are
also ignored.
Note: In some cases this can result in Batch Loader statements with no keywords
(for example, WSIVL). This is normal behaviour.
Note:
1. All the listed records match the LIST value, regardless of whether a FILTER is
being used.
2. OPTIONS SHOWKEYS causes every common segment to be processed as far as
extracting key fields, regardless of whether an OUTPUT statement is present for
that segment. In large volume jobs, this might affect run time therefore it is not
recommended to set OPTIONS SHOWKEYS in your site default member.
306 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Specifying only the SPE name corresponds to specifying =Y, for example
SPE(WLM,SA=N).
Note: This is not impacted by any response codes set with the LISTSTAT
command.
For example:
Note: Leading zeros are stripped only from fields that are defined as Signed or
Unsigned in the PIF record layouts. This is to stop leading zeros being removed
from character based numeric strings such as dates and times. Operation numbers
are also always left with leading zeros in place.
This keyword is effective only on OPTIONS statements contained within the OPTIONS
input stream.
From version 3.4 and later, instead of using OPTIONS SUBSYS you can code
subsystem specific statements at any point in the command stream, including
EQQOPTS.
For example:
<global settings>
IF @V(ZSUBSYS) = “TWSA” THEN DO
<controller settings>
END
You can prevent more than one message from being written to message log by
issuing multiple OPTIONS requests with the SUPMSG argument specified. The
argument to SUPMSG is formed by MSG followed by the message identifier. To
obtain the message identifier, remove the IBM Workload Scheduler for z/OS prefix
(EQQ) from the beginning of the message and the severity indicator from the end
of the message.
For example, to prevent message EQQW002E from being written to the message
log specify the argument value MSGW002.
For example, if you specify an output file in an OUTPUT statement that is not
allocated and then try to write to it, setting OPTIONS SUPMSG(MSGI103) prevents
Workload Automation Programming Language from issuing RC=4
308 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
When set to LEGACY, Workload Automation Programming Language applies the
following restrictions:
v Any input beyond column 72 is ignored, regardless of record length.
v Batch Loader keywords not supported by EQQYLTOP for the relevant release
are not generated.
v Alternative names for Batch Loader keywords are not output, but are accepted
as input.
By setting TAGMODE and the related TAGMASK OPTIONS, you can add a tag to the
description with information containing both the Day of the Week and the Day of
the Year. This allows a better understanding and verification of these dates when
viewing the related items.
Tagging occurs every time the DESCR keyword is set for one of these objects using
Batch Loader.
Note: If the length of the DESCR and the tag exceed the length of the field, the
tagged description is truncated when using PREFIX and SUFFIX and text can be
overwritten when using RIGHT.
For example, TAGMASK(’ (Ddd #)’) resolves to an output like the following:
’ (Mon 334)’
Note: Only one instance of Day of the Week and Day of the Year is replaced in
each mask.
OPTIONS TIME allows you to set an explicit current TIME to be used instead of the
equal sign (=) or any other function that requires the current time within Workload
Automation Programming Language.
You can also use OPTIONS TIME to set the internal Workload Automation
Programming Language date to be relative to the current date.
310 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
For example, OPTIONS DATE(+60) sets the time that Workload Automation
Programming Language will use as 60 minutes ahead of its current setting.
OPTIONS DATE(-5) sets the date that Workload Automation Programming Language
will use as 5 minutes behind its current setting.
Note: If the addition or subtraction crosses a day boundary, the internal date is
also changed.
You can reset the internal Workload Automation Programming Languagedate and
time to the current date and time by using OPTIONS TIME(RESET).
All TRACE messages are easily identifiable by >> at the beginning of the message
text.
where:
subsys Name of the controller
sysid Identifier for the LPAR as designated by OPTIONS SYSID.
tracker
Name of the tracker.
If you set sysid to an asterisk (*), the default tracker name for the controller is
used.
The following example defines the scenario that all trackers for IBM Workload
Scheduler for z/OS subsystem TWSA are called TRKA, unless they are running on
SYS1 or SYSQ in which case they are TRK1 and TRK2, respectively.
OPTIONS TRACKERS(TWSA.*.TRKA,TWSA.SYS1.TRK1,TWSA.SYSQ.TRK2)
Extra characters can be added to this using the VARNAMES keyword. The default
additional characters are pound sign (£) and dollar sign ($).
312 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
F The workstation fields are verified against the workstation description file.
Each workstation field in the resource description must match at least one
of the workstation descriptions.
Y Same as for F, except that the workstation value is accepted if the resource
description already has this workstation name. It could be an update
without any change to the workstation names.
Note: Not all the variables provided by IBM Workload Scheduler for z/OS are
available within Workload Automation Programming Language.
Note:
1. A job submitted outside of IBM Workload Scheduler for z/OS, but tracked by
it, is considered to be controlled by IBM Workload Scheduler for z/OS.
316 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Table 154. Occurrence level variables (continued)
Name Description
OETJOBN The complete job name that triggered the ETT event:
Event type J
Contains the job name of the triggering job.
Event type R
Contains the job name or TSO user ID that
closed the ETT data set trigger.
Note: This variable can be used only by the ETT added
occurrence.
OETTYPE Event type of the ETT table entry (J=Job, R=Resource).
Note: This variable can be used only by the ETT added
occurrence.
OGRPDEF Application group ID.
OHH Occurrence input arrival hour in HH format.
OHHMM Occurrence input arrival hour and minute in HHMM
format.
OIA Input arrival (YYMMDDHHMM).
OIAA Actual Input Arrival (YYMMDDHHMM).
OIAO Original Input Arrival from LTP (YYMMDDHHMM).
OJCLVTAB JCL Variable table attached to occurrence.
OLATE Latest Out passed (Y|N).
OMM Occurrence input arrival month in MM format.
OMMYY Occurrence input arrival month and year in MMYY
format.
OMONITOR Occurrence monitor flag.
OPRI Occurrence priority.
OYMD1 Occurrence input arrival date in YYMMDD format.
OYMD2 Occurrence input arrival date in YY/MM/DD format.
OYY Occurrence input arrival year in YY format.
OYYMM Occurrence input arrival month within year in YYMM
format.
Current variables
The current variables represent the current date and time.
Table 156. Current variables
Name Description
CDAY Current day of the week; 1 corresponds to Monday, 7 corresponds
to Sunday.
CDD Current day of month in DD format.
CDDD Day number in the current year.
CDDMMYY Current date in DDMMYY format.
CHH Current time in HH format.
CHHMM Current hour and minute in HHMM format.
CHHMMSS Current hour, minute, and second in HHMMSS format.
CHHMMSSX Current hour, minute, second, and hundredths ofseconds in
HHMMSSXX format.
CMM Current month in MM format.
CMMYY Current month in MM format.
CYMD Current date in YYYYMMDD format.
CYY Current year in YY format.
CYYDDD Current Julian date in YYDDD format.
CYYMM Current month within year in YYMM format.
CYYMMDD Current date in YYMMDD format.
CYYYY Current year in YYYY format, for example, 1997.
CYYYYMM Current month within year in YYYYMM format.
318 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Subsystem variables
The subsystem variables provide information about the connected subsystem.
Table 157. Subsystem variables
Name Description
ZFMID Software FMID for the connected subsystem.
ZHIDATE IBM Workload Scheduler for z/OS high date in the format
YYMMDD.
ZLODATE IBM Workload Scheduler for z/OS low date in the format
YYMMDD.
ZSUBSYS Subsystem name.
ZVER Version in the format VVRM (Version, Release, Modification
level).
ZVERSION Version V.R.M or V.R if no Mod (Version, Release,
Modification level).
Note:
1. WAPLEXEC programs are designed to provide their own OUTPUT statements
within the code, therefore the EQQFILE DD statement must always point to
member FILENONE for WAPLEXECs.
Function
You can use both Workload Automation Programming Language and BCIT to
unload large portions of the database into Batch Loader form. This is often done
for backup purposes when you want to easily be able to restore individual items
from the backup. However, for very large backups it can be difficult to extract
individual items from the text file, especially when the file becomes larger than
your TSO region allows for editing or viewing.
The EQQWXBLX command allows you to extract individual items from the large
text file into a separate text file for processing.
Process control
Process control statements for EQQWXBLX are coded within the SYSIN file.
Individual keywords are used to identify each item you want to extract. You can
extract multiple items of differing types within the same run. Wildcards are not
supported.
322 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
WSNAME(workstation-ID)
Specifies the workstation definition you want to extract from the backup.
The JCL for running the command must specify EQQWXBLX as the command and
pass the arguments in the ARGS symbolic parameter.
Note: When using EQQWXBLX, if multiple versions of a selected entry exist they
are all extracted.
Function
The EQQWXCSR program allows Special Resources to be updated in the current
plan.
You can specify a single resource or use wildcards to specify multiple resources.
The program searches for all matching resources that are not in the desired status
and issue SRSTAT commands to set them. This means that resources already in
the required status do not generate additional events.
If the desired availability and the default availability for a resource are the same,
by default the SRSTAT will RESET the availability to the default. If you specify
RESET(NO), the SRSTAT sest the override availability to the desired state.
Process control
| The program is controlled by keywords in the ARGS symbolic for the EQQYXJPX
| procedures. Alternatively, you can provide the keywords as SYSIN.
The JCL for running the command must specify EQQWXCSR as the command.
324 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
EQQWXCSV – Generate applications from a CSV file
Function
The EQQWXCSV program generates a primitive application, or suite of
applications, from a comma separated value (CSV) file.
The primitive application has simply the jobs and dependencies defined, with
some operations attributes set. They do not include run cycles, special resources, or
other features not directly contained in an operation record. You can use
EQQWXCSV to create the primitive applications, to which you can later add more
detailed features by using dialogs or other means.
The CSV file can contain jobs, dependencies, workstations, highest return code,
form definition, and duration. The code can easily be extended to include other
operation attributes, as required. The minimum content for the CSV file is a
column for the names of the jobs to run, and a column for dependencies.
The columns in the CSV file can be mapped to the relevant operation attributes
with the MAP keyword. This removes any requirement to format the CSV file to
meet the requirements of the program.
The program takes the entire content of the CSV file and creates a workflow for all
the operations, then breaks this into multiple applications if necessary, based on
your operation numbering POLICY. If only one application is created, the
application name is the same as the name specified in the control statements. If the
number of operations causes an application split, the application names are
suffixed with numbers. If the specified application name is already 16 characters
long, the suffix is overlayed over the last few characters.
Each generated Application has a START and END operation to tie unattached
dependencies to.
Dependencies made to jobs defined later in the list will still be made, so it is not
necessary to sort the CSV file into estimated execution order. The program
highlights dependencies to jobs not in the list as external predecessors, which will
be defined as being to an application called EXTERNAL_PRED, with the operation
number and workstation being the same as used for the END tie up operation.
These place holder dependencies will require manual amendment in the resulting
primitive application.
Multiple instances of the same job name can be used, any dependencies made to
multiple jobs will always be to the most recently specified in the list before the job
making the dependency.
If the dependencies would define a loop, all operations in the loop are reported
without generating an application.
Process control
The INPUTDEF file is used to control the translation of the CSV file into
Application Definitions.
Each keyword has the value specified within parenthesis and separated from the
next keyword by a space.
MAP(field,field,field)
Defines which columns of the CSV file relate to details within an
operation.
JOBN The job name you want to search.
PRED The predecessors, multiple predecessors must be contained within the
same “cell” separated by spaces.
FORM
The form number.
HIGHRC
The Highest Return Code.
WSID The Workstation.
DURATION
The estimated duration in seconds.
<period>
A period is used as a placeholder for columns that do not contain
information pertinent to the creation of the Application.
The following example shows the Job name being in column 2, highest
return code in 3, workstation in 4, form number in 5 and duration in 7:
MAP(.,JOBN,HIGHRC,WSID,FORM,.,DURATION)
POLICY(op<total,op<total,op)
Defines the Operation Interval policy. Each level of the POLICY defines the
operation number to use when the total number of operations in the
CSVFILE is less than a specified threshold, with a “catch all” interval at the
end.
The following example uses an interval of 10 for less than 26 operations,
and interval of 5 for less than 51 operations and an interval of 3 for
anything higher:
POLICY(10<26,5<51,3)
POLICY(5) simply sets the catch all at 5, meaning that the interval is 5
regardless of the number of operations in the CSVFILE.
SKIP(n)
Specifies the number of rows to skip at the beginning of the file before
starting processing, to account for header rows in spreadsheets that are
used to generate the CSV files. For example, SKIP(3) skips 3 rows and
start processing with row 4.
UPDATE(Y|N)
Specifies whether the generated Batch Loader is to update the IBM
Workload Scheduler for z/OS database (Y) or simply output the Batch
Loader to OUTBL (N).
ADID(application-name)
Defines the Application name to create. If the number of operations results
in more than one Application being generated, the names are suffixed with
326 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
a numeric count. If the Application name and the numeric suffix would
exceed 16 characters, the numeric suffix will overlay the end of the
application name.
For example, ADID(ABCDAILY) will create ABCDAILY if only one
application is needed, or ABCDAILY1, ABCDAILY2 etc if a split occurs.
<Batch-Loader-Token>(value)
Any Batch Loader tokens for ADOP (for details, see IBM Workload Scheduler
for z/OS: Managing the Workload) can be used to set defaults for the mapped
columns that have no values. For example, FORM(DD0001) creates a
default value of DD0001 for any operation that does not have a value in
the mapped column for form number.
They can also be used to create lookup tables to translate input values by
suffixing the keyword name with a hyphen and a lookup value, with the
replacement value being specified within parenthesis. In the following
example, you use DD0001 as the form number for any column that
contains MY.FIRST.JCLLIB and DD0002 for any column that contains
MY.SECOND.JCLLIB:
FORM-MY.FIRST.JCLLIB(DD0001)
FORM-MY.SECOND.JCLLIB(DD0002)
This technique can be used for any of the mapped columns.
The following keywords perform the same function as their Batch Loader
equivalents in the resulting application:
v DESCR(text)
v OWNER(owner_ID)
v ODESCR(text)
v PRIORITY(n)
v ADVALFROM(yymmdd)
v STATUS(A|P)
v GROUP(authority_group)
v CALENDAR(calendar_ID)
v ADGROUPID(application_group)
v DLIMFDBCK(deadline_limit_for_feedback)
v DSMOOTHING(deadline_smoothing)
The following keywords define the operation number, workstation and job name of
the first and last operations generated in the application to tie up dependencies:
v FIRST(op_num)
v FIRSTWS(ws_id)
v FIRSTJOB(jobname)
v LAST(op_num)
v LASTWS(ws_id)
v LASTJOB(jobname)
| The JCL for running the command must specify EQQWXCSV as the command.
|
Function
The EQQWXHTM program produces an HTML representation of a calendar. The
calendar can be a simple calendar for the year with no scheduling information, or
it can contain highlighted dates extracted from IBM Workload Scheduler for z/OS,
such as calendar free days and run dates.
All dates will have the Julian date available as a Tooltip when the mouse is
hovered over the date. If the day is normally a free day, the julian day is appended
with -F. Any date based free days must be set by the PROCESS keyword and will
contain their description in the Tooltip, but no -F. Any other specific dates can also
contain Tooltip text to explain why they have been highlighted.
If multiple events coincide on the same date, for example Free days and named
dates, the date is shown in a box and the tooltip will contain text for all events on
that date.
328 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Titles, colors, free days, month, and day names can all be manipulated by
keywords.
Multiple lists of dates can be loaded into the calendar, each with their own color
coding and individual descriptions. Individual dates within the lists can also have
specific color coding.
The html file produced by this job can then either by transferred to a non-z/OS
platform for sending via email, sharing by Windows, Samba, or a web server, or it
could be sent directly from a mainframe SMTP server as an email attachment or
served by a mainframe based web server.
Process control
You are provided with many keywords to modify the presentation of the calendar,
by setting them either within the ARGS symbolic parameter or SYSIN.
Note: In MODE(MULTI) day of the week free days are set by this
keyword and not extracted from the calendar; only specific date free days
are extracted from the calendar.
HEAD(<BG-html-colour>[-<TEXT-html-colour>])
Sets the background color, and optionally the text color, for the header that
contains the names of the days. If only one color is specified, it is
considered the background color. If two colors are specified, separated by a
minus sign (-), the first is the background color and the second is the text
color.
The default is HEAD(blue-white).
HILITE(<BG-html-colour>[-<TEXT-html-colour>])
Sets the background color, and optionally the text color, for any
highlighted cells whose color is not specified by other means. If only one
color is specified, it is considered the background color. If two colors are
specified, separated by a minus sign (-), the first is the background color
and the second is the text color.
The default is HILITE(gray-yellow).
INAD(<DD-Name>)<only with MODE(MULTI)>
The DD name of the input file that instructs EQQWXHTM about the
applications for which to generate calendars. The default value is INAD.
The format of the file is for each application to process: application
name,calendar or blank,description,
Any data after the final comma is ignored.
INCL(<DD-Name>)
The DD name of the input file that holds specific free dates from calendars.
The default value is INCL.
The format of the file is for each specified date in each calendar: calendar
name,date in format YYMMDD,date description,
Any data after the final comma is ignored. The INCL file is read only if
CALENDAR is specified.
INLTP(<DD-Name>)<only with MODE(MULTI)>
The DD name of the input file that holds run information for applications.
The default value is INTLP.
The format of the file is for each specified date in each calendar: IA date
in format YYMMDD,AD name,
Any data after the final comma is ignored.
MODE(SINGLE|MULTI)
Determines whether to create a single HTML calendar or produce one
calendar for each application listed in the INAD file.
MONTHS(<month-list>)
The block headers for each month. If you enter less than 12 words, the
remaining block headers are blank. If you enter more than 12 words, the
extra words are ignored.
330 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
The default is MONTHS(JAN FEB MAR APR MAY JUN JUL AUG SEP
OCT NOV DEC).
OUTFTP(<DD-Name>) <only with MODE(MULTI)>
The DD name of the FTP output file. This file contains FTP get statements
to allow the PDS members to be translated into html files named after the
application. If OUTFTP is not specified, no FTP statements are generated.
The default value is OUTFTP(OUTFTP).
OUTHTML(<DD-Name>)
The DD name of the HTML output file. This file contains the HTML
calendar definitions.
The default value is OUTHTML(OUTHTML).
PROCESS(<file-list>)
Specifies a list of files to be processed to add specific list of dates to the
calendar. The files must be fixed block text files with the first word being a
date in the format YYMMDD, optionally followed by a comma and the
text for the tooltip of this date. You can also specify the color properties for
the dates, by appending a html color codes to the list following ==.
For example, the keyword PROCESS(HOLS,RUNDATES==green-yellow)
first processes a file named HOLS setting the colors to be the values
specified by HILITE, then it processes a file named RUNDATES setting the
foreground color to green and the background color to yellow for the dates
in the list. If the same date is referred to in multiple lists, the tooltip
contains the text from each list in the order they were processed, the color
coding is set to the last reference to that date.
Individual dates within a file can be given their own color coding by
appending html color codes to the record in the file following ==.
The following example shows how to code the 25th and 26th of December
with specific colors:
//HOLS DD *
120406,Goede Vrijdag
120409,2E Passdag
120430,Koninginnedag
120517,Hemelvaart
120728,2E Pinksterdag
121225,1E Kerstdag==green-red
121226,2E Kerstdag==green-red
The default is blank, meaning that no files are processed.
ROW1(<BG-html-colour>) ROW2(<BG-html-colour>)
The ROW1 and ROW2 keywords set the background for each alternate
row of each month, to make the calendar easier to read.
The default is ROW1(#FFFFCC) ROW2(#99CCCC).
RUN(<BG-html-colour>[-<TEXT-html-colour>]) <only with MODE(MULTI)>
Sets the background and optionally the text color for the run dates of
applications in MODE(MULTI). If only one color is specified, it is
considered the background color. If two colors are specified, separated by a
minus sign (-), the first is the background color and the second is the text
color.
The default is RUN(green-white).
TEXT(<TEXT-html-colour>)
Sets the default text color for dates within the calendar. This value can be
Note:
1. Many of these keywords enable you to specify html colors. You can use both
color names (such as gray, blue, red) and RGB color codes (such as #99CCCC).
Because the different browsers support a vast range of colors, the contents of
the color keywords are not validated. Ensure the you set colors supported by
the browser that you will be using to view the calendar. Any colors not
supported by the browser are ignored when the calendar is browsed. Many
browsers are case sensitive, therefore the SYSIN for EQQWXHTM must be in
mixed case.
2. In most keywords, you can separate lists with a space or comma.
332 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
| Table 161. DD statements for EQQWXHTM (continued)
| DD Name Purpose Attributes
| <input> Input files are specified in the Can be an input data set or
| PROCESS keyword. HTML can SYSIN. Typically FB 80.
| process more than one input Note:
|| file in a single run. Each record 1. The length of explanatory
|| must begin with a date and can text has a bearing on the
|| optionally contain explanatory record length for the output
|| text for that date in the file (see above).
| following format:
| 2. You cannot use quotes in
|| YYMMDD,explanatory the explanatory text.
| text
| The JCL for running the command must specify EQQWXHTM as the command in
| the CMD symbolic parameter.
| The following example shows how to produce a calendar with regular free days,
| date based free days, and run dates. Though shown as SYSIN in this example, they
| would more likely be output files from other Workload Automation Programming
| Language jobs (HTMLXMPL).
|
The following example shows a sample job for creating public holidays in the
calendar for the forthcoming year (CALNL).
You can then export the calendar dates into a flat file by running a job similar to
the following:
The flat file will contain all the dates contained within the calendar, for as many
years as the calendar covers. You can use it with the EQQWXHTM WAPLEXEC to
extract specific years and produce the HTML versions. Because the input file
contains dates for 2 years, you can run 2 steps which can each concentrate on an
individual year by use of the YEAR keyword.
The following example shows a sample job for exporting calendar dates into a flat
file (CALUNLD).
334 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
//EXP2012 EXEC EQQYXJPX,
// VER=V860,
// ARGS=’YEAR(2012)’,
// CMD=EQQWXHTM,
// SUBSYS=WSJC
//OUTHTML DD DISP=SHR,DSN=ADCDMST.CZ.JCL(CAL2012)
//CLSDDATE DD DISP=SHR,DSN=ADCDMST.CZ.JCL(CALDATES)
//SYSIN DD *
DAYS(M D W D V Z Z)
MONTHS(JANUARI FEBRUARI MAART APRIL MEI JUNI
JULI AUGUSTUS SEPTEMBER OKTOBER NOVEMBER DECEMBER)
PROCESS(CLSDDATE) HILITE(gray-yellow)
/*
//EXP2013 EXEC EQQYXJPX,
// VER=V860,
// ARGS=’YEAR(2013)’,
// CMD=EQQWXHTM,
// SUBSYS=WSJC
//OUTHTML DD DISP=SHR,DSN=ADCDMST.CZ.JCL(CAL2013)
//CLSDDATE DD DISP=SHR,DSN=ADCDMST.CZ.JCL(CALDATES)
//SYSIN DD *
DAYS(M D W D V Z Z)
MONTHS(JANUARI FEBRUARI MAART APRIL MEI JUNI
JULI AUGUSTUS SEPTEMBER OKTOBER NOVEMBER DECEMBER)
PROCESS(CLSDDATE) HILITE(gray-yellow)
You can then send the output file to review the dates for the forthcoming year, or
simply use it as a reference to view the free days.
The following example shows a sample job for exporting run dates into flat files
(RUNDATES):
The RUNDATES job finds the run dates for three separate applications across the
year. You can the use these files as input in the EQQWXHTM command to
combine the run dates with calendar information.
The following example shows a sample job for presenting run dates in a calendar
(RUNCAL):
Because each application was exported into a separate file, you can assign a
different color to each application, making it easier to spot each application that
runs on specific dates in a single calendar.
336 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Figure 3. Run dates for year 2015
Function
The EQQWXIAX program builds a list of external dependencies and shows the
input arrival times that are most likely to be used to resolve the dependency.
It is not definitive, because in some instances there could be multiple run cycles
involved, therefore time could vary depending on day. In these cases, the first run
cycle is used to source the input arrival time.
Details about predecessor details are on the left, details about the successors are on
the right. Each side has the following columns:
ADID Application ID
WSID Workstation name
OP# Operation number
JOBNAME
Job name
DY Input Arrival Day
TIME Input Arrival Time
SRC Where the Input Arrival time came from.
Process control
The EQQWXIAX program is controlled by keywords in the SCOPE DD statement.
The keywords are filter keywords to select the Applications to be used to form the
cross reference. The program is intended only for a small scope of cross referencing
and not intended for large full database cross referencing.
Each keyword has the value specified within parenthesis and is separated from the
next keyword by a space.
338 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
GROUPDEF
Application Group name
MONITOR(Y|N)
Application has monitored operations
OWNER
Owner ID
STATUS(A|P)
Status:
A Active (this is the default).
P Pending
VALID(yymmdd)
Date on which the application must be valid.
VALFROM(yymmdd)
Valid from date
VALTO(yymmdd)
Valid to date
Note: These keywords are the standard keywords for LIST ADCOM. You can use
wildcards and comparators. However, TYPE must not be used, because the
program needs to separately extract applications and groups.
The JCL for running the command must specify EQQWXIAX as the command.
Function
The EQQWXJBU program finds all the applications where the specified job is
defined, and performs the updates requested for the job with the Applications.
The updates can be anything performed by the Batch Loader keywords for the
ADOP statement.
Because the input could be a simple minor update to a single job, or many fields
to many jobs, EQQWXJBU works in one of the following modes:
ARG Mode
The ARGS symbolic is used to pass a single job to update and a few
arguments to perform updates.
Note: IBM Workload Scheduler for z/OS is not designed with Job Name as a key
field for the database, the EQQWXJBU function may help alleviate that, but the
process may be slow depending on the size of the database being searched.
Process control
@JOBN(jobname)
The job you want to update. You can then use the JOBN keyword to
change it.
This is an ARG mode keyword.
@WSID(workstation)
Specifies the workstation where the job you want to update must be
defined. You can then use the WSID keyword to change it.
This is an ARG mode keyword.
@ADSTAT(A|P)
Restricts the search to the applications with status A or P. Though the
@ADSTAT keyword is specified only in the argument, it also applies to all
jobs included for searching within the CSVFILE.
@VALID(yymmdd)
Restricts the search to the applications that are valid on the specified date.
Though the @VALID keyword is specified only in the argument, it also
applies to all jobs included for searching within the CSVFILE.
@VALFROM(yymmdd)
Restricts the search to the applications by the Valid-From date. Though the
@VALFROM keyword is specified only in the argument, it also applies to
all jobs included for searching within the CSVFILE.
@VALTO(yymmdd)
Restricts the search to the applications by the Valid-To date. Though the
@VALTO keyword is specified only in the argument, it also applies to all
jobs included for searching within the CSVFILE.
MAP(field,field,field)
Defines which columns of the CSV file relate to details within an
operation. The MAP can be either the number of the row in the CSV file
that contains the field name for each column in the relevant column, or a
sequence of comma separated field names.
You can specify the following field names:
@JOBN
The field that specifies the job name to identify the operation to
update. There must be a column mapped to @JOBN. You can use
JOBN without the at sign (@) to map to a new job name to update
the selected row to.
@WSID
The field that specifies the workstation where the job to be
updated must already exist (optional). You can use WSID without
the at sign (@) to map to a new workstation name to update the
selected row to.
340 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
<loader argument>
You can use any valid Batch Loader argument for the ADOP statement as
a mapping field, except PREOPNO, PREJOBN, and PREWSID. For more
details about ADOP, see IBM Workload Scheduler for z/OS: Managing the
Workload.
<period>
A period (.) is used as a placeholder for columns that do not contain
information pertinent to the creation of the Application.
For example, specify MAP(.,@JOBN,HIGHRC,WSID,FORM,.,DURATION)
to have the Job name in column 2, highest return code in column 3,
workstation in column 4, form number in column 5, and duration in
column 7.
Specify MAP(1) to point to row 1 of the CSV file; each cell in this row will
contain the name of the field represented by that column.
This is a MAP mode keyword.
SKIP(n)
Specifies the number of rows to skip at the beginning of the file before
starting processing, to account for header rows in spreadsheets that are
used to generate the CSV files. For example, SKIP(3) skips 3 rows and
starts processing with row 4.
If you are using a MAP row within the CSV file, you must use the SKIP
keyword to avoid that row.
This is a MAP mode keyword.
PRED(job job)
Contains list of job names, separated by a space, to make as a predecessor
to the job. If the job is found inside the same application as the @JOBN
job, only an internal predecessor is made, regardless of whether the job is
found in more applications.
If the predecessor needs to be restricted to a job on a particular
workstation, use the format job/workstation to specify each predecessor.
The Status and Validity of the application are restricted to the same as the
job to which the predecessor is being added.
For example, PRED(ABC123 XYZ789) makes any instance of these jobs
predecessors.
PRED(DEF456/C* GHI321) makes only instances of job DEF456 on a
workstation beginning with C a predecessor, but all instances of job
GHI321.
| The JCL for running the command must specify EQQWXJBU as the command and
| pass the arguments in the ARGS symbolic parameter.
|
Function
When the current plan is extended, an application might start immediately if the
external predecessors did not resolve correctly and there are no time dependent or
manual operations within the application. The EQQWXNOE function provides you
with a safety net to help avoid some of these sort of “escapee” applications
running when they were not expected.
The premise of the function is that you run the job immediately before the current
plan extend job, telling it how long an extension is about to be made to the plan;
the EQQWXNOE function will identify any occurrences that could run
immediately when the current plan is extended. In this case, EQQWXNOE fails
with RC=8 causing the current plan extend to be delayed until it can be
investigated and corrected.
342 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Note: Even with this check in place, some operations might start early, that are not
“behind” the external predecessor, time dependency or manual operation, but at
least part of the application will be held by at least one of these elements.
EQQWXNOE will identify only occurrences that have no delaying factors at all.
Process control
The ARGS symbolic is used to control the EQQWXNOE function.
The JCL for running the command must specify EQQWXNOE as the command.
In the following example, the plan is being extended 24 hours and MAN1 is a
manual workstation:
Function
The EQQWXPER program generates a series of dependent variables to enable JCL
to determine the week number within an interval of an IBM Workload Scheduler
for z/OS non-cyclic period.
The process reads the specified IBM Workload Scheduler for z/OS period and
generates dependent variables for each week within each interval. Whatever day
an interval starts on, it is day 1 of the week and each new week starts in a further
7 days.
Each week variable defaults to N, and then only on specified dates it is set to Y.
The dates can be made dependent on any of the following IBM Workload
Scheduler for z/OS variables:
v ODMY1
v ODMY2
v OYMD1
v OYMD2
v OYYDDD
Process control
The EQQWXPER program is controlled by keywords either in the ARGS symbolic
for the EQQYXJPX procedure, or within SYSIN. If the same keywords are entered
in both, the ARGS values overrides the SYSIN value.
Each keyword has the value specified within parenthesis and separated from the
next keyword by a space.
344 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
UPDATE
Whether to perform updates to the database (YES or NO). If set to NO
(this is the default), the process generates the Batch Loader for you to
review, without applying it.
VARPFX
The prefix to use for the variables created by this process. The default is
WKNUM.
For each week being generated, the variable is suffixed by the two
character week number, for example WKNUM01, WKNUM02, and so on.
| The JCL for running the command must specify EQQWXPER as the command.
| The following example shows how to create tables with the naming convention of
| MONTHVARSyymm containing variables WEEK#01, WEEK#02, WEEK#03,
| WEEK#04, WEEK#05, and WEEK#06. These week variables are dependent on the
| occurrence julian date.
| //RUNPIF EXEC EQQYXJPX,
| // CMD=EQQWXPER,
| // SUBSYS=TWSA
| //OUTBL DD SYSOUT=*
| //SYSIN DD *
| PERIOD(CYCLE) VARPFX(WEEK#) TABLE(MONTHVARS) DATEVAR(OYYDDD)
| OWNER(TWS) UPDATE(Y)
| You can then process it with JCL similar to the following example:
| //*%OPC SCAN
| //*%OPC TABLE NAME=MONTHVARS&OYYMM
| //* JULIAN DATE = &OYYDDD
| //*%OPC BEGIN ACTION=INCLUDE,COMP=(&WEEK#06..EQ.Y)
| //* THIS LINE OF JCL ONLY APPEARS ON WEEK 6
| //*%OPC END ACTION=INCLUDE
With the exception of a few Critical messages, all message text is provided in an
external file, therefore message text and severity can be customized to meet the
specific requirements of your site. However, you will have to repeat this
customization when you upgrade Workload Automation Programming Language.
Message Grouping
Within the Workload Automation Programming Language message log
(SYSTSPRT), messages are grouped by the command to which they belong.
A message group always starts with an EQQI200I message and ends with an
EQQI299I message. The 200I listing the command and the 299I indicating the
return code.
Messages automatically wrap to the width of the setting for OPTIONS REPORT
(default 80). Continuation lines do not show the date and time, and the message
ID is prefixed with ...
Batch Loader requests are listed in a different way. The primary command (for
example, ADSTART, ETTSTART) is listed on EQQI200I message, but any sub segment
commands are listed on EQQI203I messages. For example:
07/08 15.05.41 EQQI200I ADSTART ADID(FRED) OWNER(FREDDY)
...EQQI203I ADOP OPNO(1) WSID(DUMM) JOBN(START) DURATION(1)
...EQQI203I DESCR(’First operation’)
...EQQI203I ADOP OPNO(005) WSID(CPU1) JOBN(JOBA) DURATION(1)
...EQQI203I FORM(DD0001)
...EQQI203I ADDEP PREOPNO(1) PREJOBN(START) PREWSID(DUMM)
...EQQI203I ADOP OPNO(010) WSID(CPU1) JOBN(JOBQ) DURATION(1)
...EQQI203I FORM(DD0001)
...EQQI203I ADDEP PREOPNO(1) PREJOBN(START) PREWSID(DUMM)
...EQQI203I ADOP OPNO(015) WSID(DUMM) JOBN(JOBB) DURATION(1)
...EQQI203I HIGHRC(4) FORM(DD0002)
...EQQI203I ADDEP PREOPNO(005) PREJOBN(JOBA) PREWSID(CPU1)
...EQQI203I ADOP OPNO(020) WSID(CPU1) JOBN(JOBC) DURATION(1)
...EQQI203I FORM(DD0001)
...EQQI203I ADDEP PREOPNO(005) PREJOBN(JOBA) PREWSID(CPU1)
...EQQI203I ADDEP PREOPNO(010) PREJOBN(JOBQ) PREWSID(CPU1)
...EQQI203I ADOP OPNO(025) WSID(CPU1) JOBN(JOBD) DURATION(1)
...EQQI203I FORM(DD0001)
...EQQI203I ADDEP PREOPNO(015) PREJOBN(JOBB) PREWSID(DUMM)
...EQQI203I ADDEP PREOPNO(020) PREJOBN(JOBC) PREWSID(CPU1)
...EQQI203I ADOP OPNO(255) WSID(DUMM) JOBN(END) DURATION(1)
...EQQI203I DESCR(’Last operation’)
...EQQI203I ADDEP PREOPNO(025) PREJOBN(JOBD) PREWSID(CPU1)
07/08 15.05.43 EQQI112I Processing Application ADID(FRED) STATUS(A)
348 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
EQQI002A • EQQI008A/W
...EQQI112I VALTO(711231)
07/08 15.05.44 EQQI116I REPLACE for Application ADID(FRED) ADSTAT(A)
...EQQI116I ADVALFROM(080708) ADTYPE(A) completed
07/08 15.05.44 EQQI299I Statement completed - RC=0
Messages
System action: Reference data is loaded in accordance User response: Determine if this is expected. If
with the IBM Workload Scheduler for z/OS version necessary correct the exit and rerun.
and applied Small Product Enhancements.
User response: None. EQQI007A Message <message-ID> changed from
<severity> to <severity>
EQQI004E Parent statement <parent> missing for Explanation: The severity of a Workload Automation
<segment> Programming Language message has been redefined.
Explanation: An attempt has been made to use a System action: Any actions that may issue that
segment with a required parent statement missing. message will set a return code in accordance with the
new severity.
System action: The command is not run.
User response: None.
User response: Specify the missing parent statement
and run the command again.
EQQI008A/W <segment> not supported for OUTPUT
in version <version> of IBM Workload
EQQI005A Segment <name> is not handled by Scheduler for z/OS
Workload Automation Programming
Language Explanation: An OUTPUT statement has referred to a
segment name that is not valid for the version of IBM
Explanation: A segment has been encountered in the Workload Scheduler for z/OS that Workload
PIF header that is currently not defined to Workload Automation Programming Language is currently set to
Automation Programming Language. use.
System action: Workload Automation Programming System action: The OUTPUT statement is ignored and
Language will skip the segment and continue processing continues.
processing from the next segment.
User response: If you are using any of the supplied
User response: Ensure you are running with the latest FILESPEC members (for example, EQQFLALL), this
release of Workload Automation Programming could simply mean you are using a version of IBM
Language. Workload Scheduler for z/OS earlier than the latest
release, or without all of the available Small Product
Note: While Workload Automation Programming Enhancements loaded. If this is the case this message
Language is in Early Release status, this message is can be safely ignored.
severity A, as it is likely the current release of
If this is your own OUTPUT statement causing the
Workload Automation Programming Language will not
350 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
EQQI018A • EQQI033A
EQQI020F Table <table> not found EQQI028F Variable <name> has not been assigned
to a table
Explanation: A reference has been made to a JCL
variable table that does not exist. Explanation: A VARSET SAVE command was issued for
a variable that is not connected with any JCL variable
System action: The command fails and Workload
table.
Automation Programming Language stops processing
further commands. System action: The command will fail and Workload
Automation Programming Language stops processing
User response: Correct the table name or create the
further commands.
table.
User response: Correct the variable name or assign to
a TABLE.
EQQI021A Table <name> loaded
Explanation: A JCL variable table has been opened
EQQI032A Date <variable-name> adjusted by
and the values from it loaded at this point.
<amount>
System action: Any variables referenced from within
Explanation: A VARDATE command has been issued to
that table will use the values as they were at the point
create a date variable and the rule landed on a
it is loaded, unless the values were changed by this
weekend date with the RULE keyword not set to ON.
Workload Automation Programming Language job.
System action: Workload Automation Programming
User response: None.
Language will adjust the date in response to the rule
and list the positive or negative number of days that it
EQQI022A Search sequence <list of tables> was adjusted by.
Explanation: A command has been issued that either User response: None.
opens or closes a JCL variable table, or otherwise alters
the search sequence.
EQQI033A Date <variable-name> set to <value>
System action: This message lists the order that tables
Explanation: A VARDATE or VARSET command has been
will be searched to find an unloaded variable value.
issued to a variable.
User response: None.
System action: For VARDATE, Workload Automation
Programming Language will list the variable name, the
EQQI023E Dependent variable loop (1) date in format yymmdd, or the user specified format if
FORMAT is coded. This will be followed by the day of
Explanation: A dependent variable has been
the week the date falls upon to ease validation of the
referenced that refers to a chain of dependent variables
results. For VARSET only the variable name and value
that lead back to it.
will be shown.
System action: The command will fail.
User response: None.
352 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
EQQI095F • EQQI101F
354 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
EQQI117W • EQQI128E
EQQI129E Unable to retrieve <type> <key EQQI136F File <ddname> not allocated
information> from database
Explanation: A command has been issued referring to
Explanation: An attempt to SELECT a record from the a dd name that does not exist in the step.
database has failed.
System action: The command fails and Workload
System action: The record is not retrieved. Automation Programming Language stops processing
further command.
User response: Additional messages may indicate
why the failure occurred. It may be that the object does User response: Correct the DD name in the command
not exist in the database. If the SELECT was generated or add the DD statement to the step.
as a result of a LIST statement it is possible that the
object was deleted by another user between the LIST
EQQI137F File <ddname> not available for input
and SELECT.
processing
Explanation: A command has been issued referring to
EQQI0131F Unexpected data format for <segment>
a dd name that is not considered to be an input file, for
<field>
example, a SYSOUT file.
Explanation: Workload Automation Programming
System action: The command fails and Workload
Language has encountered a field when reading a
Automation Programming Language stops processing
record that does not match the expected format as
further command.
defined in the Workload Automation Programming
Language data mapping. User response: Correct the DD name in the command
or correct the DD statement in the JCL.
System action: Subsequent EQQI0132A messages will
be issued with diagnostic information. A mini dump of
the segment will be displayed. The command fails and EQQI139F All data sets in <ddname> must be
Workload Automation Programming Language stops cataloged for search
processing further commands.
Explanation: An INCLUDE command has been issued
User response: Check that you are instructing referring to a member within a dd name that contains
Workload Automation Programming Language to run one or more partitioned data sets that are not
for the correct version of Workload Automation catalogued. To perform a concatenation search
Programming Language and you have the correct Workload Automation Programming Language requires
OPTIONS SPE settings for that subsystem. all of the data sets to be catalogued.
System action: The command fails and Workload
EQQI134E User field "<name>" not defined for this Automation Programming Language stops processing
job further command.
Explanation: A VARSET USRF command has been User response: Either ensure all of the data sets are
issued with MISSING(ERROR) and the named user field catalogued, or allocate the specific member explicitly in
was not defiled to the operation. the JCL and INCLUDE from that explicit DD statement
without specifying a member name.
System action: The command fails.
User response: Correct the user field name or define
EQQI140F Member <name> not found in
the user field to the operation.
<ddname>
Explanation: An INCLUDE command has been issued
EQQI135F User field "<name>" not defined for this
referring to a member in a dd name that does not
job
contain any datasets in which the named member
Explanation: A VARSET USRF command has been exists.
issued with MISSING(FAIL) and the named user field
System action: The command fails and Workload
was not defiled to the operation.
Automation Programming Language stops processing
System action: The command fails and Workload further command.
Automation Programming Language stops processing
User response: Correct the DD name in the INCLUDE
further commands.
statements or correct the DD statement in the step to
User response: Correct the user field name or define include a library containing the specified member.
the user field to the operation.
356 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
EQQI141F • EQQI155W
EQQI143E Cannot rename an item that does not EQQI150W No matching run cycles found within
exist <application>
Explanation: Batch loader has been specified with Explanation: A PRSTART batch loader statement has
DBMODE UPDATE or COPY that specifies new key names been executed that includes setting dates from an
using NEW_ fields, but the original key refers to an Application, or a GETDATES command extracting dates
object that does not exist. from an application has been run. There were not run
cycles within the application that matched either the
System action: The command will fail.
Input Arrival or validity criteria.
User response: Correct the batch loader key fields.
System action: Workload Automation Programming
Language will issue RC=4 and continue.
EQQI144W <UPDATE|COPY> will overwrite
User response: None.
existing record <key information>
Explanation: Batch loader has been specified with
EQQI152E An internal command failed – see
DBMODE UPDATE or COPY that specifies new key names
previous messages
using NEW_ fields. The new key points to an existing
record but OPTIONS OVERWRITE(Y) has been specified. Explanation: A command has been executed that
internally calls other Workload Automation
System action: The existing option will be
Programming Language commands and one of these
overwritten.
internal commands has failed.
User response: None.
System action: The reason for the failure will be listed
in the message group for the internal command, earlier
EQQI145E No user fields match <mask> in the Workload Automation Programming Language
log.
Explanation: An INCLUDE statement has been specified
that has a mask which does not match any user fields User response: Respond to the earlier error messages.
attached to the job.
System action: The command will fail. EQQI155W Application validity <date-range> is
outside range <date-range>
User response: Correct the mask, or user fields against
the operation. Explanation: A PRSTART batch loader statement has
been executed that includes setting dates from an
Application, or a GETDATES command extracting dates
EQQI146E Table <name> could not be updated
from an application has been run. The named
Explanation: A VARSAVE or SETVAR SAVE command was application is not in effect within the range specified by
issued, but Workload Automation Programming the FROMDATE and TODATE keywords.
Language was unable to update the table.
System action: Workload Automation Programming
System action: The command will fail, no updates Language will issue RC=4 and continue.
were performed to the named table.
User response: Determine if this is the correct
User response: Determine the reason for failure. Most behaviour. If not alter the FROMDATE/TODATE range
or correct the application and rerun. User response: Review the output and correct if
necessary.
EQQI160W No entries found matching criteria
EQQI173E Cannot lock <record-type> <key> for
Explanation: A command has been issued to find
<update-mode>
elements in the database or plans, but nothing was
found. Explanation: A batch loader command has been
issued for an object that cannot be locked exclusively,
System action: Workload Automation Programming
after retrying in accordance with the OPTIONS
Language will issue RC=4 and continue.
CONTENTION setting.
User response: Review the output and correct if
System action: Workload Automation Programming
necessary.
Language will issue RC=8 and continue.
User response: Identify and resolve the cause of
EQQI164E <adid> <opno> has no successors for
contentions before rerunning.
CONNECT(SUCC)
Explanation: The QUEUE command has been issued
EQQI174W An internal command issued warnings -
with the CONNECT(SUCC) keyword specified.
see previous messages
System action: Workload Automation Programming
Explanation: A command has been executed that
Language will issue RC=8 and continue.
called other commands internally that issued Warning
User response: Review the output and correct if messages effecting the success of the command.
necessary.
System action: Workload Automation Programming
Language will issue RC=4 and continue.
EQQI170E Unable to activate console
User response: Review the messages from the
<console-name>
preceding block of messages.
Explanation: A CONSOLE command was unable to
activate an extended console.
EQQI175W Missing interval for <wsname> - Cannot
System action: Workload Automation Programming reset
Language will issue RC=8 and continue.
Explanation: A WSALTER command has been executed
User response: Review associated messages and that requested a reset of either parallel servers or
correct. resource quantities, but the FROM and TO keywords
do not point to an existing interval.
EQQI171E External command returned negative RC System action: Workload Automation Programming
(1) Language will issue RC=4 and continue.
Explanation: A CALL command has executed an User response: An interval can only be reset if it
external REXX routine that has resulted in a negative already exists. Either correct the FROM and TO to
return code. This is often caused by the REXX routine point to the existing interval covering the time period
not being found in the execution path. you want to reset to planned values, or provide explicit
values for PSCAP, R1CAP and R2CAP for the time
System action: Workload Automation Programming period concerned.
Language will issue RC=8 and continue.
User response: Review the execution path to ensure EQQI176E Cannot find inserted job to edit JCL
the REXX routine is accessible.
Explanation: An ADDJOB or JBSTART command has run
with the JCL keyword, but the update process is unable
EQQI172W Workstation <wsname> not suitable for to locate the newly inserted job.
<command>
System action: Workload Automation Programming
Explanation: A current plan operations command has Language will issue RC=8 and continue.
been issued to an operation for which it is not suitable.
This may be because the command has been issued to User response: Investigate why the inserted job
all operations in an occurrence, with the intention of cannot be located and rerun.
only applying the command to the operations that are
permitted.
System action: Workload Automation Programming
Language will issue RC=4 and continue.
358 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
EQQI180W • EQQI199E
EQQI180W Completed successor EQQI198E Input file <ddname> not allocated for
AD=<applicationID> input
IA=<YYMMDDHHMM> OP=<nnn>
Explanation: A command has been executed that
Explanation: An ADDJOB or JBSTART command has run requires an input file, but the named DD is either not
that has identified a defined successor that is already in allocated, or does not refer to an input file.
a complete state. An external predecessor cannot be
System action: Workload Automation Programming
added to a completed operation. Keyword
Language will issue RC=8 and continue.
COMPSUCC(WARNING) has been specified.
User response: Correct the file allocations and rerun.
System action: Workload Automation Programming
Language will not apply the dependency, issue RC=4,
and continue. EQQI199E Failed reading from file <ddname>
RC=<return-code>
User response: Review the details to determine if
further actions are required. Explanation: A command has been executed that
reads a file, but has failed.
EQQI181E Completed successor System action: Workload Automation Programming
AD=<applicationID> Language will issue RC=8 and continue.
IA=<YYMMDDHHMM> OP=<nnn>
User response: Consult REXX documentation for the
Explanation: An ADDJOB or JBSTART command has run EXECIO command for an explanation of the return
that has identified a defined successor that is already in code.
a complete state. An external predecessor cannot be
added to a completed operation. Keyword
COMPSUCC(ERROR) has been specified.
System action: Workload Automation Programming
Language will not apply the dependency, issue RC=8,
and continue.
User response: Review the details to determine if
further actions are required.
Note: The documentation may state that the value is User response: Correct the OPTIONS statement or
valid for the keyword. Workload Automation update EQQYXU00 to include the new exit before
Programming Language could still reject this if the rerunning.
value is not valid for the particular version of IBM
Workload Scheduler for z/OS you are communicating EQQI210E <keyword> required for <command>
with, or you have not enabled a particular SPE. Check command
message EQQI002I to see what version of IBM
Workload Scheduler for z/OS Workload Automation Explanation: An attempt has been made to use a
Programming Language believes it is operating against. command that has a required keyword missing. The
keyword may be one that is always required by the
command, or may only be required in conjunction with
EQQI207F Invalid keyword <keyword> other keywords you have specified.
Explanation: A parsing error has occurred. An System action: The command is not run.
inappropriate keyword has been coded.
User response: Provide the missing keyword and
System action: Workload Automation Programming rerun.
Language terminates.
User response: Consult the documentation, correct EQQI211F Invalid comparator <comparator> for
and rerun. keyword <keyword>
Note: The documentation may state that keyword is Explanation: An invalid comparator has been
valid. Workload Automation Programming Language specified against the named keyword.
could still reject this if the keyword is not valid for the System action: The command will fail, Workload
particular version of IBM Workload Scheduler for z/OS Automation Programming Language will stop
you are communicating with, or you have not enabled processing further commands.
a particular SPE. Check message EQQI002I to see what
version of IBM Workload Scheduler for z/OS Workload User response: Correct the comparator. See section
Automation Programming Language believes it is “Using comparators” on page 27.
operating against.
360 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
EQQI212F • EQQI218E
362 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
EQQI230F • EQQI304A
enabled to cause a time delay to happen after certain System action: The program pauses for the stated
categories of command, to reduce risk of contention number of seconds.
and allow other processes a share of IBM Workload
User response: None.
Scheduler for z/OS resources.
364 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
EQQI507A • EQQI903C
366 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Notices
This information was developed for products and services offered in the US. This
material might be available from IBM in other languages. However, you may be
required to own a copy of the product or product version in that language in order
to access it.
IBM may not offer the products, services, or features discussed in this document in
other countries. Consult your local IBM representative for information on the
products and services currently available in your area. Any reference to an IBM
product, program, or service is not intended to state or imply that only that IBM
product, program, or service may be used. Any functionally equivalent product,
program, or service that does not infringe any IBM intellectual property right may
be used instead. However, it is the user's responsibility to evaluate and verify the
operation of any non-IBM product, program, or service.
IBM may have patents or pending patent applications covering subject matter
described in this document. The furnishing of this document does not grant you
any license to these patents. You can send license inquiries, in writing, to:
IBM may use or distribute any of the information you provide in any way it
believes appropriate without incurring any obligation to you.
Licensees of this program who wish to have information about it for the purpose
of enabling: (i) the exchange of information between independently created
programs and other programs (including this one) and (ii) the mutual use of the
information which has been exchanged, should contact:
The licensed program described in this document and all licensed material
available for it are provided by IBM under terms of the IBM Customer Agreement,
IBM International Program License Agreement or any equivalent agreement
between us.
This information is for planning purposes only. The information herein is subject to
change before the products described become available.
This information contains examples of data and reports used in daily business
operations. To illustrate them as completely as possible, the examples include the
names of individuals, companies, brands, and products. All of these names are
fictitious and any similarity to actual people or business enterprises is entirely
coincidental.
COPYRIGHT LICENSE:
368 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
© (your company name) (year).
Portions of this code are derived from IBM Corp. Sample Programs.
© Copyright IBM Corp. _enter the year or years_.
Trademarks
IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of
International Business Machines Corp., registered in many jurisdictions worldwide.
Other product and service names might be trademarks of IBM or other companies.
A current list of IBM trademarks is available on the web at "Copyright and
trademark information" at www.ibm.com/legal/copytrade.shtml.
Adobe, the Adobe logo, PostScript, and the PostScript logo are either registered
trademarks or trademarks of Adobe Systems Incorporated in the United States,
and/or other countries.
Linear Tape-Open, LTO, the LTO Logo, Ultrium, and the Ultrium logo are
trademarks of HP, IBM Corp. and Quantum in the U.S. and other countries.
Intel, Intel logo, Intel Inside, Intel Inside logo, Intel Centrino, Intel Centrino logo,
Celeron, Intel Xeon, Intel SpeedStep, Itanium, and Pentium are trademarks or
registered trademarks of Intel Corporation or its subsidiaries in the United States
and other countries.
Microsoft, Windows, Windows NT, and the Windows logo are trademarks of
Microsoft Corporation in the United States, other countries, or both.
Java™ and all Java-based trademarks and logos are trademarks or registered
trademarks of Oracle and/or its affiliates.
UNIX is a registered trademark of The Open Group in the United States and other
countries.
Notices 369
Applicability
These terms and conditions are in addition to any terms of use for the IBM
website.
Personal use
You may reproduce these publications for your personal, noncommercial use
provided that all proprietary notices are preserved. You may not distribute, display
or make derivative work of these publications, or any portion thereof, without the
express consent of IBM.
Commercial use
You may reproduce, distribute and display these publications solely within your
enterprise provided that all proprietary notices are preserved. You may not make
derivative works of these publications, or reproduce, distribute or display these
publications or any portion thereof outside your enterprise, without the express
consent of IBM.
Rights
IBM reserves the right to withdraw the permissions granted herein whenever, in its
discretion, the use of the publications is detrimental to its interest or, as
determined by IBM, the above instructions are not being properly followed.
You may not download, export or re-export this information except in full
compliance with all applicable laws and regulations, including all United States
export laws and regulations.
370 IBM Workload Scheduler for z/OS: Workload Automation Programming Language for z/OS User's Guide and Reference
Index
A
accessibility xiii
C
Cloud & Smarter Infrastructure technical
training xiii
D
Dynamic Workload Console
accessibility xiii
E
education xiii
T
technical training xiii
training
technical xiii
Printed in USA