TWS-Automation Programmer Reference and Operator Guide
TWS-Automation Programmer Reference and Operator Guide
Version 4 .Release 1
TWS Automation
Programmer’s Reference and Operator’s
Guide
IBM
SC34-2749-01
Note
Before using this information and the product it supports, read the information in Appendix A,
“Notices,” on page 119.
Edition Notes
This edition applies to IBM® System Automation for z/OS (Program Number 5698-SA4) Version 4 Release 1, an IBM
licensed program, and to all subsequent releases and modifications until otherwise indicated in new editions.
This edition replaces SC34-2549-00.
© Copyright International Business Machines Corporation 1990, 2017.
US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract with
IBM Corp.
Contents
Figures................................................................................................................ vii
Tables.................................................................................................................. xi
Accessibility....................................................................................................... xiii
Using assistive technologies..................................................................................................................... xiii
Keyboard navigation of the user interface................................................................................................ xiii
iii
Displaying TWS Applications.......................................................................................................... 19
Displaying TWS Operations............................................................................................................ 20
Displaying TWS Special Resources................................................................................................ 21
Displaying TWS Workstations.........................................................................................................22
Displaying TWS Calendars..............................................................................................................23
Specifying Additional LIST Criteria.................................................................................................23
Modifying the Current Plan.................................................................................................................. 24
Line Mode Modifications................................................................................................................. 24
Modifications via Panel Interaction................................................................................................25
iv
Chapter 8. Automating Applications with TWS Automation.....................................................................61
Defining Automated TWS Applications................................................................................................61
Defining Information for TWS Automation in TWS........................................................................ 61
Example of an Application Making a Request................................................................................ 64
Executing TWS Requests with TWS Automation.................................................................................67
Request Types.................................................................................................................................68
TWS Requests and MESSAGES/USER DATA Keywords................................................................. 69
Request Parameters and the &EHKVARn Variables...................................................................... 71
Defining a Command with an Automation Workstation...................................................................... 71
Invoking the Command with SA z/OS............................................................................................ 73
Completion Checking Routine..............................................................................................................73
Chapter 9. MESSAGES/USER DATA Entries and USER E-T Pairs for TWS Automation............................ 75
TWS-Specific MESSAGES/USER DATA Keywords................................................................................75
OPCA............................................................................................................................................... 75
OPCACMD........................................................................................................................................76
OPCAPARM......................................................................................................................................78
v
Backup on a Different Processor..................................................................................................116
Long Term Outage.........................................................................................................................116
Example Using Doubly-Defined NetView Domain IDs.................................................................117
Automated Recovery Functions.........................................................................................................117
TWS Actions in a Loss-of-Contact Situation................................................................................ 117
TWS Automation Actions in a Loss-of-Contact Situation............................................................ 118
Index................................................................................................................ 135
vi
Figures
vii
24. INGTWS REQ=LIST TYPE=OP Sample Panel........................................................................................... 41
viii
49. Specifying the Command for a Request................................................................................................... 70
52. Specifying Expected Status and Time Interval for Different Request Parameters................................. 71
ix
x
Tables
6. Automation Operators.................................................................................................................................52
9. Request Buffer Layout for Non-Subsystem, User Extension (UXaaaaaaa) Operations.......................... 101
xi
xii
Accessibility
Accessibility features help users with physical disabilities, such as restricted mobility or limited vision, to
use software products successfully. System Automation for z/OS supports several user interfaces.
Product functionality and accessibility features vary according to the interface.
The major accessibility features in this product enable users in the following ways:
• Use assistive technologies such as screen reader software and digital speech synthesizer, to hear what
is displayed on screen. Consult the product documentation of the assistive technology for details on
using those technologies with this product and screen magnifier software
• Operate specific or equivalent features using only the keyboard
• Magnify what is displayed on screen.
The product documentation includes the following features to aid accessibility:
• All documentation is available to both HTML and convertible PDF formats to give the maximum
opportunity for users to apply screen-reader software
• All images in the documentation are provided with alternative text so that users with vision impairments
can understand the contents of the images.
{A|B|C}
[A|B|C]
indicates that you may enter A, B, or C, or you may omit the operand.
• A series of three periods (…) indicates that a variable number of items may be included in the list.
• An underscored item shows the default that the system will choose if you do not specify an item. For
example,
[A|B|C]
XYZ [A[,B[,C]]]
However, the comma follows the preceding parameter and needs to be on the same line as that
parameter.
Related Publications
Deleted Information
• Chapter 4. NMC Display Support is deleted.
• Information relevant to NMC is deleted from the whole manual.
This part describes some main concepts of SA z/OS, including some NetView-related information, and
gives an overview of the facilities offered by TWS Automation.
Subtopics:
• Chapter 1, “Functions of TWS Automation,” on page 3
Basic Concepts
TWS Automation is an extension of SA z/OS that capitalizes on the strengths of NetView, SA z/OS, and
TWS by providing the ability to greatly expand job execution, scheduling, monitoring, and alert notification
capabilities.
Tivoli Workload Scheduler for z/OS Automation consists of two basic functions:
1. Requests from TWS to SA z/OS and associated status updates
2. Requests from SA z/OS to TWS and associated status updates
This gives the user the ability to manipulate application groups or monitoring resources in the same way
as for subsystems, providing out-of-box integration with no installation setup being required. It allows for
the definition of automation requests in TWS without the need for the SA z/OS policy database to be
updated.
Command Interface
The command interface is designed to work with TWS in a way that is natural for TWS.
It takes the form of a batch job that can be used to execute any NetView or SA z/OS command on any
NetView interconnected in the enterprise.
The batch job may execute on any system in the sysplex that contains an SA z/OS Agent or NetView Agent
running the TWS PPI batch command receiver. This command receiver is a NON-MVS SA z/OS subsystem
and may be controlled via the same interfaces as any other SA z/OS subsystem.
4 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
Basic Concepts
Command Interface
Because the command interface is a normal batch job as submitted by TWS, there are no extra TWS
definitions. You may optionally create a batch job submission workstation that is used to submit the batch
jobs to run commands against SA z/OS.
The advantage in doing this is that the command processor that the batch job runs can automatically stop
the workstation if the SA z/OS Agent or NetView Agent is not up or the PPI interface is not responding.
When the SA z/OS Agent or NetView Agent starts up it will automatically restart the previously stopped
workstation.
6 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
Support for Multiple TWS Controllers
Communication Flow
Figure 1 on page 7 shows the communication flow between TWS and SA z/OS with multiple TWS
controllers. The shadow under the controller and tracker represents multiple controllers and trackers.
2. The exits pass their information via NetView PPI to the EVJTOPPI receiver task.
They create unique 8-character PPI sender IDs that consist of the 3-character exit name (either 007 or
SAZ) followed by a 4-character address space ID, separated by the # symbol, for example, 007#003D.
This prevents a possible clash of PPI receiver IDs should both sets of exits be executing in parallel.
3. EVJTOPPI validates the PPI buffer that it has received and sends the command to the appropriate
routine: EVJESPVY for conventional request types or EVJESCVY for command request types.
4. After processing the request, the OPCAPOST or EVJRYPST routine (for conventional requests or
command requests, respectively) posts the success or failure of the request or command to TWS.
Note that because this is posted to all trackers that are running on the SA z/OS that processes the
request, the job name for the operation is passed as an additional qualifier for the request to
OPCAPOST or EVJRYPST. It is the responsibility of the installation to ensure that the TWS operation is
uniquely identified. SA z/OS uses the following attributes to identify the TWS operation:
• Application name
• Workstation name
• Operation number
• Job name (if present)
• IA® time
5. EVJRYPST formats an EQQUSIN buffer and sends this to the z/OS Master Subsystem.
6. The z/OS Master Subsystem sends a copy of this buffer to every z/OS subsystem that has registered for
the data.
7. The tracker (and possibly also the controller) will have registered for the TWS buffer data that
EQQUSIN created. These address spaces receive a copy of the buffer.
8. If the tracker receives the data, it sends it on to its owning controller, which might be on another
system. The controller now marks the operation complete or in error.
Thus all POSTs to TWS go to all trackers on the system that the command or request was eventually
executed on. It does not matter how many controllers or trackers are running on a system, they will all
receive the POST.
TWS topology requires a tracker to be running on every system that SA z/OS might dispatch a command or
request to. There must therefore be a tracker for each of the different controllers. So if you have two
controllers TWCA and TWCB you will need a tracker from each to be present on the system. If the trackers
are TWTA and TWTB and there are two systems SYS1 and SYS2, then both TWTA and TWTB must be
running on both systems. The controllers can run anywhere, even on foreign systems.
8 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
NetView Interface to TWS Automation
Note that creating TWS operations with the same workstation, ADID, operation number and job name
might result in unpredictable effects. This is because when SA z/OS posts the result of the operation, all
operations with the same ID on all active controllers will also be posted.To avoid this, you should ensure
that the ADID (Application Identification) is unique.
The ACF $$$OPCA DOMAINID entry, which is defined in the OPC Workstation Domains policy object in the
customization dialog panels, must specify workstations for all active controllers. An installation can either
use the same workstation names for different active controllers or it can specify different names that
resolve to the same set of domain IDs. For example, active controller 1 might use NV11 for domain ID
IPSFM, and active controller 2 might use NV21 for the same domain ID. This is however limited because
the first two characters of the workstation name must be NV.
ING.res_sys.res_type.res_name.UP, and
ING.res_sys.res_type.res_name.DOWN
where:
res_sys
is the MVS sysid of the system where the subsystem status change was detected. If the resource is a
SYSPLEX application group, the value SYSPLEX is used or the value is the sysplex name depending on
the setting of AOF_AAO_TWS_RESYSPLEX advanced automation option (AAO).
res_type
is one of APL, APG, SYS, SYG, GRP, or MTR.
res_name
is the name of the resource.
UP
is a literal that defines the resource as being available only when the resource has an observed status
of AVAILABLE and a desired status of AVAILABLE.
DOWN
is a literal that defines the resource as being available only when the observed status of the resource
is one of the following Automation Manager statuses:
SOFTDOWN, HARDDOWN, STANDBY, UNKNOWN, SYSGONE,
and when its desired status is UNAVAILABLE.
10 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
Possible Uses of TWS Automation
TWS Automation can automate some of the more complex operator procedures and thereby provide
several new functions. The following topics give some examples and scenarios that demonstrate these
functions.
In Figure 2 on page 11, the online databases are structured so that you can vary specific ones offline,
without an impact to the system, as in the case of databases structured on a geographic or application
basis. This process flows as follows:
1. Based on the current plan, TWS begins the READY TO START DATABASE UPDATE job.
2. A request is sent to TWS Automation to issue the command required to vary the subject database
offline to allow for batch processing.
3. The request is issued through the MTO interface.
4. TWS Automation ensures that the database is offline.
5. TWS Automation posts the operation as completed in TWS.
6. With the operation completed, TWS dependency starts the batch processing for this database.
7. When the batch process is completed, TWS once again triggers TWS Automation, and the proper MTO
command is issued to vary the database online to IMS.
When individual databases accomplish this type of process, the database/data communications (DB/DC)
system is always up, and certain small portions of the data is unavailable for short periods. In some cases,
you can restructure the databases to further shorten periods of data unavailability.
TWS Automation does not directly support the preceding example, which requires some user-written
modules. (See “Interaction with CICS Automation” on page 111 and “Interaction with IMS automation”
on page 112 for some examples of this type of user-written module.) TWS Automation transports the
request to the appropriate system and prepares the information for the user code. TWS Automation then
returns the resulting status to the operation in TWS. TWS Automation also ensures that the actions
requested are serialized with other requests to that specific target subsystem and that the status of the
subsystem is such that it can accept the requests.
12 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
Possible Uses of TWS Automation
TWS Automation extends this TWS capability and allows necessary cycling of the target system
application once the maintenance is applied successfully. You can schedule this in such a way as to
minimize any impact on the end-user community. The following is a typical scenario:
1. A PTF is installed, tested, and found acceptable. This PTF is then applied to all copies of TSO in a
multisystem environment.
2. The application is defined to TWS. In most cases, the application is simply updated because it is
already defined.
3. TWS presents the batch jobs that control the SMP/E process to the systems programmer for
modifications, if required.
4. TWS schedules the transmission of the jobs to the target systems using NJE. The scheduling can use a
time when network traffic is low.
5. Once the jobs are in the target system, TWS dependency control is used to schedule the SMP/E job
execution.
6. TWS ensures that the SMP/E jobs run correctly. If TWS encounters problems, the TWS application
provides backout procedures.
7. After installing the PTFs, TWS selects the appropriate time to issue a request to TWS Automation to
restart TSO.
8. Because TWS fully controls the process for this PTF update, you can inquire at any time to see the
progress of the operations. If errors or problems occur, TWS Automation informs the SA z/OS
notification operator.
• Prior to the need, a series of interdependent recovery applications are defined to TWS, but not
scheduled.
• The decision to recover the critical applications at the backup site is made. The scheduler uses normal
TWS panels to modify the current plan to schedule the first backup application.
• Before recovery, several factors, which can result in modifications to procedures and JCL, need
considering. These modifications are then presented to operators at manual workstations with
instructions in the operator instruction files of TWS. They are also presented to systems programmers at
JCL workstations.
• The work load on the recovery system is stopped by scheduling a request to SA z/OS to stop all
subsystems other than JES.
• Once the subsystems are stopped, a series of jobs are scheduled to transfer data from disk-to-tape to
accommodate the requirements of the critical applications that are recovered.
• Depending on the situation, the same system is reused or restructured, and then followed by an IML and
IPL of the recovery system. If this is the case, the focal point implementation option of SA z/OS is used
to partially or completely automate this phase of the recovery. Regardless of the specifics, the result is
an operating system platform ready to accept the recovery environment.
• TWS schedules a series of JES jobs that restore the databases from backup.
• TWS triggers NetView to issue the appropriate commands to start the subsystem.
• In some cases, NetView requires access to MTO functions to issue specific procedures before the
DB/DC system can resume transaction processing. If that is the case, user-provided modules are
required to fully automate the recovery.
At this point, the recovery is completed. Normal operating procedures should apply to the environment.
Because a recovery situation creates an environment where resources are scarce, the actual applications
that are offered are frequently a subset of the normal applications. To accommodate this environment,
TWS and TWS Automation may need to change the scheduling of some of the applications controlled by
TWS.
After recovery occurs and you resolve the problems that forced the original backup, the applications
should be moved back to the original system. The scenario for this move is similar to the one above
except that this move is planned instead of forced. This allows you to move specific applications one at a
time, as opposed to the all-at-once scenario that a critical situation requires. The fact that some of the
applications are moved to an already working system makes the takeback more complex than the original
recovery.
Give special consideration to any synchronization procedure in an TWS Automation environment. For
more information on the synchronization process, see Chapter 13, “Resynchronization and Recovery
Considerations,” on page 115.
14 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
Part 2. Operator's Guide
This part describes the actions that an operator can perform with TWS Automation commands.
Subtopics:
• Chapter 2, “Managing the TWS Current Plan,” on page 17
• Chapter 3, “Monitoring using SDF,” on page 31
• Chapter 4, “Managing the PPI Receivers,” on page 33
• Chapter 5, “TWS Automation Operator Commands,” on page 35
INGTWS (CTL1/APL/SYS1,CTL2/APL/SYS2)
In this case both CTL1 and CTL2 TWS Controller subsystems will be scanned to see which is the Active
Controller. The Active Controller is the subsystem that is in the AVAILABLE Automation Manager state and
that is marked ACTIVE by the automation manager.
Using Wildcards
The Resource Parameter can take wildcards as defined in the INGLIST command, for example:
INGTWS CTL*/APL/*
In this case both CTL1 and CTL2 would be scanned as in the example for multiple resource definitions,
however, the user specification is shorter.
INGTWS CTLR/APG
or:
INGTWS CTLG/APG/SYS1
Both SYSPLEX and SYSTEM type application groups are allowed. The members of the application groups
are found and checked to see if they are TWS type applications. Only the TWS type applications with a
subtype of CONTROLLER or TRACKER are checked.
If the INGTWS command cannot resolve the resources that you specify as an active TWS Controller, a final
attempt is made to see if any of the resources are a TWS Tracker. If a single OPC Tracker is found in an
AVAILABLE state and has an LUNAME policy entry, then this tracker will be used. If multiple controllers or
trackers (or both) are found, and INGTWS is running in full screen mode, then a selection list is displayed;
when OUTMODE=LINE is specified an error message is displayed.
The Tracker selected will be used to refer to a remote Controller via the definitions in the "TWS Control"
policy as specified above.
Command ===>
PF1=Help PF2=End PF3=Return PF4=Clear PF5=Reset PF6=Roll
field-name op contents
Where:
• field-name is a valid field name as specified by the MODIFY command arguments in Tivoli Workload
Scheduler for z/OS Programming Interfaces.
• op can be one of the following:
18 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
Displaying the Current Plan
You can scroll left and right with the PF11 (Next) and PF10 (Previous) keys. If more data is available than
is displayed on the screen, use the PF8 (Down) or PF7 (Up) keys to scroll the data up or down.
For details about the different column values, see the online help or the description of the INGTWS
command.
Figure 5 on page 19 is displayed if you press the PF11 key.
You can scroll left and right with the PF11 (Next) and PF10 (Previous) keys. If more data is available than
is displayed on the screen, use the PF8 (Down) or PF7 (Up) keys to scroll the data up or down.
For details about the different column values, see the online help or the description of the INGTWS
command.
Figure 8 on page 21 is displayed if you press the PF11 key.
20 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
Displaying the Current Plan
If more data is available than is displayed on the screen, use the PF8 (Down) or PF7 (Up) keys to scroll the
data up or down.
For details about the different column values, see the online help or the description of the INGTWS
command.
You can scroll left and right with the PF11 (Next) and PF10 (Previous) keys. If more data is available than
is displayed on the screen, use the PF8 (Down) or PF7 (Up) keys to scroll the data up or down.
For details about the different column values, see the online help or the description of the INGTWS
command.
Figure 13 on page 23 is displayed if you press the PF11 key.
22 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
Displaying the Current Plan
If more data is available than is displayed on the screen, use the PF8 (Down) or PF7 (Up) keys to scroll the
data up or down.
For details about the different column values, see the online help or the description of the INGTWS
command.
2. Secondly, via the default safe as passed to the INGTWS command. TWS/OPC LIST arguments are
specified as keyword value pairs separated by an equals sign (=). Each pair is contained as a single line
of a multiline message in the default safe. For example:
twsparms.0 = 2
twsparms.1 = 'JOBCRT = Y'
twsparms.2 = 'STATUS = A'
If TWS/OPC LIST arguments are specified via the default safe and via the TWSPARM command parameter
in the same invocation of INGTWS then the values specified via TWSPARM= will take precedence.
For example:
INGTWS opc_controller,REQ=LIST,TYPE=OP,TWSPARM=(JOBCRT=Y),
OUTMODE=LINE
will display all operations with the critical job flag set to Y.
INGTWS opc_controller,REQ=LIST,TYPE=OP,OUTMODE=LINE,
TWSPARM=(JOBCRT=Y;OPNO=1)
will display all operations with the critical job flag set to Y and the operation number equal to 1.
INGTWS opc_controller,REQ=LIST,TYPE=APPL,TWSPARM=(JOBCRT=Y),
OUTMODE=LINE
is invalid because the JOBCRT argument is not valid with TYPE=APPL (segment type CPOC).
24 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
Modifying the Current Plan
SR SRNAME=
The Special Resource Name in the current plan of the required special
resource.
WS WSNAME=
The Work Station Name in the current plan of the required workstation.
You can specify the data to be modified for a given TWS resource in two ways:
• Firstly, via the command parameter UPDATE=. The data are specified as keyword value pairs separated
by an equals sign (=). Pairs of data are separated by the semi-colon character (;). For example:
• Secondly, via the default safe as passed to the INGTWS command. The data are specified as keyword
value pairs separated by " = " (the blanks either side of the equals sign are required). Each pair is
contained as a separate message in the default safe. For example:
updateStem.0 = 2
updateStem.1 = 'PRIORITY = 3'
updateStem.2 = 'STATUS = A'
'PIPE STEM updateStem. | COLLECT | SAFE * '
'PIPE NETV INGTWS ......'
The valid keywords are derived from the TWS-related manual, Tivoli® Workload Scheduler for z/OS
Programming Interfaces (SH19-4545-00). Any keyword as specified in the "Modify Request", "Arguments"
section may be used. Table 3 on page 25 matches the INGTWS TYPE= parameter value to the TWS
resource types.
TWS Applications
From a list of applications (TYPE=APPL) use the "A" (update) command code against an application.
Command ===>
PF1=Help PF2=End PF3=Return PF6=Roll
PF12=Retrieve
Fill in the fields to achieve the desired result and press the Enter key.
For details about the different fields see the online help.
TWS Operations
From a list of operations (TYPE=OP) use the "A" (update) command code against an operation.
26 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
Modifying the Current Plan
Command ===>
PF1=Help PF2=End PF3=Return PF6=Roll
PF11=Next PF12=Retrieve
For details about the different fields see the online help.
Fill in the fields to achieve the desired result, then press the Enter key or press PF11 key to scroll to the
next page. If you press the PF11 key, the panel shown in Figure 17 on page 27 is displayed.
Command ===>
PF1=Help PF2=End PF3=Return PF6=Roll
PF10=Previous PF11=Next PF12=Retrieve
For details about the different fields see the online help.
Fill in the fields to achieve the desired result, then press the Enter key or press PF11 key to scroll to the
next page. If you press the PF11 key, the panel shown in Figure 18 on page 28 is displayed.
Command ===>
PF1=Help PF2=End PF3=Return PF6=Roll
PF10=Previous PF12=Retrieve
Fill in the fields to achieve the desired result, then press the Enter key.
For details about the different fields see the online help.
Default Values
Available => (Y or N)
Quantity =>
Command ===>
PF1=Help PF2=End PF3=Return PF6=Roll
PF12=Retrieve
Fill in the fields to achieve the desired result and press the Enter key.
For details about the different fields see the online help.
28 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
Modifying the Current Plan
TWS Workstations
From a list of workstations (TYPE=WS) use the A (update) line command against a workstation.
Command ===>
PF1=Help PF2=End PF3=Return PF6=Roll
PF12=Retrieve
Fill in the fields to achieve the desired result and press the Enter key.
For details about the different fields see the online help.
30 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
Chapter 3. Monitoring using SDF
The Status Display Facility uses color to represent the various subsystem resource statuses such as error,
warning, action, or informational states.
Typically, a subsystem shown in green on a Status Display Facility status panel indicates that it is up,
whereas red indicates a stopped or problem state.
The Status Display Facility status display panels can be tailored to present the status of system
components in a hierarchical manner. The hierarchical display of status information is implemented using
tree structures. A tree structure always starts with the system name as the root component. The "leaves"
of the tree are the monitored resources.
Color can be propagated up or down the leaves of the tree structure based on the order of dependencies.
The effect of propagation is to consolidate, at the root component, the status of all the monitored
resources in that system. In this way, the color of the root component reflects the most important or
critical status in a computer operations center. If all the monitored resources are green, the root
component (the system) will be green.
TWS Automation provides additional Status Display Facility panels that monitor the events that occur in
the following areas for all TWS regions defined to TWS Automation:
Applications in Error
Shows the TWS applications that have encountered an error.
To use the TWS Automation Status Display Facility panels, enter SDF at a NetView panel command line.
Critical Messages
Applications in Error
06/20/05 17:17
===>
PF1=HELP 2=DETAIL 3=RETURN 6=ROLL 7=UP 8=DN 12=TOP
You should not have to start the Request receiver in normal circumstances because it should
automatically start when the SA z/OS Agent registers with the Automation Manager.
To stop the Request receiver, issue the INGREQ REQ=STOP command against the appropriate subsystem,
for example:
You should not have to start the Command receiver in normal circumstances because it should
automatically start when the SA z/OS Agent registers with the Automation Manager.
To stop the Command receiver, issue the INGREQ REQ=STOP command against the appropriate
subsystem, for example:
34 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
INGTWS
INGTWS
Purpose
The INGTWS command lets you:
• Display Application, Operation, Special Resource, Work Station and Calendar information from the
Current Plan.
• Modify Application, Operation, Special Resource, Work Station information in the Current Plan.
• Issue a request against any controller defined to SA z/OS in a sysplex.
• Issue a request against a foreign controller where the local tracker is defined to SA z/OS.
• Output the INGTWS command in either fullscreen or pipeable line mode.
Format
INGTWS Resource REQ= LIST
, MOD
( resource_name )
TYPE= APPL
OP TARGET= target
SR
WS
CAL
MOD options
OUTMODE= LINE LIST options
AUTO
NETLOG
WS Selection criteria
MOD options
;
LIST options
;
OP Selection criteria
AD= appl-id IA= yymmddhhmm OPNO= nnnn JOBNAME= jobname
SR Selection options
SRNAME= special_resource
WS Selection options
WSNAME= workstation
Parameters
resource
The resource specifies the OPC controller that is to be queried or modified. Multiple specifications are
allowed as well as system and sysplex application groups. Wildcards % and * are supported.
36 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
INGTWS
The command attempts to resolve the specification to a single appropriate target resource. In all
cases the groups are resolved to their members and wildcards are resolved to specific sets of
resources.
The resulting list of resources is scanned to check whether there is a single active controller. If a
single active controller is found then it is used. If no active controller is found then the list is scanned
to check whether there is a single active tracker (only active trackers with LUNAME policy entries are
checked because only these trackers can be used to communicate with TWS via the PIF interface). If
a single active tracker is found then it is used.
If no viable resources are found then an error message is displayed. If multiple viable resources are
found, and INGTWS is running in full screen mode, then a selection panel will be displayed; when
OUTMODE=LINE is specified an error message is displayed.
If an active controller could be found a command is dispatched to the appropriate system in the
sysplex to execute the OPC API on the same system as the active controller. If a tracker was found,
the LUNAME parameter of the trackers OPCCNTL entry may be used to specify a remote controller. In
this case the command is dispatched to the system where the tracker is running and the APPC API is
used to connect to the remote controller from that system.
REQ
Specifies the request to be issued to the OPC subsystem. It can be one of the following:
LIST
Lists OPC Current Plan resources.
MOD
Modifies OPC Current Plan resources.
TYPE
Specifies the type of Current Plan resource to be listed or modified. It can be one of the following:
APPL
Specifies the Current Plan Application Description resource.
OP
Specifies the Current Plan Operation resource.
SR
Specifies the Current Plan Special resource.
WS
Specifies the Current Plan Workstation resource.
CAL
Specifies the Current Plan Calendar resource.
UPDATE
Specifies the fields that are to be updated and the new contents of the field. Multiple fields can be
specified separated by a semi-colon ";". The names of the fields are the same names as specified in
the MODIFY command arguments in TWS for z/OS Programming Interfaces.
An alternative to specifying all the fields to be updated using the UPDATE= parameter is to specify the
fields and their contents in the default SAFE. Specify one field per message with the format of
<fieldname><blank>=<blank><contents>. The blanks between the fieldname and the = symbol and
the = symbol and the contents are required.
TWSPARM
Specifies additional fields to be used to locate a resource during LIST processing. Multiple fields may
be specified separated by a semi-colon ";". The names of the fields are the same names as specified in
the LIST command arguments described in the TWS for z/OS Programming Interfaces manual. The
field names must match the TWS segment being searched. For example, CPOC fields are valid for
TYPE=APPL and CPOP fields are valid for TYPE=OP, and so on. A TWS EQQ* message will be issued if
the field specification is incorrect.
An alternative to specifying additional LIST fields using the TWSPARM= parameter is to specify the
fields and their values in the default SAFE. Specify one field per message using the format
<fieldname><blank(s)>=<blank(s)><contents>. The blanks are optional.
If the same field names are specified in both the TWSPARM and the default SAFE, the TWSPARM
values will be used.
Additional LIST fields can only be specified with OUTMODE=LINE.
AD
Specifies the Application Description selection criteria. For LIST requests, this may contain the trailing
"*" wildcard character. For MOD requests, this must be the exact name of the application description
to be updated.
IA
Specifies the input arrival date/time of the application. The format is as specified by the system
programmer when installing and customizing OPC. The default format is YYYYMMDDHHMM.
OPNO
Specifies the operation number selection criteria. This is the operation number of an operation in an
application description.
JOBNAME
Specifies the OPC jobname. This field is used to qualify requests of type OP and is optional for all
requests.
STATUS
Specifies the OPC status. This field is used to qualify requests of type OP and is optional for all
requests.
ERRCODE
Specifies the OPC error code. This field is used to qualify requests of type OP and is optional for all
requests.
GROUP
Specifies the OPC group. This field is used to qualify requests of type OP and is optional for all
requests.
OWNER
Specifies the OPC owner. This field is used to qualify requests of type OP and is optional for all
requests.
PRIORITY
Specifies the OPC priority. This field is used to qualify requests of type OP and is optional for all
requests.
SRNAME
Specifies the Special Resource selection criteria.
For LIST requests, this may contain the trailing "*" wildcard character. For MOD requests, this must be
the exact name of the special resource.
If the special resource name contains special characters then it must be enclosed in single quotation
marks.
WSNAME
Specifies the workstation name selection criteria. Specifies the workstation name selection criteria
but may also be used to qualify TYPE=OP requests.
For LIST requests, this may contain the trailing "*" wildcard character. For MOD requests, this must be
the exact name of the workstation.
TARGET
Specifies the name of the system (system, domain or sysplex name) that the command should be
routed to. The TWS controller specified in the resource field must be active on this system or the
command will return no data. This is only necessary when the resource is not part of the local sysplex.
38 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
INGTWS
For information on the TARGET parameter, refer to IBM System Automation for z/OS Operator's
Commands.
OUTMODE
For information on the OUTMODE parameter, refer to IBM System Automation for z/OS Operator's
Commands.
Restrictions
To use the INGTWS command system operations must be initialized.
Usage
The INGTWS command operates sysplex-wide. For an overview refer to "Overview of Commands that
Operate Sysplex-Wide" in IBM System Automation for z/OS Operator's Commands.
Examples
If you type INGTWS a panel similar to Figure 22 on page 39 is displayed.
Application =>
IA Date/Time=> (YYMMDDHHMM)
SR Name =>
Command ===>
PF1=Help PF2=End PF3=Return PF6=Roll
PF12=Retrieve
• The Resource field shows the name of the OPC active controller subsystem to be used for issuing the
requests. The format is name/type[/system]. Wildcards are supported.
• The System field shows the name of the system (system name, domain ID, or sysplex name) that the
command should be routed to. Specifying this is only necessary if the resources do not reside on the
local sysplex.
• The Request field shows the request to be carried out. It can be LIST or MODIFY.
• The Type field shows the type of OPC Current Plan resource to be specified.
• The Application field specifies the OPC application id. This field is used to qualify requests of type APPL
or OP and is optional for LIST requests but is required for MODIFY requests.
• The IA Date/Time field specifies the OPC input arrival time. This field is used to qualify requests of type
APPL or OP and is optional for LIST requests but is required for MODIFY requests.
• The Operation # field specifies the OPC operation number. This field is used to qualify requests of type
APPL or OP and is optional for LIST requests but is required for MODIFY requests.
• The Jobname field specifies the OPC jobname associated with an operation. This field is used to qualify
requests of type OP and is optional for all requests.
• The Status field specifies the OPC status associated with an operation. This field is used to qualify
requests of type OP and is optional for all requests.
• The Error Code field specifies the OPC error code associated with an operation. This field is used to
qualify requests of type OP and is optional for all requests.
• The Group field specifies the OPC group associated with an operation. This field is used to qualify
requests of type OP and is optional for all requests.
• The Owner field specifies the OPC owner associated with an operation. This field is used to qualify
requests of type OP and is optional for all requests.
• The Priority field specifies the OPC priority associated with an operation. This field is used to qualify
requests of type OP and is optional for all requests.
• The Workstation field specifies the OPC workstation for the operation. This field is used to qualify
requests of type OP and type WS and is optional for all LIST requests but is required for type WS
MODIFY requests.
• The SR Name field specifies the OPC special resource name. This field is used to qualify requests of
type SR and is optional for LIST requests but is required for MODIFY requests.
If you specify INGTWS * REQ=LIST TYPE=APPL a panel similar to Figure 23 on page 40 is displayed.
Command ===>
PF1=Help PF2=End PF3=Return PF5=Filters PF6=Roll
If you specify INGTWS * REQ=LIST TYPE=OP a panel similar to Figure 24 on page 41 is displayed.
40 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
INGTWS
Command ===>
PF1=Help PF2=End PF3=Return PF5=Filters PF6=Roll
If you specify INGTWS * REQ=LIST TYPE=SR a panel similar to Figure 25 on page 41 is displayed.
Command ===>
PF1=Help PF2=End PF3=Return PF5=Filters PF6=Roll
If you specify INGTWS * REQ=LIST TYPE=WS a panel similar to Figure 26 on page 42 is displayed.
Command ===>
PF1=Help PF2=End PF3=Return PF5=Filters PF6=Roll
If you specify INGTWS * REQ=LIST TYPE=CAL a panel similar to Figure 27 on page 42 is displayed.
Command ===>
PF1=Help PF2=End PF3=Return PF5=Filters PF6=Roll
Press PF10 and PF11 to display more information for each resource type. Issuing the command code A
Update command against a resource in the CMD field displays a panel that lets you modify the resource.
The Application Description list supports the B Operations command code. Issuing this command code
against an application resource displays a list of operations for that resource. SORT/FIND/RFIND
commands are supported. Refer to "Deciding the Format of the Command Output (Fullscreen only)" in
IBM System Automation for z/OS Operator's Commands for further information.
Pressing PF5 displays a filter selection panel similar to Figure 28 on page 43 is displayed.
42 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
TWS Automation Main Menu
Command ===>
PF1=Help PF2=End PF3=Return PF4=Clear PF5=Reset PF6=Roll
Command ===>
PF1=Help PF2=End PF3=Return PF6=Roll
To define one or more OPC Subsystems to be processed, type in the name of a resource. This should be in
the format name/type/system.
To display a list of all known OPC resources type a question mark (?) for the resource and specify the
required system. The System field allows you to specify a TARGET parameter where you would like the
required OPC function to be performed (system, domain or sysplex name). To limit the resource list to a
specific system, use the */APL/system notation.
Otherwise, type the number of one of the listed functions and press Enter.
Purpose
This command is used by SA z/OS to inform TWS of status changes. This is accomplished by the
OPCAPOST command processor, which is normally used internally in TWS Automation. Although you can
issue OPCAPOST as an operator command, operators should use INGTWS TYPE=OP REQ=MODIFY, if
possible. INGTWS provides a fullscreen interface to TWS and dynamically acknowledges the action unlike
OPCAPOST.
If you determine that you must use the OPCAPOST command, refer to “OPCAPOST” on page 98.
Purpose
The OPCAQRY command displays the status of TWS Automation operations, including all commands that
are received via the request interface.
Syntax
OPCAQRY
subsystem REQ=DETAIL
domain_ID AUTO
sysplex_name NETLOG
*ALL
Parameters
subsystem
The name of the subsystem. Unless you specify REQ=DETAIL, more than one subsystem name as well
as a wildcard can be specified. The wildcard can be, for example, SAP*, *SAP or *SAP*
REQ=DETAIL
Displays TWS-related information for the specified subsystem. The resource name is mandatory when
REQ=DETAIL is specified.
TARGET
For information on the TARGET parameter, refer to IBM System Automation for z/OS Operator's
Commands.
44 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
OPCAQRY—Display Status of Operations
OUTMODE
For information on the OUTMODE parameter, refer to IBM System Automation for z/OS Operator's
Commands.
Restrictions
The OPCAQRY command can only be used when SA z/OS is initialized.
Examples
If you enter the OPCAQRY command without the REQ=DETAIL parameter, a panel similar to Figure 30 on
page 45 is displayed. The panel shows information about TWS-controlled subsystems that match the
filter criteria.
Command ===>
PF1=Help PF2=End PF3=Return PF6=Roll
PF9=Refresh PF12=Retrieve
• The CMD field allows you to specify command codes to invoke another command dialog. The following
command codes are available:
D
Shows the TWS operation details for the subsystem.
R
Resets the timer and completion flags to a null value, and unlocks a specific subsystem after a user
error has been detected and corrected. By resetting the timer and completion flags, SA z/OS again
accepts requests from TWS.
For a command entry, the entry is removed by deleting the CGlobals that are used to keep track of
the command processing.
• The Status field shows the status of the request or command in SA z/OS:
– For a request, the status can be:
Complete
The operation completed successfully. This is considered to be a normal status.
Incomplete
This indicates that the operation did not achieve the expected status set by the system
programmer in the OPCA code entry.
Timeout
This indicates that the operation is marked in error because it did not complete within the time
limit set by the system programmer in the OPCA code entry.
In progress
The request has been received and processing has been started.
No request
No request was made
– For a command, the status can be:
In progress
The command has been received and processing has been started.
In error
The command completed but failed.
Complete
The command completed successfully. This is considered to be a normal status.
Timeout
The command did not finish processing within the time that was specified in the completion
information for the command.
Waiting
The command finished processing but is now waiting for completion.
If you enter command code D for a subsystem or specify the REQ=DETAIL option, a panel similar to Figure
31 on page 46 is displayed.
Subsystem : OPCAO1
System : KEY4 in Sysplex : KEY1PLEX
Description : Dummy MVS resource
Job Name : OPCAO1
Status : Complete
Application : OPCAO#TESTAD
Workstation : NV04
Operation number : 10
IA Timestamp : 05/19/06 09:50
Request : STOP
Parameter 1 :
Parameter 2 :
Expected Status : DOWN
Timer flag : 0
Completion flag : 1
Check Module : EVJESPTE
Command ===>
PF1=Help PF2=End PF3=Return PF6=Roll
PF9=Refresh PF12=Retrieve
Figure 31. OPCAQRY Command Dialog Panel Showing Details for a Subsystem
If details are requested for a command, a panel similar to Figure 32 on page 47 is displayed.
46 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
SRSTAT—Setting TWS Special Resource Status
Application : OPCAO#TESTAD
Workstation : NV04
Operation number : 10
IA Time : 06/19/06 18:45
Command ===>
PF1=Help PF2=End PF3=Return PF6=Roll
PF9=Refresh PF12=Retrieve
If the command is in an error condition, details similar to those in Figure 33 on page 47 are displayed.
If the command is in a complete condition, details similar to those in Figure 34 on page 47 are displayed.
Purpose
This command lets you update the status of the specified TWS special resource to the value given in the
parameters. The status is returned via messages.
Syntax
SRSTAT srname,SUBSYS=subsys,AVAIL=Y|N
Parameters
srname
Special resource name — up to 44 characters.
Note: The special resource name must be enclosed in single quotes if it contains any spaces or
commas.
subsys
The MVS subsystem ID of the TWS tracker — 4 characters.
AVAIL=Y|N
Availability indicator.
Return Codes
SRSTAT has the following return codes:
0
Okay.
1
Bad parameters.
2
Invalid special resource name.
3
Invalid subsystem ID.
4
Invalid availability status.
Example
SRSTAT EOD.CICSPRD1.TRANS,SUBSYS=OPCT,AVAIL=Y
In this example, end-of-day transactions are required to finish before production work can begin. SRSTAT
is executed when the transactions are complete. The special resource name EOD.CICSPRD1.TRANS is
used to trigger OPC/ESA applications that are able to run when the transactions are finished. A number of
applications are added to the current plan.
The variable used for subsys, OPCT, is the name of the tracker subsystem. The tracker subsystem name is
only required with this command.
48 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
Part 3. Programmer's Reference
This part describes the information needed by system programmers to install and customize the TWS
Product Automation of System Automation for z/OS.
Subtopics:
• Chapter 6, “Installing TWS Automation,” on page 51
• Chapter 7, “Using TWS Special Resources,” on page 57
• Chapter 8, “Automating Applications with TWS Automation,” on page 61
• Chapter 9, “MESSAGES/USER DATA Entries and USER E-T Pairs for TWS Automation,” on page 75
• Chapter 10, “The Structure of TWS Request Automation,” on page 79
• Chapter 11, “TWS Automation Common Routines and Data Areas,” on page 91
• Chapter 12, “Guidelines for User-Written Operations,” on page 105
• Chapter 13, “Resynchronization and Recovery Considerations,” on page 115
These automation operator definitions can be found in the *TWS add-on sample PDB definitions under
the Auto Operators policy with the name "TWS_AUTO_OPS".
52 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
Defining System Automation Policy
However, separate automated operator tasks for Controller and Tracker are required. Running TWS
Automation on the Controller system with a single automated operator task specified for both Controller
and Tracker functions results in a lockout condition. Consider this especially on backup systems, which do
not normally run Controller functions. If you specify only one automated operator task for both systems,
each task runs properly until they become an active backup system and lock.
For the automated operator task OPCAMSTR, the operator ID must be AUTOPCP. For the automated
operator task OPCAOPR2, you may specify whatever operator ID meets your installation standards.
However, do not change the TWS Automation operator task names OPCAMSTR and OPCAOPR2.
For automation workstations you must also specify the automated operator tasks AOFTWSnn. Generally,
you should define one automated operator task for each workstation, however, if a workstation is
associated with multiple servers that work together in parallel, then you will need to specify enough
automated operator tasks to cover these.
• CODE1 represents the name of the sysplex that the Batch Command Server non-MVS subsystem is
running on.
• CODE2 represents the name of the system that the Batch Command Server non-MVS subsystem is
running on.
• CODE3 is not used.
This allows the same Controller or Tracker subsystem definition to be run on different systems or
sysplexes and the name of the workstation can be different on each sysplex or system combination.
54 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
Defining the SA z/OS Status Observer
Note: If multiple controllers are running on the same system they must share the same Controller Details
(OCS) definitions. If more than one OCS policy object is linked to the same system, the last is used, but
the TWS controller can be selected by TWS common routines, as described in “TWS Automation Common
Routines” on page 91, using the SUBSYS parameter.
56 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
TWS Special Resource Definition
Procedure
1. Ensure that the SA z/OS Resources that are to be monitored are defined in SA z/OS.
All these policy items are described in IBM System Automation for z/OS Defining Automation Policy in
the section "Defining Automation for TWS Components" in "Product Automation Policy Object":
a) Set the OPCA PCS Special Resources Policy.
Use NO if you do not want any Special Resources Set.
Use ALL if you want ALL SA z/OS Resources echoed as TWS Special Resources (this will create a
large number of TWS special resources).
Use YES if you want a selection of SA z/OS Resources echoed as TWS Special Resources.
b) If you specified YES above, ensure that the TWS Special Resources policy item is updated with the
appropriate resource masks and linked to the appropriate systems via the WHERE USED entry.
2. Ensure that the definitions for the TWS Status Observer are entered into the Automation Policy. The
instructions for this are given in “Defining the SA z/OS Status Observer” on page 55.
3. Ensure that TWS option RESOPTS DYNAMICADD(YES) is specified.
Procedure
1. Create the special resource in the TWS Database.
Use the TWS ISPF dialog to create the special resource. Set the Availability of the special resource to
N, as shown in Figure 36 on page 58.
Defaults
QUANTITY ===> 1 Number available 1-999999
AVAILABLE ===> N Available Y or N
58 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
Using SA z/OS TWS Special Resources in an Application
Results
In this case Operation Number 005 will wait until SA z/OS sets the special resource
ING.KEY1.APL.CICSK1G.UP to Y. This will only happen if the observed and desired status of
CICSK1G/APL/KEY1 are both AVAILABLE.
60 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
Defining Automated TWS Applications
NVxx
Notes:
1. Reserve NVxx workstations for TWS Automation. Unpredictable and undesirable results may occur if
these workstation names are used for other workstations.
2. If using automation workstations, the workstation destination name can contain the NetView domain
ID. If it does not, the workstation name is mapped to the NetView domain ID.
Figure 39 on page 62 shows a typical definition.
Enter the command R for resources , A for availability or M for access method
above.
Entries in the SA z/OS policy database (WORKSTATION DOMAINS policy object, entry type ODM) translate
NVxx to an actual NetView domain ID. The automation administrator defines these entries. In this
manner, the scheduler defining the TWS applications does not need to know the NetView domain ID
names, but rather works with the workstation representation of those names. This allows changes to the
relationship of workstations to NetView domain IDs without modifying the TWS definitions.
Note: You may use TWS database management dialogs or batch loader jobs to define the NVxx
workstations.
62 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
Defining Automated TWS Applications
Application:
ID ===> MAINT___________
TEXT ===> RMF Maintenance_________ Descriptive text
TYPE ===> A A - Application, G - Group definition
Owner:
ID ===> SAOPER_TEAM_____
TEXT ===> SAOPER Team_____________
Descriptive text of application owner
PRIORITY ===> 5 A digit 1 to 9 , 1=low, 8=high, 9=urgent
VALID FROM ===> 07/12/06 Date in the format YY/MM/DD
STATUS ===> A A - Active, P - Pending
AUTHORITY GROUP ID ===> ________ Authorization group ID
CALENDAR ID ===> DEFAULT_________ For calculation of work and free days
GROUP DEFINITION ===> ________________ Group definition id
SMOOTHING FACTOR ===> ___ LIMIT ===> ___ Deadline Feedback options
Function Requested
The function requested and the request parameters, if any, are not standard TWS definitions. Enter these
fields in the Operation text field using blanks as delimiters.
Figure 41 on page 63 shows an example of how to define a request to stop and start RMF.
TWS Automation permits the inclusion of two optional parameters in the request buffer. The target system
builds the required command with these parameters, using information contained in the SA z/OS policy
database. Alternatively, the parameters pass control information to optional user-written modules. Figure
42 on page 63 shows an example of the request using these optional parameters.
Enter the PRED command above to include predecessors in this list, or,
enter the GRAPH command above to view operations graphically.
Enter the row command S to select the details of an operation.
The following list defines several of the fields that are shown on the panel in Figure 43 on page 64.
NV04
Represents the target NetView domain or the sysplex that the request is sent to.
RMFBKUP
The application submitting the request to TWS Automation.
RMF
Target subsystem. This looks like a job to TWS, but is actually a subsystem.
005, 010
Standard operation sequence numbers used by TWS.
STOP, START
Requested function. There are no parameters in this example.
64 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
Defining Automated TWS Applications
Application:
ID ===> MAINT___________
TEXT ===> RMF Maintenance_________ Descriptive text
TYPE ===> A A - Application, G - Group definition
Owner:
ID ===> SAOPER_TEAM_____
TEXT ===> SAOPER Team_____________
Descriptive text of application owner
PRIORITY ===> 5 A digit 1 to 9 , 1=low, 8=high, 9=urgent
VALID FROM ===> 07/12/06 Date in the format YY/MM/DD
STATUS ===> A A - Active, P - Pending
AUTHORITY GROUP ID ===> ________ Authorization group ID
CALENDAR ID ===> DEFAULT_________ For calculation of work and free days
GROUP DEFINITION ===> ________________ Group definition id
SMOOTHING FACTOR ===> ___ LIMIT ===> ___ Deadline Feedback options
In Figure 44 on page 65, certain fields, such as calendar ID, are not used. However, TWS Automation does
not preclude the use of normal application and operation functions.
Selecting OPER as a primary command allows the entry of individual operations for this application.
In Figure 45 on page 65, three operations are defined. The first and third send requests to TWS
Automation in the NetView domain that is associated with the NV00 workstation. The second is a batch
job named RMFMAINT that performs the batch maintenance tasks.
Selecting TEXT as a primary command allows entry of the operation text. TWS Automation uses the
Operation text field to contain the request and up to two optional parameters for operations with the
workstation defined for TWS Automation. Figure 46 on page 66 shows the resulting operations text
detail panel.
In the applications, TWS Automation defines TWS requests in a generic manner. Figure 46 on page 66
shows the MAINT application with the first and last operations defined for the NetView workstation NV00.
The requests that are forwarded to the NetView workstation NV00 are STOP and START. These requests
are expanded by definitions in the policy database into commands; see “Executing TWS Requests with
TWS Automation” on page 67.
With this type of structure, TWS Automation can schedule the NVxx operation, rather than the timer-
dependent dummy workstation, if the application needs scheduling on demand or restarting. This
manually initiated procedure is independent of the time consideration, if appropriate.
66 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
Executing TWS Requests with TWS Automation
You can vary the amount of fine-tuning considerably. If you only want to start and stop subsystems known
to SA z/OS through TWS in a standard way, you need not even code any of these keywords. On the other
hand, you can call user-written modules with OPCACMD that perform tasks not related to any SA z/OS
subsystem and that must inform TWS about the success of their execution independently of TWS
Automation.
The following sections explain the connection between the TWS request and the TWS-specific
MESSAGES/USER DATA keywords by a fairly typical example, describe the use of request parameters, and
give an overview of the different request types.
Request Types
TWS requests can be classified into four types depending on the existence or non-existence of TWS-
specific keywords and on the type of command associated with the OPCACMD keyword. The following
sections give an overview of these types.
If you specify a startup type, this type will be added to the command.
The format of the stop command issued by TWS Automation is:
If you specify a shutdown type, this type will be added to the command.
Where specified, the first parameter is a token that is taken as the type.
Note that if you want to add or change any parameter other than the TYPE parameter, you must specify
your INGREQ command in an OPCACMD entry and code the associated OPCA entry. For more information
on INGREQ, see IBM System Automation for z/OS Operator's Commands.
Also note that when a default start or stop is selected, SA z/OS does not set a start or stop delay timer to
ensure that the request finishes within a specified time. If a start or stop delay timer is required, the OPCA
and OPCACMD entries should be coded.
When the startup or shutdown type is invalid for the subsystem in question, or when the command
encounters any problem, the operation will fail with a user abend code of U003.
68 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
Executing TWS Requests with TWS Automation
Non-Subsystem Requests
These are requests that an OPCACMD entry is coded for, and where the command specified in that entry
does not relate to a subsystem known to SA z/OS.
The name of these requests must begin with 'UX'. The OPCACMD entry for a non-subsystem request must
be coded as a USER E-T pair. With requests of this type, the complete request buffer will be stored in
&EHKVAR1, and it is up to the user-written command to analyze this information. &EHKVAR2 contains the
input arrival time.
For the format of the request buffer for 'UX' requests, see Table 9 on page 101.
No OPCA or OPCAPARM entry is needed for non-subsystem requests. The responsibility for informing
TWS about the success of the operation lies entirely with the user-written command.
For more information on this request type, see “Non-Subsystem Operations” on page 108.
The request is START in both entries. The second entry has one parameter, namely COLD.
OPCACMD Keyword
TWS Automation uses the Job name and the Operation text fields of the TWS operation to translate
requests into commands. After identifying the subsystem through the Job name entry, it consults the
OPCACMD entry in the MESSAGES/USER DATA policy item of this subsystem. The CMD attributes of this
entry contain the commands that are to be issued in response to various requests, or combinations of
request and parameters that can be specified in the Operation text field. The following panel gives an
example entry for RMF:
PS/Select AutoFn/*
Command Text
START
INGREQ RMF REQ=START,TYPE=NORM,SOURCE=EXTERNAL
OPMSG
MSG ALL RMF MSG
These entries specify in the Command Text field the commands that are to be issued for RMF when
START, respectively, OPMSG requests are put to TWS Automation. Thus, when the 005 request of Figure
48 on page 69 has been put to TWS Automation, TWS Automation will issue the command
OPCA Keyword
Besides specifying the command to be issued in response to the request, you must also tell TWS
Automation:
• The status you expect the subsystem to assume as a result of this command
• The time interval within which the subsystem must assume this status
This is done with the OPCA keyword. The following panel continues the example of Figure 49 on page 70.
Here, the request is specified in the Code 1 column. The Value Returned column contains the expected
status, the time interval (in minutes), and optionally a timer name. The Code 2 and Code 3 columns are
intended for eventual request parameters and consequently left blank in this example.
Flow of Control
Procedure
1. It sets the RMFUTMER timer to two minutes.
2. It issues the command INGREQ RMF REQ=START,TYPE=NORM,SOURCE=EXTERNAL.
3. If RMF has assumed the UP state before two minutes have passed, TWS Automation cancels the timer
and posts the completion code C (for COMPLETED) back to TWS.
70 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
Defining a Command with an Automation Workstation
4. After the timer has expired, TWS Automation checks the status of RMF. If RMF is in the UP status, TWS
Automation posts C to TWS; otherwise, it posts E (for error) and an additional error code.
PS/Select AutoFn/*
Command Text
START
MYCLIST CICS1H &EHKVAR1
Then, when the request of the 010 operation in Figure 48 on page 69 is put to TWS Automation, MYCLIST
will be called with the arguments CICS1H and COLD. A very simple version of MYCLIST could be as
follows:
/* MYCLIST SAMPLE */
PARSE UPPER ARG CICSNAME STARTTYPE
IF STARTTYPE='COLD' THEN
"INGREQ "||CICSNAME||" REQ=START,TYPE=COLD,OUTMODE=LINE"
ELSE
"INGREQ "||CICSNAME||" REQ=START,TYPE=AUTO,OUTMODE=LINE"
EXIT 0
If you use parameters, you must code an OPCA entry for every parameter (combination). For the example
of Figure 51 on page 71, the OPCA entry could look like Figure 52 on page 71.
Figure 52. Specifying Expected Status and Time Interval for Different Request Parameters
Application :
Input Arrival :
Operation :
Jobname :
Command Text:
Completion Info:
72 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
Defining a Command with an Automation Workstation
For example, 05,4,MYRTN sets a maximum wait time of 5 minutes, a maximum tolerated return code
of 4 and the completion checking routine is MYRTN. The parameters must be separated by a comma.
Note: AAO and AOF_AAO_TWS_CHK_CONDDEP must be set to 'YES' for this new behavior. Otherwise, the
operation is successful (complete) only if the completion checking routine's return code is 0. This will also
be the return code of the operation, if conditional dependencies are exploited.
74 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
OPCA
Entry Description
“OPCA” on page 75. Use this to define the expected state of the subsystem and the time
interval within which this state must have been reached.
“OPCACMD” on page 76. Use this to specify the command to be issued in response to a TWS
request.
“OPCAPARM” on page 78. Use this to specify modifications of eventual request parameters and
a timer module for user-written commands.
OPCA
Purpose
With the OPCA entry, you define the state that is the expected result of a request (with or without
parameters), and the time interval within which this state must have been reached. The OPCA entry is
defined in the MESSAGES/USER DATA policy item of the subsystem that is to be put under control of TWS.
Format
Parameters
Code 1
Request specified in the TWS operation text.
Code 2
Parameter 1 as specified in the TWS operation text.
Code 3
Parameter 2 as specified in the TWS operation text.
Value Returned
expstatus
Expected status of the subsystem at the completion of the request. expstatus stands for one of the
following values: UP, RUNNING or DOWN.
Note: For backward compatibility CTLDOWN and AUTODOWN are also allowed for this entry and
will be treated the same as DOWN.
timerint
Timer interval in minutes. The maximum value permitted is 1439 (23 hours and 59 minutes).
Set a timer interval that is long enough for the operation to complete reasonably. If the operation
does not complete in the interval specified, then an error is posted to TWS.
timerid
Timer ID — from 1 to 8 characters.
This must be a valid NetView timer ID with a value not equal to ALL or beginning with SYS, ING, or
AOF. This field is optional.
Usage Notes
For every OPCACMD entry there must be a corresponding OPCA entry.
Example
This example shows two entries, one for an automatic start, and one for a cold start. The AUTO or COLD
parameter is added to the START request in TWS to indicate which one of several startup procedures is to
be used. Presumably the two operations will take differing amounts of time, so the timer intervals are
different.
This OPCA code entry is used in conjunction with a user-written CLIST, specified in the OPCACMD entry;
see “Example 1” on page 77 for details of that entry and the sample CLIST.
OPCACMD
Purpose
With the OPCACMD entry, you define the command that is executed in response to a request (with or
without parameters). Except for non-subsystem commands, there must be a corresponding OPCA entry
for every OPCACMD entry.
Format
PS/Select AutoFn/*
Command Text
START
INGREQ RMF REQ=START,VERIFY=NO,SOURCE=EXTERNAL,TYPE=NORM,OUTMODE=LINE
STOP
INGREQ RMF REQ=STOP,VERIFY=NO,SOURCE=EXTERNAL,TYPE=NORM,OUTMODE=LINE
76 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
OPCACMD
Parameters
Pass/Selection
Request specified in the TWS operation text.
Command Text
The actual command to be executed.
Usage Notes
This entry is necessary for all request types except START, STOP, and CANCEL requests. If no entries are
supplied for START, STOP and CANCEL, the actions taken are detailed in “Starting and Stopping
Subsystems without TWS-Related Keywords” on page 68 and “Canceling a Start or Stop Request” on
page 68. The place where the OPCACMD entry is defined depends on the request type. When the request
is related to a subsystem, it is defined in the MESSAGES/USER DATA policy item of the respective
application. When the request is a non-subsystem request (see “Non-Subsystem Operations” on page
108), the OPCACMD entry must be entered in a USER E-T PAIRS entry.
Use SA z/OS commands to shut down and start up subsystems. This avoids the problem of having to
determine the specific commands required for each subsystem.
Example 1
PS/Select AutoFn/*
Command Text
START
MYCLIST CICS1 &EHKVAR1
RECYCLE
INGREQ TESTAPPL REQ=STOP RESTART=YES SOURCE=EXTERNAL SCOPE=ALL
This example assumes that AUTO or COLD is added as a parameter to the START request in TWS to
indicate which one of several startup procedures is to be used. The command specified in the Command
Text field is a user-written CLIST. This CLIST is passed the parameter value (AUTO or COLD) in the
&EHKVAR1 variable.
It also shows a RECYCLE type of operation (that is, bringing the subsystem down and restarting it
immediately) being defined. The command is issued in linemode and verifies that it is accepted otherwise
it posts the operation in error.
The OPCACMD entry of this example must be supplemented by an OPCA entry as in “Example” on page
76.
Example 2
Action Keyword/Data(partial)
CMD
(UXCINITS,'MVS $TI20-30,C=P')
******************************* Bottom of data ********************************
This example shows a command that is not related to a subsystem known to SA z/OS (see “Non-
Subsystem Operations” on page 108), and which, accordingly, must be defined as a USER E-T pair (see
“Non-Subsystem Operations” on page 108). The job name of the TWS request would be DUMMY.
Chapter 9. MESSAGES/USER DATA Entries and USER E-T Pairs for TWS Automation 77
OPCAPARM
TWS Automation recognizes such requests by the fact that the request name begins with 'UX'. In the
example, TWS Automation simply issues the MVS command $TI20-30,C=P, which tells JES to change
initiators 20 to 30 so that they process jobs of class P.
OPCAPARM
Purpose
The OPCAPARM entry supplies replacements for eventual request parameters and the name of a user-
written timer module. The OPCAPARM entry is defined in the MESSAGES/USER DATA policy item of the
subsystem that is to be put under control of TWS.
Format
Parameters
Code 1
Request specified in the TWS operation definition.
Code 2
Parameter 1 as specified in the TWS operation text.
Code 3
Parameter 2 as specified in the TWS operation text.
Value Returned
Enter the following parameters separated with commas.
parm1value
Substitution value used in the actual command.
parm2value
Substitution value used in the actual command.
timermod
Module called at the timer interval specified in the OPCA CODE entry for this subsystem. You must
specify a timer module when the command specified in the OPCACMD entry relates to a
subsystem defined to SA z/OS, but does not trigger a status change; see “User Functions Related
to an SA z/OS-Defined Subsystem” on page 105.
Usage Notes
OPCAPARM is optional except for requests that relate to a subsystem defined to SA z/OS, but where the
command specified in the OPCACMD entry is a user-supplied module that does not trigger a status
change of the subsystem. In this case, a you must specify a timer module. See “Implementing Completion
of a Request” on page 106 for more details.
Example
This example shows a forced stop request for a subsystem. The TWS operation text would be STOP
FORCE IMM. This would result in EHKVAR1 being set to FORCE and the INGREQ STOP command having a
TYPE of FORCE. Because OPCAPARM does not have a timermod value, the default module EVJESPTE is
used instead.
78 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
Flow Overview
Flow Overview
TWS Automation is an interface between NetView, TWS, and SA z/OS.
These components provide the facilities that make up the interface. This section provides an introduction
to these components and their interactions. The following are discussed:
• Initialization of the various components. See “Initialization” on page 79
• A description of the flow of a request from TWS to NetView and the return confirmation, including the
modules that are involved. See “Conventional Request Flow” on page 79
• A description of the “Command Request Flow” on page 86
Initialization
Initialization involves the following two sequences:
1. Initialization of the TWS components.
2. Initialization of TWS Automation functions in each NetView. TWS Automation initialization includes the
automated recovery sequences described in “Automated Recovery Functions” on page 117.
Using dependency control to ensure an orderly flow of operations, TWS defines the TWS-controlled
application named MAINT. TWS defines the application on an automatic general workstation, specifying
the NetView that the request is sent to. NVxx specifies a NetView automatic general workstation with a
NetView domain index of xx. This is resolved in the Controller NetView to the target NetView domain ID
using the definitions in the SA z/OS policy database. TWS can define the NVxx workstation with all regular
specifications, such as parallel servers and special resources. If the NVxx index specifies *LOCAL, the
command is processed locally.
In the MAINT example in Figure 54 on page 80, TWS defines the last batch application that is processed
before starting RMF with an operation number of 15. Once this completes properly, the normal TWS
dependency control readies the NV04_20 operation on the NV04 workstation. This signifies that the
request contained within the operation description field is sent to the NetView with a domain ID of
NVREG.
TWS Automation uses the NetView PPI to transfer the request from TWS to NetView. This transfer is
through the EQQUX007 exit in the OPC/ESA controller.
EQQUX007 Exit
Each change of status on any workstation causes TWS to call user exit 7 (EQQUX007).
The TWS Automation user exit EVJUX007 calls modules EVJ07001 and EVJ07004:
• EVJ07001 sends automation commands and data across the NetView PPI for all status changes on
NVxx workstations.
• EVJ07004 WTOs Operation status information for any operation that ends in Error or is changed from an
Error state to any other TWS state. This information is used to update SDF monitoring of TWS
operations.
80 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
Flow Overview
When an NVxx workstation moves to the R (ready) status, the workstation generates a request buffer.
Fields that are pointed to by registers in the EQQUX007 exit provide all of the data for the request buffer.
For the layout of the fields in the request buffer, see Table 8 on page 100 and Table 9 on page 101.
The EQQUX007 exit logic that is supplied by TWS Automation verifies that all fields exist (except the
optional request parameter fields). If this exit logic determines that any field is missing or the value is not
valid, it issues an error WTO and changes the operation to E (error) status, with an error code indicating a
user-definition error. Because the EQQUX007 exit cannot directly change the status of a TWS operation
when an error code is posted to TWS, the EQQUX007 exit uses the EQQUSINT module to respond.
If the information is correct, TWS builds the request buffer and calls the CNMCNETV module, which is the
NetView PPI module. This module transfers the request to the Controller NetView, where TWS verifies the
return codes from the call function to ensure that there are no errors. If TWS detects errors, the
EQQUSINT module changes the status to E (ended-in-error), with the error code on the basis of the PPI
module return code. The module issues a WTO and completes processing the EQQUX007 logic. TWS
Automation then restores registers and returns control to TWS.
If the TWS Automation EQQUX007 exit is unable to load the CNMCNETV module or use it to send data, it
directs TWS to mark the requested operation in error, with an error code of UNTV. TWS Automation will
attempt to reset operations that have ended in a UNTV error, subject to a user-defined time limitation,
whenever the TWS controller is restarted.
Based on the sending task identifier, the PPI dispatcher determines the function in SA z/OS that is sent.
For TWS Automation, the dispatcher selects the verify function.
The verify module uses the NVxx index to obtain the destination NetView domain ID from the SA z/OS
policy database. If the relevant NVxx index specifies SYSPLEX, then all SA z/OS systems in the local
sysplex are queried for the status of the application that is associated with the job name of the request.
The destination is determined to be the system that has the application in the most active state.
If the destination NetView and the requesting NetView are the same, TWS Automation logs the request
buffer and invokes the request module. If the destination NetView and the requesting NetView are
different, TWS Automation sends the request to the proper NetView domain by message forwarding.
If TWS Automation does not find the NVxx index then TWS Automation issues a message, posts the
operation status to E (ended-in-error, U003), and logs the results. No communications can occur with this
workstation until the definition is corrected. On the domain where the TWS controller is running, the
workstation must be defined in the WORKSTATION DOMAINS policy object (ODM entry type). You must
manually reset operations that are posted-in-error because TWS Automation carries out no automated
recovery for definition errors.
82 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
Flow Overview
If NVxx is associated with the sysplex that the TWS controller is running on (SYSPLEX keyword in the
WORKSTATIONS DOMAIN entry) and TWS Automation does not find the job defined to any online SA z/OS
in the local sysplex, then TWS Automation issues a message, posts the operation status to E (ended-in-
error, S998), and logs the results. To cater for the situation when all domains, where the job runs, are
offline, the operation will be retried if a gateway connection to another SA z/OS becomes active.
If TWS Automation successfully forwards messages, it logs the request buffer and returns control to the
module. If TWS Automation cannot send the request, it issues an error message and logs it to indicate
communication loss with the requested NetView domain. TWS Automation then posts the operation
status to E (ended-in-error, S999) due to loss of contact. When TWS Automation re-establishes
communications with this NetView domain, it checks for all outstanding errors because of loss of
communications on this workstation. If TWS Automation finds any of these errors, it resets the TWS-
operation status to R (ready), which re-invokes the EQQUX007 exit.
If required, the request module uses definitions in the SA z/OS policy database to create the command
that initiates the function requested. The policy database contains entries (OPCA, OPCACMD keywords;
see Chapter 9, “MESSAGES/USER DATA Entries and USER E-T Pairs for TWS Automation,” on page 75)
that the command text and the parameter syntax for the actual request are obtained from. If any of these
entries are not found, the processing cannot continue. The OPCAPOST module posts an error to TWS,
which logs the error and issues a WTO. Because this is a user-definition error, TWS attempts no
automation recovery. The user must correct the definitions and reset the operations in error.
In Figure 58 on page 83, the request module translates the requested action in the buffer to the SA z/OS
command required to start RMF. The SA z/OS command then starts RMF.
Except for starting, stopping, or recycling SA z/OS-controlled subsystems, other functions may require
user programming. To support these functions, TWS Automation provides a user exit capability. For a
detailed description of user responsibilities required to handle a user call, see Chapter 12, “Guidelines for
User-Written Operations,” on page 105.
For subsystem-related operations, the OPCAPOST command processor posts to TWS if the required
entries are found in the policy database. TWS changes the status from R (ready) to S (started). TWS
Automation then issues a timer request on the basis of the delay specified in the policy database (OPCA
keyword, see “OPCA” on page 75), issues the command, and checks the return code. Then the request
module terminates.
A change of subsystem status calls the status-change exit module. If the status change does not occur,
the timer-driven module executes when the timer interval expires. This ensures that a request resulting in
an unexpected status processes. For example, if TWS requests a START operation, and the subsystem
fails to start due to a JCL error or other problem, then the OPCAPOST module posts TWS with an error
status.
TWS Automation dynamically generates the TWS request by using definitions in the policy database and
dynamic substitution of command fragments on the basis of the parameters.
84 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
Flow Overview
For subsystem-related functions, EVJESPTE compares the current status with the expected status. If a
match is obtained, the OPCAPOST command processor posts a C (completed) status to TWS. If EVJESPTE
determines a mismatch between the current and expected status, OPCAPOST posts an error to TWS for
review by the TWS administrator. Figure 60 on page 85 shows the flow of this process.
Other functions use the OPCAPOST command. See “OPCAPOST” on page 98 for documentation on the
syntax.
This module completes the processing for this specific TWS operation. If the request executes
successfully, TWS Automation sets the TWS operation status to C (completed) and normal TWS-
dependency control allows the next operation to start. See the CPU_25 batch job in Figure 61 on page 85.
If the operation completes in error, TWS Automation sets an E status and a 4-character return code. The
application does not continue processing until some intervention occurs. An operator or TWS
Automation’s recovery can sometimes provide this intervention.
Process Flow
The flow consists of the following steps, as shown in Figure 62 on page 87:
1. TWS builds and sends the request buffer
2. SA z/OS verifies the request buffer
3. SA z/OS determines the destination NetView
4. The EVJESCMD routine processes the command
5. The EVJESCMD routine posts completion of the command
86 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
Command Request Flow
88 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
Command Request Flow
90 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
OPCACAL
INGLIST CATEGORY=OPC,SUBTYPE=CONTROLLER,OBSERVED=AVAILABLE,
OUTMODE=LINE
The active TWS Controller will be in AVAILABLE status with the manager variable 'TWSACT' set to
'ACTIVE'.
OPCACAL
Purpose
The OPCACAL command retrieves TWS calendar status information. Use this command for your
automation CLISTs. OPCACAL uses the EQQYCOM (also called the PIF) interface in TWS. For more
information about this interface, see the OPC/ESA Interfaces Guide.
To show the use of this command, TWS Automation provides a REXX sample called EVJERCAL.
It is recommended that you use INGTWS.
Format
OPCACAL [SUBSYS=subsystem,CALENDAR=calname]
Parameters
SUBSYS=subsystem
OPC/ESA subsystem ID — 4 characters.
OPCA is the default subsystem name.
CALENDAR=calname
Calendar ID — 16 characters.
DEFAULT is the default calendar name, used if this parameter is not coded.
Restrictions
OPCACAL supports multiple active controllers only if an appropriate value is supplied for the SUBSYS=
parameter.
Usage Notes
OPCACAL returns data in the following format:
• EVJ440I date_format day_of_week Work, or
• EVJ440I date_format day_of week Free
The date format is set by the NetView DEFAULTS LONGDATE value. For example:
or
The EVJ440I message is PIPEd to the CONSOLE ONLY and does not appear in the netlog. The message
can be processed by calling OPCACAL in a PIPE.
OPCACOMP
Purpose
The OPCACOMP command completes execution of a subsystem-related request by updating the TWS
Automation control information and calling OPCAPOST (see “OPCAPOST” on page 98).
Format
OPCACOMP subsys,sequence_number,status [,error_code]
Parameters
subsys
Subsystem or pseudo-subsystem to identify the request.
sequence_number
Sequence number assigned to this request by the EVJESPVY module.
status
Operation status reflected to TWS Valid statuses:
C
Complete
E
Error
error_code
Error code — 4-character value
Takes the form cccc. Errors typically start with an alphanumeric character followed by 3 digits. If a
return code is passed along with status C, use 4 digits and pad with '0' on the left, when
necessary.
92 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
OPCALIST
Do not specify the values Uxxx and Sxxx; reserve them for TWS Automation.
Return codes
0
Okay.
1
Error occurred, message issued.
Usage Notes
Call this routine in user-written functions that are related to a subsystem defined to SA z/OS whenever the
standard modules for completing a request (EVJESPSC and EVJESPTE) cannot be used. See
“Implementing Completion of a Request” on page 106.
Example
OPCACOMP RMF,842,E,R028
This example shows setting the operation requested for RMF in an error status with an error code of
R028.
OPCALIST
Purpose
The OPCALIST command retrieves TWS data. Use this command in your own automation CLISTS. It is
recommended that you use the command INGTWS REQ=LIST.
The module creates a CPOPCOM call to TWS to retrieve the data. OPCALIST uses the EQQYCOM (also
called the PIF) interface in TWS. For more information about this interface, see the OPC/ESA Interfaces
Guide.
Format
OPCALIST SUBSYS=subsystem,ADID=id,IA=yymmddhhmm,
PRIORITY=nnnn,ERRCODE=cccc,STATUS=s,OPNO=nnnn,
JOBNAME=name,WSNAME=name,
GROUP=groupname,OWNER=name
Parameters
SUBSYS=subsystem
TWS subsystem ID — 4 characters.
ADID=id
Application description ID — up to 16 characters.
IA=yymmddhhmm
Input arrival date yymmdd and time hhmm.
PRIORITY=nnnn
Priority — 4 digits.
ERRCODE=cccc
Error code — 4 characters.
STATUS=s
Occurrence status. Valid statuses:
R
Ready
S
Started
C
Completed
E
Error
I
Interrupted
Restrictions
OPCALIST does not support multiple active controllers. To obtain information from TWS in a multiple
controller environment, use INGTWS.
Usage Notes
Only as many parameters are required as necessary to identify the application(s) requested. Some
parameters may be left unspecified (they will default). Some may be generic; that is they may be only
partial and end with an asterisk (*) to indicate a partial match. You may also use a percent sign (%) to
substitute for a single character.
The response to the OPCALIST is made up of three messages. The following example below shows a
typical response where:
EVJ410I
This is the message header, showing row titles. This is always present.
EVJ411I
This is the detail message. If there are no entries matching the selection criteria this message is not
produced.
EVJ412I
This is the end of request message.
Response details are:
ADID
Application Description Id — up to 16 characters
JOBNAME
Job Name — up to 8 characters
WS
Workstation Name — up to 4 characters
94 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
OPCAMOD
OPNO
Operation Number — up to 4 numbers
S
Status (See “Parameters” on page 93 for valid statuses)
ERRC
Error Code (set to none for no error)
IA
Input Arrival — date (yymmdd) and time (hhmm)
OPTEXT
Descriptive Text — up to 24 characters
Example
OPCAMOD
Purpose
The OPCAMOD command modifies TWS data. This command is used in the OPCACMD CLIST and could be
used in your own automation CLISTS. It is recommended that you use the command INGTWS REQ=MOD.
The module creates a CPOPCOM or CPOCCOM call to TWS to perform occurrence or operation changes.
OPCAMOD uses the EQQYCOM (also called the PIF) interface in TWS. For more information about this
interface, see the OPC/ESA Interfaces Guide.
Format
OPCAMOD SUBSYS=subsystem,ADID=id,IA=yymmddhhmm,
IANEW=yymmddhhmm,DEADLINE=yymmddhhmm,PRIORITY=nnnn,
ERRCODE=cccc,OPNO=nnnn,STATUS=s,
JOBNAME=name,WSNAME=name,DESC=text,
EDUR=hhmm,PSUSE=nnnn,R1USE=nnnn,R2USE= nnnn,
JCLASS=c,AEC=Y|N,ASUB=Y|N,AJR=Y|N,TIMEDEP=Y|N,
CLATE=Y|N,HRC=value,FORM=value,OPIA=yymmddhhmm,
OPDL=yymmddhhmm,RERUT=Y|N,USERDATA=userdata,
RESTA=Y|N,DEADWTO=Y|N
Parameters
SUBSYS=subsystem
TWS/A subsystem ID — 4 characters (default OPCA).
ADID=id
Application description ID — up to 16 characters (required).
IA=yymmddhhmm
Input arrival date yymmdd and time hhmm (required).
IANEW=yymmddhhmm
New input arrival date and time.
DEADLINE=yymmddhhmm
Deadline date and time.
PRIORITY=nnnn
Priority — 4 digits.
ERRCODE=cccc
Error code — 4 characters.
STATUS=s
Occurrence status. Valid statuses:
R
Ready
S
Started
C
Complete
E
Error
I
Interrupted
Refer to the TWS documentation for more information.
JOBNAME=name
Job name — up to 8 characters.
WSNAME=name
Workstation name — 4 characters.
DESC=text
Descriptive text — 24 characters.
EDUR=hhmm
Estimated duration (hours and minutes).
PSUSE=nnnn
Number of parallel servers required — 4 digits.
R1USE=nnnn
Amount of resource 1 required — 4 digits.
R2USE=nnnn
Amount of resource 2 required — 4 digits.
JCLASS=c
MVS job class — 1 character.
AEC=Y|N
Y
Perform automatic error completion.
N
Do not perform automatic error completion.
ASUB=Y|N
Y
Perform automatic job submission.
N
Do not perform automatic job submission.
AJR=Y|N
Y
Perform automatic job hold and release.
N
Do not perform automatic job hold and release.
96 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
OPCAMOD
TIMEDEP=Y|N
Y
Time dependent job.
N
Not a time dependent job.
CLATE=Y|N
Y
Cancel if time job and late.
N
Do not cancel if time job and late.
HRC
Highest successful return code.
FORM=value
Form number — 8 characters.
OPIA=yymmddhhmm
Operation input arrival date and time.
OPDL=yymmddhhmm
Operation deadline date and time.
RERUT=Y|N
Y
Reroutable operation.
N
Not a reroutable operation.
USERDATA=userdata
User data — up to 16 characters.
RESTA=Y|N
Y
Restartable operation.
N
Not a restartable operation.
DEADWTO=Y|N
Y
Issue WTO if deadline missed.
N
Do not issue WTO if deadline missed.
Restrictions
OPCAMOD does not support multiple active controllers. To obtain information from TWS in a multiple
controller environment, use INGTWS.
Usage Notes
OPCAMOD can be used to set the status of operations occurring on general workstations that do not
automatically report (such as CPUs). OPCAPOST sets the status of operations that occur on automatically
reporting general workstations (a NetView, for example).
Example 2
OPCAMOD SUBSYS=OPCA,ADID=TEST,IA=9403100900,OPNO=0010,
STATUS=W
This example will set the status of operation number 0010 in application test, to waiting.
Example 3
OPCAMOD SUBSYS=OPCA,ADID=TEST,IA=9403100900,STATUS=W
This example will set the occurrence status of application TEST to WAITING. All operations in application
TEST will be set to WAITING.
OPCAPOST
Purpose
OPCAPOST posts the status of an TWS Automation operation back to TWS. Because OPCAPOST uses the
EQQUSINT interface, it can only change the status of operations on automatic reporting workstations. For
more information on this interface, see OPC/ESA Installation and Customization.
Format
OPCAPOST ADNAME=adname,WSNAME=wwww,OPNUM=nnnn,TYPE={S|C|I|E|X},
ERRCODE=xxxx[,SUB=subsystem][,JOBNAME=jobname]
[,ITIME=hhmm][,IDATE=yymmdd][ERRMSG=message]
Parameters
ADNAME=adname
Application name: 1 to 16 characters.
WSNAME=wwww
Workstation name: 1 to 4 characters.
OPNUM=nn
Operations number: 4 digits.
TYPE={S|C|I|E|X}
Type of call: 1 character. Acceptable event types are:
S
Started
C
Complete
I
Interrupted
E
Error
X
Reset
ERRCODE=xxxx
Error code: 4 characters.
SUB=subsystem
The MVS subsystem ID of the tracker that is associated with the controller: 4 characters (optional).
JOBNAME=jobname
The jobname that is associated with the operation: 1 to 8 characters (optional).
98 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
Data Areas
ITIME=hhmm
The input arrival time.
IDATE=yymmdd
The input arrival date.
ERRMSG=message
The message that is associated with the error code. The message can be examined in the TWS
Controller MLOG.
Usage Notes
OPCAPOST can be used to set the status of an operation that occurs on an automatically reporting general
workstation (a NetView, for example) only. Due to restrictions in the TWS interface, OPCAPOST cannot set
the status of operations on general workstations that are not automatically reporting (such as CPUs).
INGTWS REQ=MOD is available to set the status of such operations if this is required.
TWS Automation sets a return code on completion of the execution of the OPCAPOST command
processor, as follows:
0
Successful command
4
Parameter error
8
OPCAPOST failed.
Data Areas
This section contains the following:
• “Requestor ID Block (&EHKVAR9)” on page 99
• “Request Buffer for Standard Subsystem Operations” on page 100
RMF,7842,OPCACOMP,NETVT
Note: Other options can also use this block. Although OPCACOMP is shipped with the TWS Automation
option, you can also use a user-supplied module.
Table 8. Request Buffer Layout for Standard Subsystem Operations. Length represents the maximum
length if the format is variable.
Format Obtained
Field Length Value
Fixed/Variable From
100 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
EVJEAC04
Table 9. Request Buffer Layout for Non-Subsystem, User Extension (UXaaaaaaa) Operations. Length
represents the maximum length if the format is variable.
Format Obtained
Field Length Value
Fixed/Variable From
Any parameter with a variable length is left-adjusted and all trailing blanks are ignored.
Automation Routines
The following automation routines are supplied by TWS Automation:
• EVJEAC04
• EVJEOBSV
• EVJRAC05
• EVJRSACT
• EVJRSJOB
EVJEAC04
Purpose
This routine is called when message EVJ120I is trapped. The message is issued by SA z/OS when a TWS
Automation operation has been put into or reset from TWS Automation error status.
The EVJEAC04 routine should be called from the NetView automation table.
Chapter 11. TWS Automation Common Routines and Data Areas 101
EVJEOBSV
Syntax
EVJEAC04
Usage
The automation routine EVJEAC04 is intended to respond to message:
EVJ120I applid iatime opnum job status wsname errcode abcode usercode job# stepname
This can cause a Status Display Facility (SDF) update or an alert to be sent to a target for notification
processing.
For an operation change that changes to an error status, the update adds an entry, while an operation
changing from error status removes an entry.
EVJEOBSV
Purpose
This routine is used to start and stop the TWS Automation status observer.
The EVJEOBSV routine is called from within the Policy definitions when starting or stopping the status
observer. It is also called internally at SA z/OS initialization time and when an automation manager
takeover has been completed as indicated by message HSAM1309I.
Syntax
EVJEOBSV START
STOP
EVJRAC05
Purpose
This routine is called when message EQQE026I is trapped. This message is issued by TWS Automation
when a TWS Automation operation has detected a job error. This causes an entry to be added to SDF.
The EVJRAC05 routine should be called from the NetView automation table.
Syntax
EVJRAC05
Usage
The automation routine EVJRAC05 is intended to respond to message:
This requests the operator to perform error recovery actions for the current job.
EVJRSACT
102 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
EVJRSJOB
Purpose
This routine keeps track of whether or not the TWS Automation controller is active or in standby. The
information is stored in the automation manager.
The routine is called when trapping the following message:
• EQQZ201I
Syntax
EVJRSACT
EVJRSJOB
Purpose
This routine is called when trapping the following messages:
• EQQE107I
• EQQW079W
• EQQE037I
These messages are issued by TWS Automation when the state of a batch job has changed. This causes
an entry to be added to SDF.
The EVJRSJOB routine should be called from the NetView automation table.
Syntax
EVJRSJOB
Chapter 11. TWS Automation Common Routines and Data Areas 103
EVJRSJOB
104 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
User Functions Related to an SA z/OS-Defined Subsystem
Flow of Control
In a situation where a non-SA z/OS command needs issuing, specify the user CLIST or command
processor in the OPCACMD entry of the subsystem.
In response to the request, instead of issuing an SA z/OS command, TWS Automation passes control to
this user CLIST or command processor. All information available is made accessible to the user-supplied
module. If the user-supplied module does not trigger a status change of the subsystem and returns
control to TWS Automation synchronously, you are responsible for completing the operation. This should
be done by calling OPCACOMP once the results of these commands are analyzed. The OPCACOMP module
ensures that actions are accomplished in the correct sequence, does some housekeeping, updates the
SA z/OS control information, and calls the OPCAPOST command processor to return the specified
completion code to TWS; for more details see “Implementing Completion of a Request” on page 106.
Figure 64 on page 106 shows the flow including the user responsibilities.
To simplify implementation, you may plan to only use the timer function or only the detection of the
completion of the command. If you use only the event-driven method, then consider what happens if the
anticipated event fails to occur.
106 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
User Functions Related to an SA z/OS-Defined Subsystem
4. TWS Automation then checks if an OPCAPARM entry is present and if that entry contains a timer
module name.
5. If a timer module is specified, TWS Automation sets the timer with this timer module. Otherwise, it
uses a standard timer module (EVJESPTE).
6. TWS Automation issues the command that is specified in the OPCACMD entry.
After the command has been issued, two things remain to be done:
• If the command was executed successfully, the TWS control information for this subsystem must be
updated.
• The (positive or negative) result of the request must be posted back to TWS.
How this is done depends on the type of command specified in the OPCACMD entry.
To simplify completion of a user-written module, TWS Automation provides the following facilities.
Non-Subsystem Operations
Operations of this type, containing requests named UXxxxxxx, allow you to perform commands that are
independent of a specific subsystem.
Figure 65 on page 109 shows the flow for these types of operations.
108 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
Non-Subsystem Operations
TWS Automation uses this type of exit for several purposes. At any point in the production cycle, TWS
Automation allows you to invoke a user CLIST or procedure that can interact with system resources, such
as the storage management subsystem.
Let’s consider an example. Suppose, in a specific application flow within TWS, return codes show action
that is taken by operations. When a specific job in this application completes, one of several user
completion codes can result.
• A completion code of 0 indicates that application processing is to continue to the next operation.
• A user completion code of 50 indicates that the next two operations are skipped.
• A user completion code of 70 indicates that the application is completed at this operation.
Any other completion codes are treated as errors. Figure 66 on page 110 shows the subject operations in
this application, and the desired flow of control on the basis of the completion codes of the job that runs
as part of the CPU_20 operation.
In the preceding example, TWS handles all completion code situations, except 50 and 70, which it
intercepts. TWS accomplishes this interception in several fashions, such as user code in a JJC error exit.
This code could then drive TWS Automation with a user exit (UXxxxxxx) request. This request would be
passed to the specified NetView to drive a user-written script. In the user script the INGTWS REQ=MOD
could then be used to modify the current plan for the application in question on the basis of the
completion code received as part of the user exit request.
Flow of Control
When the name of a request starts with UX, TWS Automation assumes that the request is not related to a
subsystem known to SA z/OS.
As before, it expects to find an OPCACMD entry within a policy object that is identified through the Job
name field of the TWS operation. However, if no match is found for USER E-T pair 'OPCACMD jobname',
then TWS Automation will check for USER E-T pair 'OPCACMD OPCA', and if again no match is found, TWS
Automation will check for USER E-T pair 'OPCACMD subsystem'. Although user exit processing is designed
110 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
Non-Subsystem Operations
to be non-subsystem related, this approach provides flexibility for users who have jobnames that do not
match subsystems names but still prefer subsystem-related processing. There are however two
differences compared to subsystem-related requests:
• The only keyword that is needed is OPCACMD. OPCA and OPCAPARM are ignored.The CMD attributes of
the OPCACMD entry should have the following format:
CMD=(UXxxxxxx,,'userfunc &EHKVAR1')
In contrast to a subsystem operation, the request buffer for a non-subsystem operation contains the
entire request in one field. The format of the request buffer for 'UX' requests is described in Table 9 on
page 101.
Action Keyword/Data(partial)
CMD
(UXCICSOP,,'CICSOPEN &EHKVAR1')
CMD
(UXCICSCL,,'CICSCLOS EHKVAR1')
Figure 68 on page 112 shows the definition of the operation text and other fields in TWS.
The example uses the CICS subsystem name and the file name as parameters to the request. These
parameters are optional and flexible. Thus, the CICS name could also be passed through the Job name
field. The REXX code for CICSOPEN and CICSCLOS is supplied in the samples as EVJERUX2 and
EVJERUX3.
Action Keyword/Data(partial)
________ CMD
(UXIMSSDB,,'EVJERUX4 &EHKVAR1')
________ CMD
(UXIMSPDB,,'EVJERUX5 EHKVAR1')
Figure 70 on page 113 shows the TWS definition of the operation text and other fields.
112 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
Non-Subsystem Operations
The parameters of the request are the IMS subsystem name and the database name. The REXX code of
EVJRUX4 and EVJERUX5 is supplied in the samples.
114 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
Examples and Scenarios
116 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
Automated Recovery Functions
Here, NV00 maps to the NVTOR NetView domain ID, and the NV01 workstation maps to the XBAOF
NetView domain.
Under normal circumstances, each NetView domain ID represents a processor with its MVS operating
system and a unique NVxx general automatic reporting workstation. For situations such as testing,
backup, or work load management, this relationship needs no maintenance.
In the previous example, both NV00 and NV06 TWS-defined workstations represent their own specific
NetView domain, NVTOR and AOFS6, respectively.
Assume that the system represented by NVTOR has failed, and you make the decision to shift the work
load to the AOFS6 system. You can accomplish this by changing the domain ID in the first CODE
statement from NVTOR to AOFS6. This would imply that the AOFS6 domain is associated with two TWS
workstations, namely NV00 and NV06.
If you accomplish this change without altering the TWS definitions, you must reload the SA z/OS control
file. The scheduler or operator needs to ensure that the TWS-defined applications that are running in the
failed system are restarted on the backup system. Because the SA z/OS status records are on the failed
system, the scheduler manually recovers the failed environment. Once resynchronization completes, any
new scheduled event originally intended for the NetView domain ID NVTOR automatically is scheduled for
AOFS6. After you resolve the problem on the NVTOR system, perform the previous scenario in reverse
order to restore the system to its original configuration.
When double definitions of this type are used, exercise caution to avoid creating conflicting requests for
specific subsystems. For example, if RMF exists in the AOFS6 domain, TWS can then schedule a shutdown
request on NV00 and a start request on NV06.
The operator or scheduler can manually override the ended-in-error status, thus allowing the application
to continue or cancelling it.
118 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
Appendix A. 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:
For license inquiries regarding double-byte character set (DBCS) information, contact the IBM Intellectual
Property Department in your country or send inquiries, in writing, to:
Each copy or any portion of these sample programs or any derivative work must include a copyright
notice as follows:
© (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.
Applicability
These terms and conditions are in addition to any terms of use for the IBM website.
120 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
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
Except as expressly granted in this permission, no other permissions, licenses or rights are granted, either
express or implied, to the publications or any information, data, software or other intellectual property
contained therein.
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.
IBM MAKES NO GUARANTEE ABOUT THE CONTENT OF THESE PUBLICATIONS. THE PUBLICATIONS ARE
PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT,
AND FITNESS FOR A PARTICULAR PURPOSE.
124 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
• Those that include work and free days
• Those that include only work days.
Cyclic periods must always represent a fixed time period in days. For example, week (7 days).
D
daily plan
A set of plans that shows work that the operations department does on a particular day or shift. A list
by day and application of all operations to be performed within the operations department.
default calendar
(1) A calendar that you have defined for TWS to use when you do not specify a calendar in an
application description. (2) A calendar that TWS uses if you have neither specified a calendar in an
application description, nor defined your own default calendar.
deadline
See deadline date and “deadline time” on page 125.
deadline date
The latest date by that an occurrence must be complete by.
deadline time
The latest time by that an occurrence must be complete by.
defined
An open day status that indicates that specific open time intervals exist for a workstation on a
particular day.
dependency
A relationship between two operations where the first operation must successfully finish before the
second operation can begin.
dialog
The user’s online interface with TWS.
displacement
A number specifying ‘Number of Days from Period Start’ or ‘Number of Days from Period End’.
Sometimes called offset. See offset.
duration
The time an operation is active at a workstation.
E
edit
An ISPF/PDF dialog function that is used for editing text, collecting data, and modifying data.
end user
A person who uses the services of the data processing center.
ended in error (E)
The TWS reporting status for an operation that has ended in error at a workstation.
error code
The system completion code or program return code for automatic reporting workstations. The code
entered by the workstation operator for manually reporting workstations.
exclusive
The state of a special resource indicating that it is fully used by one operation and cannot be used
simultaneously by other operations.
exclusive resource
A workstation resource that is solely used by one operation and cannot be shared with other
operations.
expected arrival time
The time when an operation is expected to arrive at a workstation. It may be calculated by daily
planning or specified in the long-term plan.
126 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
internal dependency
A relationship between two operations within an occurrence where the first operation must
successfully finish before the second operation can begin.
internal predecessor
The name given to the operation of an internal dependency that must finish before its internal
successor can begin processing.
internal successor
The name given to the operation of an internal dependency that cannot begin until its internal
predecessor completes processing.
ISPF
Interactive System Productivity Facility.
interrupted (I)
a TWS reporting status for an operation indicating that the operation has been interrupted while
processing.
J
job
* A set of data that completely defines a unit of work for a computer. A job usually includes all
necessary computer programs, linkages, files, and instructions to the operating system. In TWS, an
operation performed at a CPU workstation.
job completion checker (JCC)
An optional function of TWS that provides an extended checking capability of the results from CPU
operations.
job control language (JCL)
* A problem-oriented language designed to express statements in a job that are used to identify the
job or describe its requirements to an operating system.
JES
Job Entry Subsystem.
job entry subsystem (JES)
* A system facility for spooling, job queuing, and managing I/O.
job setup
The preparation of a set of JCL statements for a job at a TWS workstation you defined for this purpose.
job submission
a TWS process that presents jobs to MVS for running on a TWS defined workstation at a time specified
in the daily plan.
JS
The JCL repository data set.
K
keyword
* A symbol that identifies a parameter. * A part of a command operand that consists of a specific
character string (such as DSNAME=).
keyword parameter
* A parameter that consists of a keyword, followed by one or more values.
L
LTP
Long-term plan.
last operation
(1) An operation in an occurrence that has no internal successor. (2) The terminating node in a
network.
latest start
The latest start day and time (calculated by TWS) for an operation that will allow all occurrences to
meet their deadline.
128 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
TWS host
The processor where TWS updates the current plan database.
TWS local processor
A processor that connects to the TWS host or remote processor through shared event data sets.
open time interval
The time interval during which a workstation is active and can process work.
operation
An operation is a unit of work that is part of an occurrence and is processed at a workstation.
operation waiting for arrival
The status of an operation that indicates that the necessary input has not arrived at a workstation so
that the operation can begin processing. This status is applicable only for operations without
predecessors.
operation status
The status of an operation at a workstation.
An operation’s status can be one of the following:
A
Waiting for input to arrive.
R
Ready for processing. All predecessors are complete.
*
Ready for processing. There is a nonreporting predecessor. All predecessors are complete but one
or more predecessors were executed at a nonreporting workstation.
S
Started.
I
Interrupted operation.
C
Complete.
E
Operation ended in error.
W
Waiting for predecessor to complete.
U
Undecided. The status is not known.
operator
* (ISO) A symbol that represents the action to be performed in a mathematical operation. * In the
description of a process, that which indicates the action to be performed on operands. * A person who
operates a machine.
option
A selection item on a menu panel in the TWS dialog.
origin date
The date that a period (cyclic or noncyclic) starts on.
P
panel
* A particular arrangement of presentation windows used to show information to the user. TWS uses
only fixed-format panels.
parallel operations
Operations at workstations that are not dependent on one another and therefore can be performed
simultaneously.
130 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
remote processor
A processor connected to the TWS host processor by a VTAM network.
remote job tracking
The function of tracking jobs on remote processors connected by VTAM links to a TWS controlling
processor. This function enables a central site to control the submitting, scheduling, and tracking of
jobs at remote sites.
replan current period
a TWS function that recalculates planned start times for all occurrences to reflect the actual situation.
reporting attribute
A code that specifies how a workstation will report events to TWS.
rerun
a TWS function where an application or part of an application that ended in error can be run again.
rescale factor
A value from 0 to 100 used to reduce the new duration value by a given percentage amount.
return code
An error code issued by TWS for automatic reporting workstations.
row command
A dialog command used to manipulate data in a table.
run cycle period
A time frame defining the effective period and run days of a calendar period.
run day
The date that an application is to run on. It is expressed as a number relative to the start or the end of
a run cycle period.
S
SAF
System Authorization Facility.
search argument
A value that is used to search the database for an item that is to be part of a displayed listing.
selection criteria
Search arguments entered on a list criteria panel in the dialog that limit the contents of a listing.
server
A program or device set up for a workstation to perform a service for that particular type of
workstation. For example, an initiator is a server for a computer workstation. A printer is a server for a
print workstation.
service functions
Functions of TWS that let the user deal with exceptional conditions such as investigating problems,
preparing APAR tapes, and testing TWS during implementation.
shared DASD
Direct access storage device that can be accessed from more than one processor.
shared resource
A special or workstation resource that can be used simultaneously by more than one operation while
the operation is processed at a workstation.
slack
Used to refer to ‘spare’ time. Can be calculated for the critical path by taking ‘Deadline less the Input
Arrival less the Sum of Operation Durations’.
smoothing factor
A value between 0 and 100 that controls the extent to which actual durations are fed back into the
application description database.
SMP
System Modification Program.
132 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
U
undecided (U)
a TWS reporting status for an operation or an application indicating that the status is not known.
update authority
Access authority given to a user by RACF to use the ISPF/PDF edit functions of the TWS dialog. Access
authority to modify a master file or data set with the current information.
V
validity period
The time interval defined by an origin date and an end date within which a run cycle or an application
description is valid.
versions
Applications with the same ID but different validity dates.
VSAM
Virtual Sequential Access Method.
VTAM
Virtual Telecommunication Access Method.
W
waiting (W)
a TWS reporting status (for an application) indicating that it is waiting for a predecessor operation to
complete.
waiting list
A list of submitted jobs that are waiting to be processed.
work day end time
The time at which TWS will consider a work day to have ended when that work day immediately
precedes a free day. For example, if you specify Saturday to be a free day, you could specify 08.00
hours. Saturday morning as the end of Friday’s work day. TWS can then plan work to be done from
00.00 to 08.00 Saturday morning, as if that time was actually part of Friday.
workstation
A unit, place, or group that performs a specific data processing function. A logical place where work
occurs in an operations department.
TWS requires that you define the following characteristics for each workstation: the type of work it
does, the quantity of work it can handle at any particular time, and the times it is active. The activity
that occurs at each workstation is called an operation.
workstation description database
a TWS database containing descriptions of the workstations in the operations department.
workstation resources
Limited resources defined for each workstation that an operation requires a certain amount of to
process work.
workstation type
Each workstation can be one of three types: computer, print, or general.
work day
A day that applications can normally be scheduled to start on.
C D
canceling a start or stop request 68
daily plan, extending 67
CNMCNETV module 81
data areas 99
command interface 4
data distribution, across multiple systems 12
command receiver, managing 34
defining
command request
application in TWS 64
asynchronous commands 88
automation operators 52
completion checking routine 73, 89
commands with an automation workstation 71
destination NetView 87
controller details 54
EQQUSINT 88
non-MVS subsystem for TWS command server 54
EQQUXSAZ exit 87
non-MVS subsystem for TWS request server 54
EVJESCMD routine 87
optional TWS workstations 53
EVJESCVY verification routine 87
SA z/OS batch job command receiver 6
flow 86
SA z/OS status observer 55
INGMOVE command 88
SA z/OS to Tivoli Workload Scheduler 5
INGREQ command 88
special resources policy 55
interface 3
subsystem messages/user data 55
return codes 88
system automation policy 51
synchronous commands 88
system details 55
commands
Tivoli Workload Scheduler to SA z/OS 5
concurrent 8
TWS controller subsystems 6
defining with an automation workstation 71
TWS data store 6
INGTWS 24, 35
TWS server 6
Index 135
defining (continued) G
TWS special resources 57
TWS tracker 6 general purpose Command receivers
TWS workstation user message policy 54 Command receivers, managing 33
workstation domain entries 54
destination NetView for command requests 87
disability xiii
I
disabling TWS Automation 51 INGMOVE command request 88
displaying INGREQ command request 88
current plan 18 INGTWS 24
TWS applications 19 INGTWS command 35
TWS calendars 23 INGTWS REQ=LIST 93
TWS operations 20 INGTWS REQ=MOD 95
TWS request 64 initialization
TWS special resources 21 TWS 79
TWS workstation 22 TWS Automation 79
installing TWS Automation 51
E interception, TWS alerts 9
enabling
TWS Automation 51
K
TWS special resources 57 keyboard xiii
entering TWS operations for applications 64
EQQUSIN service call 88
EQQUSINT service call 88 L
EQQUX007 exit 80
long term outage 116
EQQUXSAZ exit 87
loss of contact between TWS and TWS Automation 115
error codes
LPAR (logically partitioned mode), preparing 12
S998 82
S999 82
Sxxx 67 M
U003 82
UNTV 81 managing the TWS current plan 17
Uxxx 67 MESSAGES/USER DATA keywords
EVJEAC04 automation routine 101 OPCA 70, 71, 75
EVJECCAL 91 OPCACMD 70, 76, 110
EVJEOBSV automation routine 102 OPCAPARM 78, 108
EVJERCAL 91 MESSAGES/USER DATA policy item 70
EVJESCMD command request routine 87 modifying
EVJESCVY command request verification routine 87 current plan 24
EVJESPRQ request module 83 current plan, in line mode 24
EVJESPSC (status change module) 107 subsystem messages/user data 55
EVJESPSC status change module 84, 86 TWS applications using panels 26
EVJESPTE (timer module) 107 TWS operations using panels 26
EVJESPTE timer module 85, 86 TWS special resources using panels 28
EVJESPVY verify module 82 TWS workstations using panels 29
EVJRAC05 automation routine 102 monitor panel, TWS 31
EVJRSACT automation routine 102 multiple systems, data distribution across 12
EVJRSJOB automation routine 103 multiple TWS controllers
EVJTOPPI 81 communication flow 7
extending the daily plan 67 concurrent requests and commands 8
introduction 7
unique identity for TWS operations 7
F multiple TWS observers 9
filtering the current plan 18
flags N
completion 86, 107
timer 86, 107 naming convention
foreign controller, defined 4 TWS request 68, 69, 108
functions TWS workstation representing NetView domain 5, 61
SA z/OS to TWS 4 NetView domain, represented by TWS workstation 5, 61
TWS Automation 3 NetView PPI receivers 33
TWS to SA z/OS 3
136 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
O program-to-program interface (continued)
EVJTOPPI 81
online databases, cycling individually 11 receivers, managing 33
online hours of availability, changing 11 request receiver 33
online services, hours of availability 11
OPC SYSTEM DETAILS policy object 55
OPCA 75
R
OPCACAL 91 receiver
OPCACMD (MESSAGES/USER DATA keyword) 76 command 34
OPCACMD command 35 NetView PPI 33
OPCACMD, MESSAGES/USER DATA keyword 70 request 33
OPCACOMP 92, 99, 108 SA z/OS batch job command, defining 6
OPCALIST 93 recovery
OPCAMOD 95 application 13
OPCAPARM 78, 108 of TWS and TWS Automation 115
OPCAPOST command REQCOMP 99
description 44 request receiver, managing 33
manually posting events 4 requestor ID block 99
OPCAPOST command processor 85 requests, concurrent 8
OPCAPOST common routine 98 resynchronization of TWS and TWS Automation 115
OPCAPOST module 83, 85 return codes, command request 88
OPCAQRY command 44 RMTCMD, security considerations 53
oper command to select TWS operations 64
outage 116, 118
S
P SA z/OS
defining Tivoli Workload Scheduler to 5
panels functions to TWS 4
EVJFILT 18, 35 SA z/OS batch job command receiver, defining 6
INGTWS 35 SA z/OS status observer
INGTWS, filter selection 18, 35 defining 55
INGTWS, REQ=LIST TYPE=APPL 35 scheduling time for testing 12
INGTWS, REQ=LIST TYPE=CAL 35 security considerations, RMTCMD 53
INGTWS, REQ=LIST TYPE=OP 35 selecting TWS controller
INGTWS, REQ=LIST TYPE=SR 35 to access 17
INGTWS, REQ=LIST TYPE=WS 35 selecting, TWS controller
OPCAQRY 45 indirectly 17
SA z/OS/TWS – Main Menu 43 using application groups 17
Status Display Facility 31 using multiple resource definitions 17
TWS Application Modification 26 using wildcards 17
TWS Applications Interface 19 shortcut keys xiii
TWS Calendar Interface 23 special resources 10
TWS Monitor Panel 31 special resources policy, defining 55
TWS Operations Interface 20 specifying TWS resource data 24
TWS Operations Modification 26 SRSTAT 47
TWS Special Resources Interface 21 start request, canceling 68
TWS Special Resources Modification 28 status
TWS Workstations Interface 22 of SA z/OS subsystem 69
TWS Workstations Modification 29 of TWS operation 67, 80
using to modify TWS applications 26 status change module (EVJESPSC) 107
using to modify TWS operations 26 status change module, EVJESPSC 86
using to modify TWS special resources 28 Status Display Facility
using to modify TWS workstations 29 monitoring resources with 31
policy objects status panels 31
CONTROLLER DETAILS 54 stop request, canceling 68
OPC SYSTEM DETAILS 55 structure of TWS request automation 79
TWS SPECIAL RESOURCES 55 subsystem messages/user data
USER E-T PAIRS 75, 76 defining 55
WORKSTATION DOMAINS 54, 61 modifying 55
PPI 9 subsystem operations, request buffer layout 100
preparing an LPAR for testing 12 synchronous commands 88
program-to-program interface system automation policy, defining 51
command receiver 34 system details, defining 55
dispatcher 81
Index 137
systems, policy items TWS observer, multiple 9
CONTROLLER DETAILS 54 TWS operation
OPC SYSTEM DETAILS 55 displaying 20
WORKSTATION DOMAINS 54 entering for applications 64
job name field 70
modifying using panels 26
T operation text field 70
task globals, completion checking routine 73 selecting with oper comand 64
text command, using to enter TWS requests 64 states 67
time dependencies 66 unique identity with multiple TWS controllers 7
timer flag 86, 107 TWS request
timer module automation, structure of 79
standard EVJESPTE module 85, 86 buffer, standard subsystem operations 100
standard module (EVJESPTE) 107 default START/STOP 68
user-defined displaying 64
format of call 107 entering as operation text 64
Tivoli Workload Scheduler example 63
alerts, interception 9 naming conventions 68, 69, 108
API (application program interface) 4 non-subsystem 69, 108
application defined in 64 parameters 71
defining SA z/OS to 5 server, defining non-MVS subsystem for 54
functions to SA z/OS 3 subsystem-related
monitor panel 31 requiring user programming 69, 107
recovery 115 using standard functions 69, 107
resynchronization with TWS Automation 115 types 68
TWS applications using text command 64
displaying 19 TWS resource data, specifying 24
modifying using panels 26 TWS server, defining to SA z/OS 6
TWS Automation TWS special resources
backup 116 defining 57
connectivity loss 117 displaying 21
disabling 51 enabling 57
enabling 51 modifying using panels 28
functions of 3 status updates with multiple controllers 9
installing 51 using 57
long term outage 116 using in an application 57
loss of contact to TWS 115 TWS tracker, defining to SA z/OS 6
OPCAPOST 85 TWS workstation
outage 116, 118 defining 53
possible uses of 10 defining user message policy 54
recovery 115 displaying 22
request module, EVJESPRQ 83 modifying using panels 29
resynchronization with TWS 115 representing NetView domain
special resources 10 naming conventions 5, 61
status change module, EVJESPSC 84 time dependency 66
timer module, EVJESPTE 85 TWS-defined applications 62
verify module, EVJESPVY 82
TWS calendars, displaying 23 U
TWS command server, defining non-MVS subsystem for 54
TWS control information 55, 105, 106 USER E-T PAIRS 75, 76
TWS controller using
multiple 7 TWS special resources 57
multiple, communication flow 7 TWS special resources, in an application 57
selecting
indirectly 17
to access 17
V
using application groups 17 variables
using multiple resource definitions 17 &EHKVAR1 69, 71, 111
using wildcards 17 &EHKVAR2 69, 71, 111
subsystems, defining to SA z/OS 6 &EHKVAR7 108
TWS current plan &EHKVAR8 108
managing 17 &EHKVAR9 108
TWS data store, defining to SA z/OS 6 verify module, EVJESPVY 82
TWS monitor panel 31
138 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
W
workstation domain entries, defining 54
WORKSTATION DOMAINS 61
WORKSTATION DOMAINS policy object 54
workstation, automation, defining a command with 71
Index 139
140 System Automation for z/OS : TWS Automation Programmer’s Reference and Operator’s Guide
IBM®
SC34-2749-01