TWS Overview
TWS Overview
August, 2010
Prepared By:
Athie Moore
Brent Newhouse
Version 1.0
Topics
1
General TWS Concepts
TWS stands for Tivoli Workload Scheduler
The Tracker(s) monitor and log the status of work, then pass the
status information to the controller via shared DASD, XCF, or
ACF/VTAM.
2
TWS Terminology
Operation An operation is a unit of work scheduled through TWS. The majority of work
will be batch jobs. In addition dummy jobs, manual holds, JCL setups,
started tasks and other types of events may be scheduled. Each is
considered an Operation
Runcycle Defines when an Application and its related operations will be scheduled.
IAT Input Arrival Time - Defines the time of day to be associated with each run of
an application. The input arrival time forms part of the key that uniquely
identifies each occurrence on the current plan or long term plan. It is not
necessarily the time TWS attempts to start the first operation in the
occurrence.
Current Plan This is where your daily workflow will be stored. One time changes are made
to the current plan. The CP is usually extended every workday for 24 work
hours.
Long Term The LTP contains the high level plan of applications to be scheduled. It is
Plan built from the Applications Description database and then serves as input to
the Current Plan. The typical LTP length is 4 to 8 weeks into the future.
Occurrence An application on the current plan or long term plan is referred to as an
occurrence. When adding applications, each one added is considered a
unique occurrence of that application.
(i.e. date and time are unique for a each occurrence of an application)
3
TWS Main Menu
The following can all be reached directly from the main menu:
0 Options
Set System and user preferences
=1.1 Workstations
Create or Modify Workstations assigned to an operation
=1.2 Calendars
Create or Modify Calendars assigned to Applications
=1.3 Periods
Create or Modify definitions for special date(s) processing
=1.4 Applications
Create or Modify an application
=1.7 ETT
Define Event Trigger Tracking - adds an application to the Current Plan
4
=2 Long Term Planning
=3 Daily Planning
Options 0
Before you can access TWS you will need to set your subsystem to point to the correct
TWS Controller.
This can be done by entering 1 on the option line as shown in the example below.
Update the controller name to OPCB for BRAC. You can also update the description as
has been done in this example.
Please note that other user preferences may also be updated from this screen such
as date and time format.
5
Workstations =1.1
Reporting Attributes:
A - Automatic
The status change of operations is normally reported automatically, in response to event records
created by the TWS JES and SMF exits.
C - Completion Only
This reporting attribute is normally used for general workstations that are not used for JCL
preparation.
N - Nonreporting
Operations on a nonreporting workstation are set to complete as soon as they become eligible to
be started.
6
S - Start and Complete
This reporting attribute is normally used for general workstations that are used for JCL
preparation
Calendars = 1.2
The calendar specifies normal working days and public holidays. Tivoli Workload
Scheduler for z/OS uses the calendar to determine when applications are
scheduled, and to calculate dates for JCL tailoring.
If you do not specify the BATCHOPT CALENDAR parm, TWS looks for a
calendar called DEFAULT.
If you do not define a Calendar called DEFAULT, TWS assumes all days are
workdays.
7
Periods =1.3
A CYCLIC period starts on a specific date and has the same number of days in
each interval. There are two kinds of CYCLIC periods:
TWS will NOT schedule any applications after the last non-CYCLIC interval start
date you specify, unless you also code an interval end date for that last interval.
8
Building an Application =1.4.3
Use the OPER command to define you operations (Jobs) (WHAT and WHERE).
Use the RUN command to create a Run Cycle (WHEN it will be loaded to the
Current Plan).
When a Run Cycle is left blank, the application is considered an "on request"
schedule.
Owner ID: consider a standard for the owner id field. Used for security purposes
as well as mass updating.
Use a priority of '5' for applications. The TWS Priority field is NOT the JES job
priority.
Valid From: can be used with a copied application (with modifications) to replace
the existing application on a specific date or range of dates.
Application types:
9
G- Group applications contain ONLY Run Cycle definition(s).
Defining Operations
Use the PRED/TEXT command to toggle between the Operation Text view and
Predecessor view.
Operation numbers are used to set prececessors. TWS will fill in the leading
zeros: (3) to (003)
Predecessors:
Note: If you delete an Application, any external predecessors that reference that
application will show as *NOTFND* (Pred Not Found).
10
Operation Details "Options" S.4 Row Command
Set Time Dependent =Y in Details Options (S.4) to have this operation wait until
the IAT set at the application level.
11
Operation Details "Time" S.6 Row Command
You can override the application IAT as the submit time by updating the
Operation input arrival day and time in (S.6). These "Time / Day Specifications"
override the Application's Run Cycle IAT and Deadline.
Note: The Operation submit time should be later than the Application IAT.
12
Restart Cleanup Options S.9 Row Command
Specify the Restart and Cleanup options for each operation defined in an
Application
You can specify the cleanup action to be taken on specific operations running on
z/OS. Restart and Cleanup is not available for operations running on non-z/OS
platforms.
M - Manual: dataset cleanup actions are deferred for the operation. They will be
performed when initiated manually from the dialog.
N - None: dataset cleanup actions are not possible for the operation if it ends
in error or is rerun (no dataset info is maintained by TWS.)
Expanded JCL: Specify if TWS will use the JCL extracted from JESJCL sysout:
Y - Use the fully Expanded JCL.
N - Use the JCL contained in OPC libraries.
13
Suggested values: Cleanup Type = A, Expanded JCL = N, User Sysout =N
The Run Cycle "Rule Text" name is determined by the production control staff.
Each Run Cycle within an Application must have a unique "Rule text" label (no
dupes.)
Rule Based - you define the run days based on Frequency, Day, and Cycle
criteria
Offset Based - older technology - uses a period to determine the offset from the
start of the period
Freeday rules are used to determine how an application schedules in the Current
Plan if it's a non-working day. The Freeday rule will check the calendar defined to
this application.
TWS will automatically insert the "In effect" and "out of Effect" date fields if you
press enter
Defaults: Type = R ; F day rule = 4 ; In Effect date = today ; Out of Effect date = 2071/12/31
FreeDay Rules
1 - Run Before (prior workday)
2 - Run After (next workday)
14
3 - Run on Free (Run on the free day / holiday)
4 - Don't schedule on freeday (do not run on free day / holiday)
Modify a Rule
Use the Gendays command to see a graphical calendar display (current plus 3
years in future.)
Use the "E" command line command to set up interval processing for the
Application
15
Gendays result
16
Daily Planning
LTP Extend - This is a batch process that reads the TWS Application
Database and rebuilds the long term plan database selecting those
applications that are eligible for its defined time period. The plan can
be extended to a period of time from 1day up to 4 years. Most plans
are extended out 45 days.
17
Daily Planning Cont.
18
Status of the Current Plan =6.6
Use option 6.6 to list the general status of the Current Plan. The
Current Plan is considered expired if the Planning Period End Time
has passed.
19
Helpful screens for Op’s and Scheduling
=6.6 General
View General information about the Current Plan
20
Ready List =4.1
The ready list is used to monitor day to day operations. The layout ID
will allow you to switch between multiple headings.
The ready list is used to view operations that are (ready). You will not
see any batch jobs that have completed or jobs that are waiting on
predecessors.
The ready list is basically a VIEW dialog. You can change the status
of operation in the ready list but, it is suggested that you make
modifications to CPU type operations in =5.3
This is the only dialog that you will see both the status and extended
status on the same panel. Browse the operation for details of each
status.
The "N" next logical status should only be used for NON-CPU type
workstations.
21
Operation Details I Row Command
Selecting an Operation for more detail will display the dialog above.
Additional information regarding the operation can be found here. If a
list of all related operations is desired, select option 9. The status and
extended status are displayed here.
22
Adding an Occurance =5.1
You may add an application to the Current Plan via the 5.1 option.
The application may contain one or more operations. An application
on the current plan is referred to as an Occurrence.
The occurrence is added when you PF3 out. You will also receive a
message stating that the occurrence has been added.
23
Adding an Occurrence Cont.
The date and time fields are filled in for you when the production
scheduler has created a Runcycle for the application you are adding.
Occurrence's must have a unique Input Arrival Date and Time. When
adding an Application Occurrence, it cannot pre-exist at the same
date and time on the Current Plan.
24
Listing Occurences =5.2
The "List Occurrence" dialog may be used to view the status of the
whole application.
This will give you a high level overview of your daily workflow.
Status
C All operations in the occurrence are complete
E One or more operations in the occurrence are in error
S One or more operations have been submitted
U Undecided (the status is not known)
W No operations in the occurrence have started.
25
Listing Operations =5.3
Use option 5.3 if you prefer a more global view of all operations on the current
plan. Many filters are in place to see only desired information. Example: only
operations that begin with PAY*, only completed operations, etc.. One
consideration, the DEL command will delete the entire application.
Use the "Listing Operations" panel to view or modify operations. You have full
control over an operation defined to the current plan.
Any changes to an operation are considered a one time temporary change to that
operation.
Use the "M" row command to make modifications to the operation. You can
change the time, dependencies, JCL or special resources for that particular
operation.
Use the "B" row command to view operations detail. The browse command gives
you additional options such as viewing internal dependencies (found within that
application) as well as external dependencies (found in other applications).
Row commands can be fast pathed, example: B.9 row command to list all
dependencies
Use the "SORT" primary line command to display your results according to your
personal preferences
26
Error Handling =5.4
27
Error Handling Cont.
Restart Types
RC - Restart Cleanup
Step Level (option 1) Use the Step Level restart option if the job requires you to
restart at a specific step. TWS will provide a Best Step suggestion that can be
overridden if required. Dataset cleanup (EQQCLEAN) will occur based on the
step selected and the restart cleanup definition for the operation.
Job Level (option 2) Use the Job Level restart option if your job requires a
restart from the first step. Dataset cleanup (EQQCLEAN) will occur before the job
restarts based on the restart cleanup definition for the operation.
28
Job and Step Level Restarts Key Points
You are editing a copy of the JCL from the original execution of the
job. This JCL is stored in a VSAM dataset called the JS (JCL
Repository) dataset.
If you receive a request to use JCL from a different JCL Library, enter
"D999" in the editor to delete the existing JCL that resides in the JS
file. Enter the COPY command to pull the JCL from a user defined or
requested library. If a fresh copy of the Production JCL is required,
issue the "D999" row command, PF3 out. If you want to review the
JCL before the rerun, then issue a "J" row command once again.
Ensure that the Job name/Member name match, if the JCL was
copied from another source. If the Job name/member name are a
mismatch you will receive an OSUF error code.
From time to time, an end user may indicate that they have taken
care of the abend or request that the job be bypassed. In this case,
go to the error list (=5.4), find the abended job and complete it with a
"C" row command.
Warning - A CMP row command will not only complete the abended
job but complete the entire application.
If the restart fails a second time, the JCL found in the JS Dataset is a
copy of the restarted Job.
29
Restart Cleanup =5.4
This view shows all jobs that are in abend status. You will notice that the
extend command was issued to expand the details of all the available
commands.
NOTE: RC has been entered on the row command line for job BANTEST6.
This will begin the restart cleanup process for that job.
30
Restart Cleanup Cont.
Points:
Restart and cleanup are basically two tasks:
Restarting an operation at the job-level or the step-level
Cleaning up the associated data sets
Edit JCL: Specify if you want to edit the JCL before restarting the
operation.
31
Restart Cleanup Cont.
Once 1 is entered for step restart you will receive the following message in the
Upper right corner of the screen. Joblog Info Requested.
Once you receive the a message stating the joblog has been retrieved place a
1 in the option field and press enter
32
Restart Cleanup Cont.
The step restart screen will be received. One item of note is the message in the
upper right hand corner. ‘STEPRESCHK(NO) USED.’ This will allow you to
restart the job in any step, not just the step the job failed in.
Once you have located the step you want to restart in enter ‘S’ in the user select
column and the word ‘GO’ in the command field and press enter.
Notes:
The additional steps of the job can be view by pressing PF8 prior to entering go
Restart Cleanup will also flag the best step for restart with a ‘B’ in the restart
column. You are not required to use this step; it is just the most logical step for
the restart.
33
Restart Cleanup Cont.
The edit JCL screen is then received. Modify the JCL on this screen.
Once you have completed your changes type ‘GO’ on the command line and
press enter.
34
Restart Cleanup Cont.
The confirm restart screen is displayed. Enter a ‘Y’ on the command line to
proceed. You may also enter any comment in the reason for restart field. This is
a free form text field.
35
Restart Cleanup Cont.
Once the cleanup restart process has end you will receive a Completed message
in the Cleanup Result field. You may then press PF3 to exit the restart cleanup
process.
36
Step by Step list of Restart Cleanup
Step Level Restart
Step 2: Enter the "RC" row command for a step level restart
Step 9: Review or modify the JCL for restart (resolve the error if JCL
related)
Step 11: Enter "Reason for Restart", then "Y" to confirm the step
restart
37
Job Level Restart Cleanup
Note: Use the Simple Job Restart "SJR" row command to set an
operation status to Ready. Use SJR ONLY when you get a
syntactical JCL error and the job did not execute ANY steps on
the original run.
Step 1: Correct the cause of the error ,select the "J" row command
to edit the JCL if required
Step 3: Enter "Reason for restart", then enter "Y" to confirm the
restart
Job Restart
Step 1: Enter the "RC" row command next to the failed job
Step 8: Enter "Reason for Restart", then enter "Y" to confirm the
restart
=4.1 - READY LIST - The ready list contains operations that have NO
outstanding predecessors. Operations
on the ready list may be waiting for time or a resource.
The ready list also shows operations that have started or have ended in error.
=5.4 - ERROR LIST - Use this dialog to perform all rerun/restarts. Multiple
options are available to the user at both the Operations level and Occurrence
level.
39
Scheduling Tips
External Dependency
To set a specific operation IAT, use the details TIME selection (s.6)
Place meaningful text in the operation text field for MANUAL operations
40
Operator Tips
Operation statuses
Don't Delete Operations in the CP; either change to NONR or use the NP cmd
TWS will not cancel jobs once submitted to JES - i.e., setting an operation to
Complete does NOT cancel the job in JES
The correct startup sequence is Tracker(s) tasks first and then the Controller
Note: If Data Store is used the sequence is Tracker(s), Data Store, Controller
The correct shutdown sequence is Controller task first then the Tracker(s)
Note: If Data Store is used the sequence is Controller, Data Store, Tracker(S)
It is possible to have the Tracker tasks up and available without the Controller.
This scenario will allow job tracking but no job submission.
With TWS you don't add a job, you add an Application. You may add an
operation to an existing application on the Current Plan.
41
Operation Status Codes
S Started
C Complete
D Deleted
D Closedown in progress.
U Submit in progress
42
TWS Error Codes
CAN - The job or started task was canceled by the operator or by a
TSO user before execution. This code is also possible if the
job-termination event (type 3P) is missing.
CCUN - The completion code is unknown. The job or started task has
ended, but no completion code is available. This code is also
possible if the job-end event (type 3J) is missing.