135
Tivoli ® Workload Scheduler Version 8.5.1 (Revised May 2010) Scheduling Workload Dynamically SC23-9856-01

awsbrmst-fp1

Embed Size (px)

Citation preview

Page 1: awsbrmst-fp1

Tivoli® Workload SchedulerVersion 8.5.1 (Revised May 2010)

Scheduling Workload Dynamically

SC23-9856-01

����

Page 2: awsbrmst-fp1
Page 3: awsbrmst-fp1

Tivoli® Workload SchedulerVersion 8.5.1 (Revised May 2010)

Scheduling Workload Dynamically

SC23-9856-01

����

Page 4: awsbrmst-fp1

NoteBefore using this information and the product it integrations, read the information in “Notices” on page 113.

This edition applies to version 8 release 5 modification level 1, Fix Pack 1 of IBM Tivoli Workload Scheduler(program number 5698-WSH) and to all subsequent releases and modifications until otherwise indicated in neweditions.

This edition replaces SC23-9856-00.

© Copyright IBM Corporation 2009, 2010.US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contractwith IBM Corp.

Page 5: awsbrmst-fp1

Contents

Figures . . . . . . . . . . . . . . . v

Tables . . . . . . . . . . . . . . . vii

About this publication . . . . . . . . ixWhat is new in this release . . . . . . . . . ixWhat is new in this publication for version 8.5.1.1 . ixWho should read this publication . . . . . . . ixWhat this publication contains . . . . . . . . xPublications . . . . . . . . . . . . . . xAccessibility . . . . . . . . . . . . . . xTivoli technical training . . . . . . . . . . xiSupport information . . . . . . . . . . . xi

Chapter 1. Understanding dynamicworkload scheduling . . . . . . . . . 1Dynamic workload broker architecture . . . . . 2Authorization and roles. . . . . . . . . . . 5

Managing users and roles . . . . . . . . . 7Authorization with WebSphere global security . . 8

Scheduling J2EE jobs . . . . . . . . . . . 9Defining specific job types . . . . . . . . . 11

TWSExecutable Java interface . . . . . . . 19A business scenario. . . . . . . . . . . . 20

The business . . . . . . . . . . . . . 20The challenge. . . . . . . . . . . . . 20The solution . . . . . . . . . . . . . 21

Chapter 2. Using dynamic workloadbroker to run Tivoli WorkloadScheduler jobs . . . . . . . . . . . 27Modifying your existing workload definitions foruse with dynamic workload broker . . . . . . 28

Planning and considerations . . . . . . . . 28Adapting Tivoli Workload Scheduler jobs fordynamic workload broker . . . . . . . . 28Using Tivoli Workload Scheduler variables indynamic workload broker jobs . . . . . . . 31

Creating Tivoli Workload Scheduler jobs managedby dynamic workload broker . . . . . . . . 32Using variables in jobs . . . . . . . . . . 33Defining affinity relationships . . . . . . . . 34Alias definition in Tivoli Workload Scheduler . . . 34Scenario: A job exploiting the strengths of TivoliWorkload Scheduler and dynamic workload broker . 35Monitoring and cancelling jobs . . . . . . . . 36

Chapter 3. Identifying the resources forjobs . . . . . . . . . . . . . . . . 39Checking physical resources on computers . . . . 40Creating logical resources. . . . . . . . . . 42Creating resource groups . . . . . . . . . . 44

Chapter 4. Writing JSDL definitionswith the Job Brokering DefinitionConsole . . . . . . . . . . . . . . 47Job definitions . . . . . . . . . . . . . 49Resources in the job definition . . . . . . . . 53Using variables in job definitions . . . . . . . 57Using JSDL job definition templates . . . . . . 57Scenarios for creating job definitions . . . . . . 60

Scenario: Creating a job definition using acomputer resource group . . . . . . . . . 61Scenario: Creating a job definition using a logicalresource group . . . . . . . . . . . . 62Scenario: Creating a job definition for a job torun on x86 processors . . . . . . . . . . 63Scenario: Creating a job definition for a script torun on a specific operating system. . . . . . 64Scenario: Alternative operating systemrequirements . . . . . . . . . . . . . 65

Chapter 5. Submitting and trackingjobs . . . . . . . . . . . . . . . . 69Submitting jobs . . . . . . . . . . . . . 69Submitting jobs with affinity relationships . . . . 70

Submitting a job with affinity from the TivoliDynamic Workload Console . . . . . . . . 71Submitting a job with affinity from the commandline . . . . . . . . . . . . . . . . 71

Submitting jobs with variables . . . . . . . . 72Submitting a job with variables from the TivoliDynamic Workload Console . . . . . . . . 72Submitting a job with variables from thecommand line . . . . . . . . . . . . 73

Job statuses . . . . . . . . . . . . . . 73Monitoring submitted jobs . . . . . . . . . 74

Chapter 6. Using the command lineinterface . . . . . . . . . . . . . . 77Command-line configuration file . . . . . . . 78exportserverdata command - downloading the listof workload broker instances from the database . . 81importserverdata command - uploading the list ofworkload broker instances to the database . . . . 83jobsubmit command - Submitting jobs . . . . . 84jobquery command - Performing queries on jobs . . 86jobdetails command - Viewing details on jobs . . . 90jobcancel command - Canceling jobs . . . . . . 92jobstore command - Managing job definitions . . . 93jobgetexecutionlog command - Viewing job output 95movehistorydata command - Maintaining thedatabase tables . . . . . . . . . . . . . 96resource command - Working with resources . . . 98

Running the resource command from an agent 105

Appendix A. Accessibility . . . . . . 107

© Copyright IBM Corp. 2009, 2010 iii

11

1111

11

Page 6: awsbrmst-fp1

Navigating the interface using the keyboard . . . 107Magnifying what is displayed on the screen . . . 107

Appendix B. Support information . . . 109Searching knowledge bases . . . . . . . . . 109

Searching the information center . . . . . . 109Searching the Internet . . . . . . . . . 109

Obtaining fixes . . . . . . . . . . . . . 109Receiving weekly support updates . . . . . . 110Contacting IBM Software Support . . . . . . 110

Determining the business impact . . . . . . 111Describing problems and gathering information 112Submitting problems . . . . . . . . . . 112

Notices . . . . . . . . . . . . . . 113Trademarks . . . . . . . . . . . . . . 115

Index . . . . . . . . . . . . . . . 117

iv IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 7: awsbrmst-fp1

Figures

1. The dynamic workload broker components. 32. Resource requirements for the Inventory item

update job . . . . . . . . . . . . . 233. Matching resources for the day-end jobs 24

4. Optimization instructions for a job . . . . . 255. Computer Search Results page . . . . . . 426. Job Brokering Definition Console main page 52

© Copyright IBM Corp. 2009, 2010 v

Page 8: awsbrmst-fp1

vi IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 9: awsbrmst-fp1

Tables

1. Authorized operations by user groups . . . . 62. Tivoli Workload Scheduler roles. . . . . . . 83. Dynamic workload broker roles. . . . . . . 84. Supported J2EE operations . . . . . . . . 95. Variables in the CelsiusToFahrenheit.jsdl

sample file . . . . . . . . . . . . . 126. Variables in the DBQuery.jsdl sample file 127. Variables in the DownloadFile.jsdl sample file 138. Variables in the GetQuote.jsdl sample file 149. Variables in the JavaJob.jsdl sample file 14

10. Variables in the MSSQLJob.jsdl sample file 1511. Variables in the MSSQLJobQuery.jsdl sample

file . . . . . . . . . . . . . . . 1512. Variables in the NumberToString.jsdl sample

file . . . . . . . . . . . . . . . 15

13. Variables in the PrimeNumber.jsdl sample file 1514. Variables in the UploadFile.jsdl sample file 1515. Variables in the WSGeneric.jsdl sample file 1616. Day-end jobs and requirements . . . . . . 2217. Supported Tivoli Workload Scheduler variables

in JSDL definitions. . . . . . . . . . . 3118. Status mapping between dynamic workload

broker and Tivoli Workload Scheduler . . . 3619. Resource types and properties . . . . . . 4820. Resource types and properties . . . . . . 5321. Job status . . . . . . . . . . . . . 7022. Job statuses and supported operations . . . 7323. Dynamic workload broker commands. . . . 77

© Copyright IBM Corp. 2009, 2010 vii

1111111111111111111

111111

Page 10: awsbrmst-fp1

viii IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 11: awsbrmst-fp1

About this publication

This guide explains how to dynamically allocate resources to run your workloadusing the services of the dynamic workload broker component of Tivoli WorkloadScheduler.

Dynamic workload broker is an on-demand scheduling infrastructure whichprovides dynamic management of your environment.

What is new in this releaseFor information about the new or changed functions in this release, see TivoliWorkload Automation: Overview.

For information about the APARs that this release addresses, see the Tivoli®

Workload Scheduler Download Document at http://www.ibm.com/support/docview.wss?rs=672&uid=swg24024804, and Tivoli Dynamic Workload ConsoleDownload Documents at http://www.ibm.com/support/docview.wss?rs=672&uid=swg24024805.

What is new in this publication for version 8.5.1.1A new section in chapter 1, “Understanding dynamic workload scheduling”,describes how to define and schedule dynamic jobs to perform specific database,file transfer, Java, and Web services operations. It describes the job types, theprovided JSDL samples, and explains the procedure for creating your own jobs.

Variable tws.job.interactive was added in table "Supported Tivoli WorkloadScheduler variables in JSDL definitions" in section "Using Tivoli WorkloadScheduler variables in dynamic workload broker jobs" in chapter 2, "Usingdynamic workload broker to run Tivoli Workload Scheduler jobs".

The description for the resource command was updated with the addition ofsection "Running the resource command from an agent" that documents this newfeature in chapter 6, "Using the command line interface".

All updates are marked with a 1 (one) on the left page margin.

Who should read this publicationThis guide is intended for administrators responsible for defining user roles andperforming high-level tasks and for operators responsible for creating andsubmitting jobs.

Readers should be familiar with the following topics:v Working knowledge of IBM Tivoli Workload Schedulerv PC and UNIX operating systemsv Graphical and command line interfaces

© Copyright IBM Corp. 2009, 2010 ix

1

1111

1111

111

1

Page 12: awsbrmst-fp1

What this publication containsThis guide contains the following chapters:v Chapter 1, “Understanding dynamic workload scheduling”

Describes how dynamic workload scheduling works and how the new dynamicworkload broker component is structured within Tivoli Workload Scheduler.

v Chapter 2, “Using dynamic workload broker to run Tivoli Workload Schedulerjobs”Describes how to adjust your existing job definitions to run your workloaddynamically.

v Chapter3, “Identifying the resources for jobs”Describes how to create physical and logical resources.

v Chapter 4, “Writing JSDL definitions with the Job Brokering Definition Console”Describes how to use the Job Brokering Definition Console to create JSDL jobdefinitions, how to simulate "templates" that help you match multiple jobs witha single JSDL definition, and includes several scenarios that demonstrate how toconfigure your jobs to achieve specific objectives.

v Chapter 5, “Submitting and tracking jobs”Describes how to submit jobs to be run on resources that are automaticallyallocated. It also describes how to monitor jobs and their status.

v Chapter 6, “Using the command line interface”Describes how to manage jobs submitted for dynamic scheduling using thecommand line of dynamic workload broker.

PublicationsFull details of Tivoli Workload Scheduler publications can be found in TivoliWorkload Automation: Publications. This document also contains information on theconventions used in the publications.

A glossary of terms used in the product can be found in Tivoli Workload Automation:Glossary.

Both of these are in the Information Center as separate publications.

AccessibilityAccessibility features help users with a physical disability, such as restrictedmobility or limited vision, to use software products successfully. With this product,you can use assistive technologies to hear and navigate the interface. You can alsouse the keyboard instead of the mouse to operate all features of the graphical userinterface.

x IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 13: awsbrmst-fp1

Tivoli technical trainingFor Tivoli technical training information, refer to the following IBM® TivoliEducation Web site:

http://www.ibm.com/software/tivoli/education

Support informationIf you have a problem with your IBM software, you want to resolve it quickly. IBMprovides the following ways for you to obtain the support you need:

OnlineGo to the IBM Software Support site at http://www.ibm.com/software/support/probsub.html and follow the instructions.

IBM Support AssistantThe IBM Support Assistant (ISA) is a free local software serviceabilityworkbench that helps you resolve questions and problems with IBMsoftware products. The ISA provides quick access to support-relatedinformation and serviceability tools for problem determination. To installthe ISA software, go to http://www.ibm.com/software/support/isa.

Troubleshooting GuideFor more information about resolving problems, see the problemdetermination information for this product.

Training

About this publication xi

Page 14: awsbrmst-fp1

xii IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 15: awsbrmst-fp1

Chapter 1. Understanding dynamic workload scheduling

The dynamic workload broker component of Tivoli Workload Scheduler is anon-demand scheduling infrastructure which provides dynamic management ofyour environment. It improves workload coordination, job throughput, andoperations control, and helps to better align IT with business objectives to improveperformance and reduce costs. It optimizes the use of the IT infrastructure byconstantly analyzing your environment to maintain an up-to-date view of theresources available and matching them to the requirements defined for each job.

The dynamic workload broker Resource Repository in the Tivoli WorkloadScheduler database stores extensive information about the resources available forrunning jobs in your environment, as follows:

Physical resourcesHardware and operating system information is collected by a hardwarescan that is regularly run by the Tivoli Workload Scheduler agents. Newresources are automatically discovered and integrated in the schedulingenvironment so that jobs can run automatically on these resources.

Logical resourcesLogical resources represent resources in your environment that cannot bediscovered by the scan and that might be required when running a job. Forexample, logical resources can be set up to represent software licenses. Youcan use a task on the Tivoli Dynamic Workload Console to define thelogical resources that you need to accurately describe the requirements ofjobs in your environment.

To use the dynamic workload broker capability, you must match the TivoliWorkload Scheduler job definitions with dynamic workload broker job definitions.A dynamic workload broker job definition contains all the information required todetermine the computer system or systems on which a job could run, anyscheduling and job balancing rules that are to be applied when allocatingresources, timeout limits, and any recovery actions to be taken in case of failure, aswell as the information required to identify and run the application. You writedynamic workload broker job definitions in Job Submission Description Language(JSDL) using the Job Brokering Definition Console, an easy-to-use user interfacepackaged with the product.

When a job is submitted, dynamic workload broker analyzes job requirements andevaluates resources based on the job definition. If a job must run on the sameresource as a previously submitted job, you can provide this information duringsubmission by creating an affinity relationship. After the job is launched, you canmonitor its progress.

Thus, if you do install the dynamic scheduling capability of Tivoli WorkloadScheduler, you successfully enhance the scheduling and choreography capabilitiesof Tivoli Workload Scheduler with the dynamic allocation of the best availableresources. The Tivoli Dynamic Workload Console provides a convenientsingle-access point to all Tivoli Workload Scheduler features, including dynamicworkload broker, and allows you to have a complete view of the whole lifecycle ofyour jobs.

© Copyright IBM Corp. 2009, 2010 1

Page 16: awsbrmst-fp1

If a job fails or the required resource does not become available before the timeoutperiod specified in the job definition expires, the client that submitted it is notified.

Benefits

Dynamic workload broker implements a job scheduling and brokeringinfrastructure that provides the following major functions to help you dynamicallymanage your business:v Manages the automatic discovery of computers available in the scheduling

domain with their attributes.v Manages the matching of jobs to appropriate resources based on job

requirements and resource attributes.v Manages the job dispatching to target resources, both physical and virtual, that

are capable of running the job.v Optimizes the use of IT resources.v Manages resource consumption of a job based on the quantities that it is

planned to use while running.v Optionally allocates the required quantity exclusively to the job while it is

running.v Releases the quantity as soon as the job terminates for use by other waiting jobs.v Provides an easy-to-use Web UI for managing the scheduling activities.v Integrates scheduling functions and services in the IBM Service Oriented

Architecture (SOA) common programming model.

Dynamic workload broker architectureDynamic workload broker is a key component of Tivoli Workload Scheduler in thestrategy of providing a scheduling solution that integrates business scheduling anddynamic on-demand scheduling.

The following figure shows the main elements of dynamic workload broker andtheir interaction within Tivoli Workload Scheduler:

2 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 17: awsbrmst-fp1

Dynamic workload broker is installed on the master domain manager and onevery backup master, by selecting the dynamic scheduling capability. It runs thejob management and resource management activities of dynamic scheduling. Itcomprises the following internal components:

Resource RepositoryStores information about the IT environment and the resource real-timeperformance. It is located in the Tivoli Workload Scheduler database.

Resource AdvisorMatches resource allocation requests for incoming jobs to the availabletarget resources stored in the Resource Repository. Ensures the correctconcurrent use of the resources. Resource allocation requests specifyrequirements in terms of resource attributes.

Tivoli Dynamic Workload Broker component

Job BrokeringDefinition Console

Tivoli Workload Schedulerengine

Tivoli Workload

Scheduler

database

Tivoli Workload Schedulermaster domain manager

Resource AdvisorAgent

Job Executor

Tivoli Workload Scheduler agent withdynamic scheduling capabilities

WorkloadBrokerWorkstation

Tivoli DynamicWorkload Console

JobDispatcher

ResourceAdvisor

Figure 1. The dynamic workload broker components.

Chapter 1. Understanding dynamic workload scheduling 3

Page 18: awsbrmst-fp1

Job DispatcherManages job submission requests. It interacts with the Resource Advisorconverting job resource requirements into appropriate resource allocationrequests.

Job RepositoryStores the JSDL job definitions created using the Job Brokering DefinitionConsole. It also stores the jobs created when the job definitions aresubmitted to dynamic workload broker. It is located in the Tivoli WorkloadScheduler database.

The Job Repository also contains a series of historical tables wherehistorical data on submitted jobs is stored. Data is moved to the historicaltables on a regular basis to improve access time to the remaining tables.You can configure the time interval after which data is moved to thehistorical tables using the MoveHistoryDataFrequencyInMins parameterin the JobDispatcherConfig.properties file, as described in IBM TivoliWorkload Scheduler Administration Guide. You can also move data to thearchive tables using the movehistorydata command, as described in“movehistorydata command - Maintaining the database tables” on page 96.

Allocation RepositoryKeeps track of resources assigned to each job and monitors the resourcestatus. It is located in the Tivoli Workload Scheduler database.

Dynamic workload broker interacts with the Tivoli Workload Scheduler agentwhich receives job submission requests from the Job Dispatcher and manages therunning of jobs from start to finish on the local system. The Tivoli WorkloadScheduler agent includes the following components:

Resource Advisor Agent (RAA)Scans the resources available on the local computer system and forwardsthis information to the Resource Advisor. The configuration of the systemscanner present in each RAA is in the JobManager.ini file in every TivoliWorkload Scheduler agent.

Job ExecutorSubmits, runs, and monitors jobs on the local computer. The informationon the job status is returned to the Job Dispatcher.

The workload broker workstation transfers jobs submitted in Tivoli WorkloadScheduler to dynamic workload broker. It emulates the behavior of a TivoliWorkload Scheduler standard agent. You can monitor these jobs using the TivoliDynamic Workload Console or the conman command line interface. The workloadbroker workstation resides in the master domain manager and is installed withdynamic workload broker if you select the dynamic scheduling capability.

To interact with specific dynamic workload broker items, you use the followinggraphical interfaces:

Tivoli Dynamic Workload ConsoleIt is a subset of the Integrated Solutions Console and provides a Web-baseduser interface for managing the Tivoli Workload Scheduler environment,including the dynamic scheduling objects. You can use it to:v Define and manage logical resourcesv Write job definitions in native Job Submission Description Languagev Track job instances and computers

4 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 19: awsbrmst-fp1

You also use the Tivoli Dynamic Workload Console to manage the lifecycleof workload.

Job Brokering Definition ConsoleIs a structured editing tool you use to create and modify Job SubmissionDescription Language (JSDL) files. These files are saved in the JobRepository as job definitions and become available for submission. TheJSDL files adhere to the XML syntax and semantics as defined in the JSDLschema.

You can submit the following types of jobs:v Tivoli Workload Scheduler jobs, in the form of scripts or executablesv Extended agent jobs, including jobs based on the access methods supported by

Tivoli Workload Scheduler for Applicationsv Applications based on Java 2 Platform Enterprise Edition (J2EE)

When you submit a job, dynamic workload broker checks the job requirements, theavailable resources and their related characteristics, and submits the job to theresource that best meets the requirements. Load balancing across resource pools isguaranteed over time. New resources just provisioned are automatically discoveredand integrated in the scheduling environment so that jobs can run automatically onthese resources.

You can also establish an affinity relationship between two or more jobs when youwant them to run on the same resource, for example when the second job must usethe results generated by the previous job. If the resource is not available, the affinejob is held until the resource is available again. You can define affinity betweentwo or more jobs using the Tivoli Dynamic Workload Console or the dynamicworkload broker command line interface.

Authorization and rolesEach task you can perform using dynamic workload broker requires a certain levelof authorization. A role represents a certain level of authorization and includes thetasks appropriate for that level of authorization.

The Tivoli Dynamic Workload Console is installed on the Integrated SolutionsConsole, an infrastructure which provides a common administration console formultiple products.

To access the Tivoli Dynamic Workload Console Welcome page, do the following:1. Enter the following address in a supported browser:

http://<server_name>:<port_name>/ibm/console/login

where,

server_nameThe fully qualified host name of the master domain manager or backupmaster (where the dynamic scheduling capability was enabled).

port_nameThe port number you configured for the master domain manager orbackup master running the active dynamic workload broker instance.

2. Enter a supported user name and password.

The Tivoli Dynamic Workload Console Welcome page displays.

Chapter 1. Understanding dynamic workload scheduling 5

Page 20: awsbrmst-fp1

The Tivoli Dynamic Workload Console is a role-based interface, in which tasks areenabled or disabled based on the user role and authorization. Depending on theauthorization level of the user logging on to the Integrated Solutions Console,some tasks might not be displayed.

When the Tivoli Dynamic Workload Console is installed, the following user groupsare created in the Integrated Solutions Console:

TDWBAdministratorThe users in this group can perform the following operations from theTivoli Dynamic Workload Console:v Create logical resources and resource groups, delete, query, suspend, and

resume logical resources, computers, and resource groups.v Define server connections.v Define, edit, and delete jobs.v Submit, query and cancel job instances.v Define user preferences for the Console.

TDWBConfiguratorThe users in this group can perform the following operations in the TivoliDynamic Workload Console:v Create logical resources and resource groups, delete, query, suspend, and

resume logical resources, computers, and resource groups.v Define server connections.v Define user preferences for the Console.

TDWBDeveloperThe users in this group can perform the following operations in the TivoliDynamic Workload Console:v Define server connections.v Define, edit, and delete jobs.v Define user preferences for the Console.

TDWBOperatorThe users in this group can perform the following operations in the TivoliDynamic Workload Console:v Create logical resources and resource groups, delete, query, suspend, and

resume logical resources, computers, and resource groups.v Define server connections.v Submit, query and cancel job instances.v Define user preferences for the Console.

WSClientThis is a WebSphere Application Server role that is automatically definedwith the All authenticated? property set to Yes. It is required to enableWeb services for dynamic workload broker and you must leave it as it is.

Table 1 lists which operations can be performed by each group for each task groupavailable in the Tivoli Dynamic Workload Console:

Table 1. Authorized operations by user groups

Supported OperationsTDWB

AdministratorTDWB

ConfiguratorTDWB

DeveloperTDWB

Operator

Scheduling Environment

6 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 21: awsbrmst-fp1

Table 1. Authorized operations by user groups (continued)

Supported OperationsTDWB

AdministratorTDWB

ConfiguratorTDWB

DeveloperTDWB

Operator

Define New Logical Resources X X X

Define New Resource Group X X X

Logical Resources X X X

Resource Groups X X X

Configuration

Server Connections X X X X

Definitions

Define a New Job X X

Jobs X X X

Tracking

Jobs X X

Computers X X X

Preferences

User Preferences X X X X

For information on adding users, refer to the Integrated Solutions Console help.

Managing users and rolesDuring the Web console installation, new predefined roles and groups are createdin the ISC. These roles determine which console panels are available to a user, andtherefore which activities the user can perform from the console.

These roles authorize users to access the console panels. The user specified in theengine connection determines which operations can be run locally on a connectedengine. For example, if the user specified in a Tivoli Workload Scheduler engineconnection is not authorized to run reporting in the Tivoli Workload Schedulersecurity file, then, even though the user logged in to the console can access thereporting panels, they cannot perform reporting operations on that Tivoli WorkloadScheduler engine. For more information about how to configure the security file,refer to the IBM Tivoli Workload Scheduler Administration Guide.

There is a one-to-one relationship between each new role, and the group with thesame name. This means, for example, that all users belonging to theTWSWEBUIAdministrator group have the TWSWEBUIAdministrator role.

You cannot modify the roles, but you can create new groups where you combinedifferent roles. For example, you can create a group named my_operators andassign to it the TWSWEBUIOperator and the TDWBOperators roles so that allusers added to this group can perform operator actions on both Tivoli WorkloadScheduler and dynamic workload broker from the Tivoli Dynamic WorkloadConsole.

If you do not assign a role to an ISC user, that user, after having logged in, will notsee any entry for Tivoli Workload Scheduler or dynamic workload broker in thenavigation tree.

Chapter 1. Understanding dynamic workload scheduling 7

Page 22: awsbrmst-fp1

The following table lists the roles created in the ISC user registry for accessing theTivoli Workload Scheduler environments using the Tivoli Dynamic WorkloadConsole, and the panels they can access:

Table 2. Tivoli Workload Scheduler roles.

RolesTivoli Workload Scheduler panels accessible from theNavigation Tree

TWSWEBUIAdministrator All panels

TWSWEBUIOperator DashboardMy TasksWorkload TrackingWorkload Submission on RequestWorkload ForecastingPreferences

Note: The TWSWEBUIConfigurator role is also needed inorder to work with Workload Forecasting tasks.

TWSWEBUIDeveloper Workload DefinitionPreferences

TWSWEBUIAnalyst ReportingPreferences

TWSWEBUIConfigurator Scheduling EnvironmentPreferences

The following table lists the roles created in the ISC user registry for accessing thedynamic workload broker environments using the Tivoli Dynamic WorkloadConsole, and the panels they can access:

Table 3. Dynamic workload broker roles.

RolesTivoli Dynamic Workload Broker panels accessible from theNavigation Tree

TDWBAdministrator All panels

TDWBOperator Scheduling EnvironmentConfigurationDefinitions, except Define a New JobTrackingPreferences

TDWBDeveloper ConfigurationDefinitionsPreferences

TDWBConfigurator Scheduling EnvironmentConfigurationTracking, except Job InstancesPreferences

Authorization with WebSphere® global securityWhen dynamic workload broker is installed, corresponding roles are set up on theWebSphere Application Server. By default, these roles are not used. However, ifyou enable global security for the WebSphere Application Server cell where alsodynamic workload broker is installed, the authorization required to perform tasksfrom theTivoli Dynamic Workload Console is also validated by the WebSphereApplication Server.

8 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 23: awsbrmst-fp1

When global security is enabled, Tivoli Dynamic Workload Console users mustprovide credentials for accessing the server. These credentials correspond toexisting users defined in the operating system where the WebSphere ApplicationServer resides or in an LDAP server. A task on the WebSphere Application Serverconsole maps these users to the dynamic workload broker roles. Using thesemappings, WebSphere Application Server is able to determine the level ofauthorization of the user submitting a request to the server.

For example, the Administrator needs to define John Jones as a TDWBConfiguratorin an environment that uses global security. On the WebSphere Application Serverconsole, the user conf, has been mapped to the Configurator role. TheAdministrator does the following:1. Creates a new user account for John Jones on the Integrated Solutions Console.2. Assigns the new user to the TDWBConfigurator user group.3. Provides John Jones with his user name and password to access the Tivoli

Dynamic Workload Console and the user name conf and its associatedpassword for connecting to dynamic workload broker.

For more information about assigning user roles on the Integrated SolutionsConsole and defining user roles from the WebSphere Application Server console,refer to the IBM Tivoli Workload Scheduler Administration Guide.

Scheduling J2EE jobsAfter you configure the J2EE feature of dynamic workload broker (see the IBMTivoli Workload Scheduler Administration Guide), you can run the following J2EEoperations:v Invoke the process method of an EJB which implements the

com.ibm.websphere.scheduler.TaskHandler interface. After developing the EJB,you can specify the related JNDI Home directory in the Application page of theJob Brokering Definition Console, or in the ejb element in the JSDL file.

v Post a message to a JMS queue. You can define the message to be sent in theJMS Properties pane in the Application page of the Job Brokering DefinitionConsole, or in the ejb element in the JSDL file.

The J2EE operations you can perform vary depending on the scheduler type (director indirect) you select, and on whether or not you enable WebSphere ApplicationServer and J2EE security. The following table summarizes the possibleconfiguration settings:

Table 4. Supported J2EE operations

Version ofthe externalWebSphereApplicationServer whereyou schedulejobs

EJB/JMS

WebSphereApplicationServersecurity

J2EE securityDirect/Indirectscheduler

Supported

6.1 EJB No No Direct Yes

6.1 EJB Yes Yes Direct Yes

6.1 EJB Yes No Direct No

6.1 EJB No No Indirect Yes

6.1 EJB Yes Yes Indirect Yes

Chapter 1. Understanding dynamic workload scheduling 9

Page 24: awsbrmst-fp1

Table 4. Supported J2EE operations (continued)

Version ofthe externalWebSphereApplicationServer whereyou schedulejobs

EJB/JMS

WebSphereApplicationServersecurity

J2EE securityDirect/Indirectscheduler

Supported

6.1 EJB Yes No Indirect Yes

6.1 JMS No No Direct No

6.1 JMS Yes Yes Direct Yes

6.1 JMS Yes No Direct No

6.1 JMS No No Indirect Yes

6.1 JMS Yes Yes Indirect Yes

6.1 JMS Yes No Indirect Yes

7.0 EJB No No Direct Yes

7.0 EJB Yes Yes Direct Yes

7.0 EJB Yes No Direct Yes

7.0 EJB No No Indirect Yes

7.0 EJB Yes Yes Indirect Yes

7.0 EJB Yes No Indirect Yes

7.0 JMS No No Direct Yes

7.0 JMS Yes Yes Direct Yes

7.0 JMS Yes No Direct Yes

7.0 JMS No No Indirect Yes

7.0 JMS Yes Yes Indirect Yes

7.0 JMS Yes No Indirect Yes

When configuring the J2EE feature, you must decide the scheduling type you wantto use for your J2EE jobs. You can choose between the following types:

indirect schedulingSelecting an indirect invoker means that dynamic workload broker uses anexisting WebSphere Application Server scheduling infrastructure alreadyconfigured on an external WebSphere Application Server. When creatingthe job definition, you can specify whether you want to use a direct orindirect connector in the J2EE Application pane in the Application page inthe Job Brokering Definition Console, or in the invoker element in theJSDL file. You can choose indirect scheduling to invoke an EJB that doesnot contain roles. If the EJB contains roles, use the direct scheduling.

direct schedulingSelecting a direct invoker means that dynamic workload brokerimmediately forwards the job to the components (EJB or JMS) of theexternal WebSphere Application Server instance. When creating the jobdefinition, you can specify whether you want to use a direct or indirectconnector in the J2EE Application pane in the Application page in the JobBrokering Definition Console, or in the invoker element in the JSDL file.For more information about the Job Brokering Definition Console, see theonline help.

10 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 25: awsbrmst-fp1

Define these settings in the J2EEJobExecutorConfig.properties file (see the IBMTivoli Workload Scheduler Administration Guide for details).

Defining specific job typesYou can define and schedule dynamic jobs to perform specific database, filetransfer, Java, and Web services operations, instead of using a generic script orcommand. You can customize the sample files provided with the product to matchyour requirements using the Tivoli Dynamic Workload Console.

About this task

The procedure for defining specific jobs is the same for all job types. The onlydifference is in the variables you define, which are related to the job type youselect. You can select a specific job type to perform one or more of the followingoperations. Any passwords you insert in the jobs are securely encrypted. You canedit the sample file provided with Tivoli Workload Scheduler using the TivoliDynamic Workload Console. The following sample files are available forcustomization in: installation_directory/TDWB/sampleJSDL:

Data transfer jobsUse these jobs to transfer files to and from a server reachable using FTP,SSH, or other protocols. The following sample files are available:

DownloadFile.jsdlDownload one single file for each job. To download more than onefile, run more jobs.

UploadFile.jsdlUpload one single file for each job. To upload more than one file,run more jobs.

Database access jobsUse these jobs to access a database, and perform queries and jobs on it.The following sample files are available:

DBQuery.jsdlPerform a query or a stored procedure on a database. A databasestored procedure is a subroutine available to applications accessinga relational database system. Typical uses for stored proceduresinclude data validation (integrated into the database), accesscontrol mechanisms, and data extract mechanisms.

Note:

v Before you can run a query on a database, download the JDBCdrivers for your database client to the workstation where youplan to run this job type. Specify the path to the database clientjar files in the DatabaseJobExecutor.properties file, located inthe JavaExt\cfg folder in your Tivoli Workload Schedulerinstallation directory. Define the jdbcDriversPath property topoint to the JDBC jar files folder, for examplejdbcDriversPath=c:\\mydir\\jars\\jdbc. The JDBC jar filesmust be located in the specified folder or in its subfolders.Ensure that you have list permissions on the folder and itssubfolders.

v When defining stored procedures, ensure that they do notcontain output variables. Stored procedures containing outputvariables are not supported.

Chapter 1. Understanding dynamic workload scheduling 11

1

1111

1

1111111

111

111

111

111

111111

1

11111111111

111

Page 26: awsbrmst-fp1

MSSQLJob.jsdlPerform a job on an MSSQL database.

MSSQLJobQuery.jsdlPerform a query, an asynchronous job, and a second query on anMSSQL database.

Web services jobsUse these jobs to call a Web service. The following sample files areavailable:

CelsiusToFahrenheit.jsdlConvert temperatures from Celsius to Fahrenheit.

GetQuote.jsdlObtain a quote on the stock market.

NumberToString.jsdlConvert a number to a string.

PrimeNumber.jsdlObtain prime numbers until the upper bound is reached.

WSGeneric.jsdlCall a generic Web service.

Java jobUse this job to perform a Java job using the TWSExecutable interface.Ensure that you have list permissions on the folder specified in the jarPathproperty. For more information about the interface, see “TWSExecutableJava interface” on page 19. The following sample file is available:

JavaJob.jsdlPerform a Java job.

The following variables are available in the JSDL samples:

Table 5. Variables in the CelsiusToFahrenheit.jsdl sample file

Variable Supported values Explanation

${CelsiusTemp} N/A Temperature to be convertedexpressed in degrees Celsius.

Table 6. Variables in the DBQuery.jsdl sample file

Variable Supported values Explanation

${databaseType}db2 IBM DB2

mssql Microsoft SQLServer

oracle Oracle DBMS

Database type

${server} N/A Database server

${port} N/A Database port

${database} N/A Database ID

${query} N/A Name of the query to be runin the database

${username} N/A User name of the userlogging on to the database

12 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

11

111

111

11

11

11

11

11

11111

11

1

11

111

11111

11

111

111

111

11

1

111

111

111

1111

1111

Page 27: awsbrmst-fp1

Table 6. Variables in the DBQuery.jsdl sample file (continued)

Variable Supported values Explanation

${password} N/A Password of the user loggingon to the database

Table 7. Variables in the DownloadFile.jsdl sample file

Variable Supported values Explanation

${server} N/A Fully qualified address of theserver for downloading thefile

${localFile} N/A Fully qualified path andname of the file to be createdon the local target. Wildcardsare not supported.

${remotefile} N/A Fully qualified path andname of the file to bedownloaded

${username} N/A User name of the userlogging on to the database

${password} N/A Password of the user loggingon to the database

Chapter 1. Understanding dynamic workload scheduling 13

1

111

11111

11

111

11111

111111

11111

1111

1111

Page 28: awsbrmst-fp1

Table 7. Variables in the DownloadFile.jsdl sample file (continued)

Variable Supported values Explanation

${protocol}WINDOWS

Is the Microsoft filesharing protocol. Ifyou do not specify aprotocol, and SSHdoes not work,WINDOWS isassumed. Specifythe shared directoryin the REMOTEFILEkeyword, withoutspecifying any pathswhere the shareddirectory is nested.Specify the addressof the workstationhosting the shareddirectory in theSERVER keyword.

SSH Is a networkprotocol thatprovides file access,file transfer, and filemanagementfunctions over anyreliable data stream.If you do notspecify a protocol,SSH is assumed.

FTP Is a standardnetwork protocolused to exchangefiles over aTCP/IP-basednetwork, such as theInternet.

Protocol to be used for theconnection

Table 8. Variables in the GetQuote.jsdl sample file

Variable Supported values Explanation

${StockSymbol} N/A Stock symbol for which thequote is requested

Table 9. Variables in the JavaJob.jsdl sample file

Variable Supported values Explanation

${jarPath} N/A Path to the .jar file

${className} N/A Name of the class, includingthe package name

${param1} N/A First parameter of the class

${param2} N/A Second parameter of theclass

${param3} N/A Third parameter of the class

14 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

1

111

11111111111111111111

11111111111

11111111

11

1

11

111

11111

11

111

111

1111

111

1111

111

Page 29: awsbrmst-fp1

Table 10. Variables in the MSSQLJob.jsdl sample file

Variable Supported values Explanation

${databaseType}oracle Oracle DBMS

Database type

${server} N/A Database server

${port} N/A Database port

${database} N/A Database ID

${jobname} N/A Name of the job to beperformed in the database

${username} N/A User name of the userlogging on to the database

${password} N/A Password of the user loggingon to the database

Table 11. Variables in the MSSQLJobQuery.jsdl sample file

Variable Supported values Explanation

${databaseType}oracle Oracle DBMS

Database type

${server} N/A Database server

${port} N/A Database port

${database} N/A Database ID

${query1} N/A First query to be run on thedatabase

${jobname} N/A Name of the job to beperformed on the database

${query2} N/A Second query to be run onthe database

${username} N/A User name of the userlogging on to the database

${password} N/A Password of the user loggingon to the database

Table 12. Variables in the NumberToString.jsdl sample file

Variable Supported values Explanation

${NumberToConvert} N/A Number to be converted

Table 13. Variables in the PrimeNumber.jsdl sample file

Variable Explanation

${UpperBound} Number to be converted.

Table 14. Variables in the UploadFile.jsdl sample file

Variable Supported values Explanation

${server} N/A Fully qualified address of theserver for uploading the file

Chapter 1. Understanding dynamic workload scheduling 15

1

11

111

1111

111

111

111

1111

1111

11111

11

111

1111

111

111

111

1111

1111

1111

1111

11111

11

111

1111

11

11

111

11

111

1111

Page 30: awsbrmst-fp1

Table 14. Variables in the UploadFile.jsdl sample file (continued)

Variable Supported values Explanation

${localFile} N/A Fully qualified path andname of the file to beuploaded

${remoteFile} N/A Fully qualified path andname of the file to be createdon the remote target

${username} N/A User name of the userlogging on to the database

${password} N/A Password of the user loggingon to the database

${protocol}WINDOWS

SSH

FTP

Protocol to be used for theconnection

Table 15. Variables in the WSGeneric.jsdl sample file

Variable Supported values Explanation

${Operation} N/A Name of the operation to beperformed

${wsdlURL} N/A URL of the WSDL file

${Param} N/A Parameter for the WSDL file

You can define the jobs using the jobstore command or the Tivoli DynamicWorkload Console. For more information about the jobstore command, see“jobstore command - Managing job definitions” on page 93. To define andcustomize the jobs using the Tivoli Dynamic Workload Console, perform thefollowing operations:

Procedure1. Browse to the relevant JSDL file and copy the JSDL statements.2. Log on to the Tivoli Dynamic Workload Console.3. In the console navigation tree, select the entry for Tivoli Dynamic Workload

Broker.4. Expand Definitions and click Define a New Job.5. In the Job Submission Description Language field, paste the JSDL statements

for the job definition and specify the job requirements, as necessary.6. Specify a name for the job definition and save it. The job is now available in

the database.7. Browse to the Tivoli Workload Scheduler entry in the Portfolio.8. Click Workload » Design » Create Workload Definitions.9. In the displayed panel, specify the engine connection that you want to use.

10. Click Go.11. In the Workload Designer, from the Working List pane, click New » Job

Definition » Workload Broker Job Definition.12. In the Workspace pane, specify the properties for the job using the General,

Task, Affinity, and Recovery Options tabs.

16 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

1

111

11111

11111

1111

1111

11

1

11

11

1

11

111

1111

111

1111

11111

1

1

1

11

1

11

11

1

1

1

1

11

11

Page 31: awsbrmst-fp1

13. In the Task pane, search for the job definition that you created in step 6 onpage 16. The variables present in the job definition are displayed in theVariable list pane.

14. Provide a value for the variables, as necessary.15. Save the job definition.

Example1. The following database job connects to an existing DB2 database and performs

basic operations on the database, such as create, update, delete on databaseentities:<jsdl:jobDefinition xmlns:jsdl="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdl"xmlns:jsdldatabase="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdldatabase" name="DATABASE"><jsdl:application name="database"><jsdldatabase:database><jsdldatabase:sqlActionInfo><jsdldatabase:dbms>db2</jsdldatabase:dbms><jsdldatabase:server>nc115037.romelab.it.ibm.com</jsdldatabase:server><jsdldatabase:port>50000</jsdldatabase:port><jsdldatabase:database>executor</jsdldatabase:database>

<jsdldatabase:statements><jsdldatabase:dbStatement>insert into test.target (id,hostname,ipaddress,

port) values ('id1','myHost','1.1.1.1',80)</jsdldatabase:dbStatement><jsdldatabase:dbStatement>select * from test.target where id='id1'

and hostname='myHost'and ipaddress='1.1.1.1' and port=80</jsdldatabase:dbStatement><jsdldatabase:dbStatement>update test.target set hostname='UpdateHost'</jsdldatabase:dbStatement><jsdldatabase:dbStatement>select * from test.target where id='id1'

and hostname='UpdateHost'and ipaddress='1.1.1.1' and port=80</jsdldatabase:dbStatement><jsdldatabase:dbStatement>delete from test.target where id='id1'

and hostname='UpdateHost'and ipaddress='1.1.1.1' and port=80</jsdldatabase:dbStatement><jsdldatabase:dbStatement>select * from test.target where id='id1'

and hostname='UpdateHost'and ipaddress='1.1.1.1' and port=80</jsdldatabase:dbStatement></jsdldatabase:statements>

<jsdldatabase:credentials><jsdl:userName>Administrator</jsdl:userName><jsdl:password>tdwb8nxt</jsdl:password></jsdldatabase:credentials></jsdldatabase:sqlActionInfo></jsdldatabase:database></jsdl:application></jsdl:jobDefinition>

2. The following database job connects to an existing Oracle database andperforms basic operations on the database, such as create, update, delete ondatabase entities:<jsdl:jobDefinition xmlns:jsdl="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdl"xmlns:jsdldatabase="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdldatabase" name="DATABASE"><jsdl:application name="database"><jsdldatabase:database><jsdldatabase:sqlActionInfo><jsdldatabase:dbms>oracle</jsdldatabase:dbms><jsdldatabase:server>nc115037.romelab.it.ibm.com</jsdldatabase:server><jsdldatabase:port>1521</jsdldatabase:port><jsdldatabase:database>orcl</jsdldatabase:database>

<jsdldatabase:statements><jsdldatabase:dbStatement>insert into target (id,hostname,ipaddress,

port) values ('id1','myHost','1.1.1.1',80)</jsdldatabase:dbStatement><jsdldatabase:dbStatement>select * from target where id='id1'

and hostname='myHost'and ipaddress='1.1.1.1' and port=80</jsdldatabase:dbStatement><jsdldatabase:dbStatement>update target set hostname='UpdateHost'

</jsdldatabase:dbStatement><jsdldatabase:dbStatement>select * from target where id='id1'

and hostname='UpdateHost'and ipaddress='1.1.1.1' and port=80</jsdldatabase:dbStatement><jsdldatabase:dbStatement>delete from target where id='id1'

and hostname='UpdateHost'and ipaddress='1.1.1.1' and port=80</jsdldatabase:dbStatement><jsdldatabase:dbStatement>select * from target where id='id1'

and hostname='UpdateHost'and ipaddress='1.1.1.1' and port=80</jsdldatabase:dbStatement></jsdldatabase:statements>

<jsdldatabase:credentials><jsdl:userName>scott</jsdl:userName><jsdl:password>tiger</jsdl:password></jsdldatabase:credentials>

Chapter 1. Understanding dynamic workload scheduling 17

111

1

1

1

11111111111111111111111111111111111

11111111111111111111111111111111

Page 32: awsbrmst-fp1

</jsdldatabase:sqlActionInfo></jsdldatabase:database></jsdl:application></jsdl:jobDefinition>

3. The following Java job launches a Java class located in the path specified in thejarPath variable. The package of the Java class is indicated in the classNamevariable. The parameters for the Java class are indicated with key1 e key2:<?xml version="1.0" encoding="UTF-8"?><jsdl:jobDefinition xmlns:jsdl="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdl"xmlns:jsdljava="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdljava" name="JAVA"><jsdl:application name="java"><jsdljava:java><jsdljava:javaParms><jsdljava:jarPath>C:/TestTools/executors/java</jsdljava:jarPath><jsdljava:className>com.ibm.test.executor.Exjvsb01</jsdljava:className><jsdljava:parameters><jsdljava:parameter key="key1">parameter1</jsdljava:parameter><jsdljava:parameter key="key2">parameter2</jsdljava:parameter></jsdljava:parameters></jsdljava:javaParms></jsdljava:java></jsdl:application></jsdl:jobDefinition>

4. The following file transfer job downloads the specified file using the credentialsand the protocol indicated in the file:<?xml version="1.0" encoding="UTF-8"?><jsdl:jobDefinition xmlns:jsdl="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdl"xmlns:jsdlfiletransfer="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdlfiletransfer" name="FILETRANSFER">

<jsdl:application name="filetransfer"><jsdlfiletransfer:filetransfer><jsdlfiletransfer:downloadInfo><jsdlfiletransfer:server>nc121031.romelab.it.ibm.com

</jsdlfiletransfer:server><jsdlfiletransfer:localfile>./npp.5.1.1.Installer.DW.exe

</jsdlfiletransfer:localfile><jsdlfiletransfer:remotefile>/TestTools/executors/fileTransfer/

npp.5.1.1.Installer.DW.exe</jsdlfiletransfer:remotefile>

<jsdlfiletransfer:credentials><jsdl:userName>root</jsdl:userName><jsdl:password>tws08app</jsdl:password>

</jsdlfiletransfer:credentials>

<jsdlfiletransfer:protocol>FTP</jsdlfiletransfer:protocol></jsdlfiletransfer:downloadInfo>

</jsdlfiletransfer:filetransfer></jsdl:application>

</jsdl:jobDefinition>

5. The following file transfer job uploads the specified file using the credentialsand the protocol indicated in the file:<?xml version="1.0" encoding="UTF-8"?><jsdl:jobDefinition xmlns:jsdl="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdl"xmlns:jsdlfiletransfer="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdlfiletransfer" name="FILETRANSFER">

<jsdl:application name="filetransfer"><jsdlfiletransfer:filetransfer><jsdlfiletransfer:uploadInfo><jsdlfiletransfer:server>nc125216.romelab.it.ibm.com

</jsdlfiletransfer:server><jsdlfiletransfer:localfile>/FileTransferForUploadTest

</jsdlfiletransfer:localfile><jsdlfiletransfer:remotefile>/TestTools/executors/fileTransfer/

FileTransferForUploadTest</jsdlfiletransfer:remotefile>

<jsdlfiletransfer:credentials><jsdl:userName>root</jsdl:userName><jsdl:password>Tivoli00</jsdl:password>

</jsdlfiletransfer:credentials>

<jsdlfiletransfer:protocol>SSH</jsdlfiletransfer:protocol></jsdlfiletransfer:uploadInfo>

</jsdlfiletransfer:filetransfer></jsdl:application>

</jsdl:jobDefinition>

18 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

1111

1111111111111111111

11111111111111111111111111

11111111111111111111111111

Page 33: awsbrmst-fp1

6. The following JSDL file invokes a Web service. The Web service applicationname is shown in the operation variable and the web service URL is indicatedin the wsdlURL variable. Define all arguments the Web service requires in theJSDL arguments section. When the Web service completes, the agent capturesthe output and returns it as the job log:<?xml version="1.0" encoding="UTF-8"?><jsdl:jobDefinition xmlns:jsdl="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdl"xmlns:jsdlws="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdlws" description="Calls a web service to perform a sum of two numbers" name="SumNumber"><jsdl:annotation></jsdl:annotation><jsdl:application name="ws"><jsdlws:ws><jsdlws:wsToInvoke operation="getSum" wsdlURL="https://nc125166.romelab.

it.ibm.com:9443/Sum/services/Sum/wsdl/Sum.wsdl"><jsdlws:arguments><jsdlws:value>1</jsdlws:value><jsdlws:value>2</jsdlws:value></jsdlws:arguments>

<jsdlws:credentials><jsdl:userName>administrator</jsdl:userName><jsdl:password>tivoli</jsdl:password></jsdlws:credentials></jsdlws:wsToInvoke></jsdlws:ws></jsdl:application></jsdl:jobDefinition>

TWSExecutable Java interfaceYou use the TWSExecutable Java interface to define Java jobs to perform customoperations. The TWSExecutable Java interface is available in the following location:<TWA_home>/TWS/JavaExt/eclipse/plugins/com.ibm.scheduling.agent.java_<version>.jar.

The interface content is as follows:import com.ibm.scheduling.agent.java.parametersdomain.Parameters;

public interface TWSExecutable {public void validateParameters(Parameters parameters) throws Exception;public void execute(Parameters parameters) throws Exception;}

You can use thevalidateParameters

method to validate the parameters provided and return an exception in case oferrors.

The following example shows how to check for the presence of the nameparameter and write the name to a log file:import java.io.BufferedWriter;import java.io.FileOutputStream;import java.io.OutputStreamWriter;

import com.ibm.scheduling.agent.java.jobexecutor.TWSExecutable;import com.ibm.scheduling.agent.java.parametersdomain.Parameters;

public class Executor implements TWSExecutable{

public void validateParameters(Parameters arg0) throws Exception {if(arg0.getParameter("name")==null||arg0.getParameter("name").equals(""))throw new Exception("Invalid Name");

}

Chapter 1. Understanding dynamic workload scheduling 19

11111111111111111111111111

1

1111

1

111111

1

1

11

11

1111111111111111

Page 34: awsbrmst-fp1

public void execute(Parameters arg0) throws Exception {BufferedWriter bw= new BufferedWriter(new OutputStreamWriter( new

FileOutputStream(arg0.getOutputFile()), "UTF8"));

bw.write(arg0.getParameter("name"));bw.close();

}

}

A business scenarioThe purpose of the following scenario is to show how a system of dynamicallocation of workload to computer resources can make an important contributionto the smooth and profitable running of a business by optimizing use of availableresources.

The businessFine Cola is a medium-sized enterprise that produces and distributes soft drinks toretailers across the country. It owns a production plant and several strategicallylocated distribution centers. Fine Cola has a range of customer types fromnationwide foodstore chains to small local outlets. The foodstore chains normallymaintain fixed orders though changes can be made at delivery time. Small localoutlets often restock directly from the delivery truck with no previous order made.Order quantities can vary, peaking in the warmer season and during holidays.

The process from ordering of the raw materials to the delivery of the finishedproduct and the return of empties consists of a number of subprocesses: inventory,purchase ordering or raw materials, production, supply to distribution centers, anddelivery. All of these subprocesses are interdependent and activities in onesubprocess are often triggered by an event in another. For example, ordering of araw material is automatically triggered when inventory discovers that the amountof the raw material currently held in the warehouse has hit the reorder level.

The challengeFine Cola uses Tivoli Workload Scheduler to manage the timing andinterdependencies of its production and supply process. However, in some areasproblems are occurring with computer resource allocation:v Some scheduled jobs are experiencing long wait times before resources become

available.v Performance problems are occurring as some resources become overloaded.v When a resource that normally runs workload is removed temporarily or

permanently, the job definitions must be manually changed to target a newresource.

Tivoli Workload Scheduler uses fixed resource allocation and this is presentingFine Cola with the choice of either acquiring more resources or constantly runningthe risk that jobs will not be completed in a timely manner.

The problems are particularly evident during the end-of-day reconciliation process.This process starts when the last delivery truck returns and must be completedbefore the next day's delivery route planning can be started. The main focus of theend of day processing is the daily transaction database. This database includes awide variety of transactions including consignment transactions for each item in a

20 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

11111111111

1

Page 35: awsbrmst-fp1

customer order, consignment transactions for each delivery load, receipttransactions for returned items, receipt transactions for empties, adjustmentstransactions to customer billing when the order amount has been changed ondelivery. These transactions are used to update the following databases: customerorders and billing, inventory, and general ledger.

Within a small time window, the following tasks must be completed:v Update the inventory database with returned items.v Update the inventory database with returned empties.v Update customer orders and billing database to take account of changes to

orders and to create orders and billing for customers who have restocked fromthe truck.

v Update the general ledger database.v Conduct data-mining extractions on the transaction database and save the

extracted information in the management reports database for later analysis ofbuying trends to be used in future promotion campaigns.

v Produce several reports of varying levels of detail of transactions by item, bycustomer, and by delivery route to enable analysis of the profitability of productlines and routes. Save these reports in the management reports database.

The solutionFine Cola decides that an important element is missing from their IT solution: theability to maintain a pool of computer resources, to identify those that match therequirements of a job, and to dynamically assign the job to a matching resourcethat is available at submission time.

A decision is made to take advantage of the dynamic workload broker feature ofTivoli Workload Scheduler, since this seems to cover their requirements for jobscheduling, dependency resolution, and efficient allocation of resources. The ITinfrastructure administrator starts by migrating to this version of Tivoli WorkloadScheduler and by deploying Tivoli Workload Scheduler agents on the computersnormally used to perform the tasks associated with the transaction database in theend-of-day reconciliation process. In this way, it will be possible to see whetherdynamic allocation results in a more efficient use of resources.

The hardware scan performed by the agent provides a pool of detailed informationabout the computer systems, their operating systems, file systems, and networkconnections. To complete the picture of available resources and make it possible toaccurately match resources to job requirements, the administrator must nowidentify the computer systems that have access to the different databases. She doesthis by using the Tivoli Dynamic Workload Console to create a logical resource foreach database and linking it to the computer systems from which the database canbe accessed.

Now that all the pieces are in place, the administrator can create the jobdefinitions, providing an accurate picture of the physical and logical resourcesrequired for the job. She installs the Job Brokering Definition Console on her localworkstation. This tool provides an easy-to-use graphical interface for creating JSDLjob definitions.

She identifies the jobs and job requirements listed in Table 16 on page 22.

Chapter 1. Understanding dynamic workload scheduling 21

Page 36: awsbrmst-fp1

Table 16. Day-end jobs and requirements

JobAccess to sharedremote drives Operating system Database access

Inventory itemupdate

None Linux Inventory,Transaction

Inventory emptiesupdate

None Linux Inventory,Transaction

Customer orderscreate/ update

None AIX® with at least1024 MB of freephysical memory

Customer,Transaction

Customer ordersbilling

None AIX Customer,Transaction

Transactionconsolidation andGeneral ledgerupdate

None AIX General ledger,Transaction

Item informationdata mining

None Linux®, AIX, orHP-UX

Transaction,Management reports

route informationdata mining

None Linux, AIX, orHP-UX

Transaction,Management reports

Sales summary byitem

//shared/reports/sales

Linux, AIX, orHP-UX

Transaction,Management reports

Sales summary byroute

//shared/reports/sales

Linux, AIX, orHP-UX

Transaction,Management reports

Sales summary bycustomer

//shared/reports/sales

Linux, AIX, orHP-UX

Transaction,Management reports

These jobs already exist in Tivoli Workload Scheduler but they use static allocationof resources. She uses the Job Brokering Definition Console to import these jobsand to create a JSDL job definition for each job, including the requirementsidentified for each job:v Add the candidate operating systems identified for each job.v Add a file system requirement for remote access to the directory

//shared/reports/sales for the reporting jobs.v Add the appropriate logical resources for the required database access.

.

22 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 37: awsbrmst-fp1

When all the jobs have been created, she checks the matching resources that arefound for the jobs she has defined. She finds that eight systems match the jobrequirements for the reporting and data-mining jobs, which require access to thetransaction and management reports databases. The other jobs that require accessto the inventory, customer, and general ledger databases respectively, each havetwo matching systems. However, all these systems are also included in the eightsystems found for the reporting and data-mining tasks.

Figure 2. Resource requirements for the Inventory item update job

Chapter 1. Understanding dynamic workload scheduling 23

Page 38: awsbrmst-fp1

She wonders whether there will be problems of load balancing between the eightsystems and decides to include some optimization instructions in all of the jobdefinitions.

Figure 3. Matching resources for the day-end jobs

24 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 39: awsbrmst-fp1

The objective she decides on is to distribute jobs between available resources withthe aim of keeping CPU usage to a minimum. She thinks that this will provide amore efficient distribution of resources than simply aiming for an equal number ofjobs on each available computer system.

She also considers that the update jobs are targeting a subset of the computersavailable to the data-mining and reporting jobs and decides that the update jobsshould be assigned a higher priority, so that their resources are assigned before thejobs that have wider range of options. She goes back to the job definitions of theupdate jobs, and sets the scheduling priority to 100 (the highest possible).

The job definitions are now complete, and she uploads them to the Job Repositoryin the Tivoli Workload Scheduler database. She is confident that she will see animprovement in the performance during end-of-day processing, since all jobs havemore than one possible target and since she has tailored her definitions to promotea balanced use of available resources.

Using Tivoli Workload Scheduler, she creates a job stream for the day-end jobs andschedules it to be submitted on each business day. Most of the jobs do not havedependencies and can run at the same time. However, the route information datamining job requires data produced by the item information data mining job asinput. It must wait until the item information data mining job has successfullycompleted and then it must run on the same computer system.

Figure 4. Optimization instructions for a job

Chapter 1. Understanding dynamic workload scheduling 25

Page 40: awsbrmst-fp1

To achieve this objective without losing the benefits of dynamic allocation ofresources, she decides to define an affinity relationship between the two jobs.Using Tivoli Workload Scheduler, she adds information to the route informationdata mining job to identify its relationship to the item information data miningtask. When the job is submitted in the integrated environment, dynamic workloadbroker recognizes the relationship and allocates the job to the resource where theitem information data mining task previously ran.

When the jobs in the job stream are submitted and dynamically allocated toresources, she is able to track their progress and view job output from TivoliWorkload Scheduler.

26 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 41: awsbrmst-fp1

Chapter 2. Using dynamic workload broker to run TivoliWorkload Scheduler jobs

You can dramatically reduce the cost of ownership by minimizing customer effort,reducing the complexity of the deployment, and using resources more efficientlywhen you use dynamic scheduling in your Tivoli Workload Schedulerenvironment.

Dynamic scheduling enhances the capabilities of Tivoli Workload Scheduler toschedule, monitor and manage jobs. The Tivoli Workload Scheduler scheduling andchoreography features are used to manage the submission of jobs and theresolution of dependencies, while the dynamic scheduling features are used toidentify resources where the jobs can run and to assign jobs to resources in a waythat makes efficient uses of the available computer resources.

Dynamic workload broker provides a series of improvements on your existingTivoli Workload Scheduler solution:v Virtualization of the scheduling infrastructure by providing an abstraction layer

on the resource selectionv Workload balancing by routing jobs among a group of resources according to the

availability and activity levels of those resourcesv Scheduling of IBM WebSphere Java™ 2 Enterprise Edition (J2EE) applicationsv Automatic routing of jobs to the most appropriate resources based on job

requirementsv Enhanced flexibility in workload distribution and runningv Automatic routing of jobs for which submission failed to appropriate resources

The workload broker workstation acts as a bridge between the Tivoli WorkloadScheduler engine and dynamic workload broker and plays a key role since ittransfers the jobs submitted in Tivoli Workload Scheduler to dynamic workloadbroker. To make this happen, when you define or schedule jobs on Tivoli WorkloadScheduler, you specify the name of the workload broker workstation as thedestination CPU and at submission time dynamic workload broker selects the bestmatching workstation.

The workload broker workstation is automatically installed on the master domainmanager (and every backup master) when you select the dynamic schedulingcapability at Tivoli Workload Scheduler installation time. It contains a subset of thestandard agent features to enable you to manage the lifecycle of jobs even if theyare processed through dynamic workload broker.

When the dynamic scheduling capability is in place, you must decide which jobsare to benefit from the dynamic resource allocation provided by dynamic workloadbroker. New definitions must be created for these jobs. Each Tivoli WorkloadScheduler job must have a related dynamic workload broker job definition thatincludes the rules for identifying matching resources. The Tivoli WorkloadScheduler job definition must contain information to identify the dynamicworkload broker job. A task is available on the Job Brokering Definition Console toautomatically convert existing Tivoli Workload Scheduler jobs to the correct format.

© Copyright IBM Corp. 2009, 2010 27

Page 42: awsbrmst-fp1

You can use the standard Tivoli Workload Scheduler procedures to submit andmonitor jobs that are to be allocated resources by dynamic workload broker to theworkload broker workstation. Jobs are then managed and monitored by dynamicworkload broker and submitted to the Tivoli Workload Scheduler agents.

Modifying your existing workload definitions for use with dynamicworkload broker

This section describes how to change your existing Tivoli Workload Scheduler jobsfor dynamic scheduling.

This section describes the following tasks:1. “Planning and considerations”2. “Using Tivoli Workload Scheduler variables in dynamic workload broker jobs”

on page 313. “Adapting Tivoli Workload Scheduler jobs for dynamic workload broker”4. “Creating Tivoli Workload Scheduler jobs managed by dynamic workload

broker” on page 325. “Monitoring and cancelling jobs” on page 36

Planning and considerationsWhen integrating dynamic workload broker into your existing Tivoli WorkloadScheduler environment, you can decide which jobs are most suitable to dynamicallocation of resources. Analyze the characteristics of the jobs in your environmentand consider job streams that might be improved when using resourcevirtualization. The following job types might be potential candidates:v Heavy computational tasksv Jobs which require resource optimization and resource balancingv Jobs strongly dependent on the availability of hardware resources, such as CPU

and RAMv Jobs that must run in high-availability clustersv Jobs that can benefit from automated recovery of failuresv Jobs requiring IBM WebSphere job schedulingv Jobs billed to departments based on resource consumption

Adapting Tivoli Workload Scheduler jobs for dynamicworkload broker

Changes must be made to the job definitions you have identified as suitable fordynamic allocation of resources. These changes enable you to move from a staticallocation of resources to a dynamic allocation using a logical resource. The logicalresource represents the requirements for running the job and is associated with thecomputers that match the requirements. The procedure for adapting the jobsincludes the selection or definition of the logical resource.

Important: Although this is the established procedure for converting standard jobdefinitions into definitions for dynamic scheduling, there is a more advantageousway of adapting static workload to dynamic scheduling requirements. It is basedon the use of JSDL job definition templates in the Job Brokering Definition Consoleand is described in “Using JSDL job definition templates” on page 57. With the use

28 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 43: awsbrmst-fp1

of templates, jobs can be adapted by simply changing their CPU to an appropriateextended agent, without changing the job definition, and without requiring adifferent JSDL definition for each job.

An import and export utility is provided for adapting jobs created with TivoliWorkload Scheduler to the dynamic workload broker format. This utility alsoallows you to insert in the resulting dynamic workload broker job a number ofTivoli Workload Scheduler UNISON variables by selecting a checkbox during theexport operation.

When the import and export procedure is completed, the following job definitionswill exist:v The original Tivoli Workload Scheduler job definition. This job cannot be

submitted to the workload broker workstation.v A new Tivoli Workload Scheduler job definition that includes a task string that

identifies an associated dynamic workload broker job definition.v A new dynamic workload broker job definition that includes the definitions for

dynamic allocation of resources.

When the new Tivoli Workload Scheduler job is submitted to the workload brokerworkstation, the associated dynamic workload broker job is launched and dynamicallocation is made based on its definition.

Note: You can make changes to the dynamic workload broker job definition, forexample, adding variables, but you must not change the name of the job.

To adapt Tivoli Workload Scheduler jobs to be managed dynamically by dynamicworkload broker, perform the following steps:1. Export Tivoli Workload Scheduler job definitions to a file with the composer

extract command. For example, to export all jobs to a file named, my_jobs.txt,enter the command as follows:composer extract c:\my_jobs.txt jd=@#@

2. Save the resulting files on the workstation where the Job Brokering DefinitionConsole is installed.

3. Open the Job Brokering Definition Console.4. In the Window menu, select Open Perspective → Job Definition Transition.5. Click on the icon with the tray and incoming arrow in the upper right corner

of the window. The icon name is Import Tivoli Workload Scheduler jobdefinition and Tivoli Dynamic Workload Broker logical resources. Theimport wizard is displayed. The following fields are available:

Job import file nameSpecify the name of the Tivoli Workload Scheduler job you want toimport.

Job stream import file nameOptionally, specify the name of the Tivoli Workload Scheduler jobstream you want to import.

6. Click Finish. The job, and job stream (if specified), you selected are importedin the Job Brokering Definition Console. The contents of the job are displayedin the Tivoli Workload Scheduler Jobs table. You can double-click on eachelement in the file to view the details on the element.

7. You can optionally filter on the Tivoli Workload Scheduler jobs beingdisplayed by clicking the Filter by job and workstation icon.

Chapter 2. Using dynamic workload broker to run Tivoli Workload Scheduler jobs 29

Page 44: awsbrmst-fp1

8. Decide on which logical resources the new job must run. You must associatethe job to a logical resource. If you have previously imported the same job, thelogical resources previously allocated to it are displayed.

9. Assign the job to the logical resource by dragging or copying the job to thelogical resource in the dynamic workload broker Logical Resources pane.You can filter on the logical resources being displayed by clicking the Filter bylogical resources icon.a. If none of the available logical resources fits your job requirements, you

can create a new logical resource by performing the following steps:b. Click with the right mouse button on the dynamic workload broker

Logical Resources pane.c. Select Add in the menu. The Add logical resource dialog is displayed.d. Click OK. All logical resources created are assigned the TWSResource Type.e. Associate the logical resource to a computer by dragging or copying the

logical resource to one or more computers in the dynamic workloadbroker Computers pane. You can filter on the computers being displayedby clicking the Filter by computer icon.

When the jobs are assigned to the logical resource, the Tivoli WorkloadScheduler workstation name is added as a prefix to the job name.

10. To export the jobs to Tivoli Workload Scheduler format, click on the icon withthe tray and outgoing arrow in the lower right corner of the window. The iconname is Export To Tivoli Workload Scheduler And Tivoli DynamicWorkload Broker. The following fields are available:

Default bridgeSpecify the name of the workload broker workstation to which thejobs are to be submitted.

Job export file nameSpecify the file name to which the exported job is to be saved.

Job stream export file nameSpecify the file name to which the exported job stream is to be saved.

The wizard creates the new Tivoli Workload Scheduler job definitions in thedirectory you specify. It also creates the corresponding JSDL files which aresaved to the local job repository directory.

11. Optionally select Add TWS variables to insert a number of Tivoli WorkloadScheduler UNISON variables during the export operation. The variables arethen assigned a value when you submit the job in the Tivoli WorkloadScheduler environment.

12. You can now edit the JSDL files adding dynamic workload broker-specificfeatures.

13. Save the Tivoli Workload Scheduler job definitions to the Tivoli WorkloadScheduler server using the composer add command. For example, to save thejob definition exported to the file named, my_exported_jobs.txt, to the TivoliWorkload Scheduler server, enter the command as follows:composer add C:\my_exported_jobs.txt

When you schedule the new job streams on Tivoli Workload Scheduler, the jobstreams will start the updated Tivoli Workload Scheduler jobs which internallylink the dynamic workload broker jobs.

14. Save the job definitions also in the dynamic workload broker Job Repository.

30 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 45: awsbrmst-fp1

Using Tivoli Workload Scheduler variables in dynamicworkload broker jobs

When importing jobs from Tivoli Workload Scheduler, you can add TivoliWorkload Scheduler variables to obtain higher flexibility for your job.

The variables are assigned a value when you submit the job in Tivoli WorkloadScheduler. The supported Tivoli Workload Scheduler variables are as follows:

Table 17. Supported Tivoli Workload Scheduler variables in JSDL definitions.

Variables that can be inserted in thedynamic workload broker job definition

Description

tws.job.fqname Fully qualified name of the job(UNISON_JOB)

tws.job.interactive Job is interactive. Values can be true orfalse.

tws.job.logon Credentials of the user who runs the job(LOGIN)

tws.job.name Name of the submitted job

tws.job.priority Priority of the submitted job

tws.job.taskstring The task string of the submitted job

tws.job.workstation Name of the workstation on which the job isdefined

tws.jobstream.name Name of the job stream that includes the job(UNISON_SCHED)

tws.jobstream.workstation Name of the workstation on which the jobstream that includes the job is defined

tws.master.workstation Name of the master domain manager(UNISON_MASTER)

tws.plan.date Start date of the production plan(UNISON_SCHED_DATE)

tws.plan.date.epoch Start date of the production plan, in epochformat (UNISON_SCHED_EPOCH)

tws.plan.runnumber Run number of the production plan(UNISON_RUN)

If you want to insert the variables when importing a job from Tivoli WorkloadScheduler, follow the instructions in “Adapting Tivoli Workload Scheduler jobs fordynamic workload broker” on page 28.

If you want to create a dynamic workload broker job to be submitted from TivoliWorkload Scheduler, you can add one or more of the variables listed in Table 17 inthe Variables field of the Overview pane as well as in the Script field of theApplication pane in the Job Brokering Definition Console.

If you plan to use the variables in a script, you also define the variables asenvironment variables in the Environment Variables field in the Application pane.Specify the Tivoli Workload Scheduler name of the variable as the variable value.You can find the Tivoli Workload Scheduler name of the variable in the Variablesinserted in the dynamic workload broker job definition column.

Chapter 2. Using dynamic workload broker to run Tivoli Workload Scheduler jobs 31

111

Page 46: awsbrmst-fp1

You then create a Tivoli Workload Scheduler job which contains the name of thejob definition, as explained in “Creating Tivoli Workload Scheduler jobs managedby dynamic workload broker.”

The following example illustrates a JSDL file with several of the supported TivoliWorkload Scheduler variables defined:...<jsdl:jobDefinition xmlns:jsdl="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdl" xmlns:jsdle="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdle"description="This jobs prints UNISON Variables receivedfrom TWS in standard OutPut "name="sampleUNISON_Variables">

<jsdl:annotation>This jobs prints UNISON Variablesreceived from TWS instandard OutPut </jsdl:annotation>

<jsdl:variables><jsdl:stringVariable name="tws.jobstream.name">none</jsdl:stringVariable><jsdl:stringVariable name="tws.job.fqname">none</jsdl:stringVariable><jsdl:stringVariable name="tws.master.workstation">none</jsdl:stringVariable><jsdl:stringVariable name="tws.plan.runnumber">none</jsdl:stringVariable><jsdl:stringVariable name="tws.plan.date">none</jsdl:stringVariable><jsdl:stringVariable name="tws.plan.date.epoch">none</jsdl:stringVariable><jsdl:stringVariable name="tws.job.logon">none</jsdl:stringVariable>

</jsdl:variables><jsdl:application name="executable">

<jsdle:executable output="${tws.plan.runnumber}"><jsdle:environment>

<jsdle:variable name="UNISON_SCHED">${tws.jobstream.name}</jsdle:variable>

<jsdle:variable name="UNISON_JOB">${tws.job.fqname}</jsdle:variable>

<jsdle:variable name="UNISON_MASTER">${tws.master.workstation}</jsdle:variable>

<jsdle:variable name="UNISON_RUN">${tws.plan.runnumber}</jsdle:variable>

<jsdle:variable name="UNISON_SCHED_DATE">${tws.plan.date}</jsdle:variable>

<jsdle:variable name="UNISON_SCHED_EPOCH">${tws.plan.date.epoch}</jsdle:variable>

<jsdle:variable name="LOGIN">${tws.job.logon}</jsdle:variable>

</jsdle:environment>...

Creating Tivoli Workload Scheduler jobs managed by dynamicworkload broker

To create a Tivoli Workload Scheduler job and have resources allocateddynamically, perform the following steps:1. Create a JSDL job definition in dynamic workload broker using the Job

Brokering Definition Console.2. Create a job to be submitted in Tivoli Workload Scheduler. Define the job using

the standard Tivoli Workload Scheduler syntax and instructions, with thefollowing imperatives:a. Define as target CPU the workstation where the workload broker

workstation is installed.b. In the Task String section of the job, specify the name of the JSDL job

definition you created in the dynamic workload broker environment.c. Set the task type as BROKER.

32 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 47: awsbrmst-fp1

3. The Tivoli Workload Scheduler job can now be scheduled and when it issubmitted to the workload broker workstation, the dynamic workload brokerjob is automatically launched and the resources are dynamically allocated.

Using variables in jobs

Dynamic workload broker supports the use of variables in jobs for additionalflexibility. You can assign values to the variables or leave them blank, so that youcan define the value when the job is submitted.

When you define jobs that will be processed through dynamic scheduling, you caninclude variables that can be used at run time to valorize or override the variablesdefined in the JSDL job definition.

You define the variables in the Task String section of the Tivoli WorkloadScheduler job, as described in the following example:jobName -var var1Name=var1Value,...,varNName=varNValue

To define variables in the Tivoli Workload Scheduler job, perform the followingsteps:1. Create a JSDL job definition using the Job Brokering Definition Console.2. Define the variables for the job. For example, you can define the memory

variable to specify the amount of memory required for the job to run.3. Move to the Resources tab, Hardware Requirements section and type the

name of the variable in the Exact value field in the Physical Memory section.When the job is submitted, the value assigned to the memory variable definesthe amount of physical memory.

4. Save the job definition in the Job Repository database.5. Define a job in Tivoli Workload Scheduler. This job contains the standard

Tivoli Workload Scheduler syntax and instructions; in the Task String sectionof the job, specify the name of the JSDL job definition. The name of the jobdefinition is specified in the jobDefinition element in the JSDL file.In the Task String section of the job, you can also specify the parameters youwant to provide to the job while it runs using static text or variables. Forexample, you can use the memory variable you previously defined.

Note: if you are using variables that you have not previously defined, youmust provide them with a value now.

6. Add the job to a job stream.7. Submit or schedule the job using either the Tivoli Dynamic Workload Console

or conman.8. After any existing dependencies are resolved, the master domain manager

submits the job to dynamic workload broker via the workload brokerworkstation.

9. The workload broker workstation identifies the job definition to be submittedbased on the information on the Task String section of the job. It also createsan alias which contains the association with the job. For more information onthe job alias syntax, see “Alias definition in Tivoli Workload Scheduler” onpage 34.

10. The job definition is submitted to dynamic workload broker with the valuespecified for the memory variable.

11. Dynamic workload broker manages and monitors the whole job lifecycle.

Chapter 2. Using dynamic workload broker to run Tivoli Workload Scheduler jobs 33

Page 48: awsbrmst-fp1

12. Dynamic workload broker returns status information on the job to theworkload broker workstation, which communicates it to the Master DomainManager. The job status is mapped to the Tivoli Workload Scheduler status asdescribed in Table 18 on page 36.

Defining affinity relationships

In dynamic workload broker, you can define affinity relationships between two ormore jobs when you want them to run on the same resource. When submitting thejob from the Tivoli Workload Scheduler environment, you can define affinity thatwill be resolved by dynamic workload broker by adding an affinity definition tothe Task String section of the Tivoli Workload Scheduler job in one of thefollowing ways:v Identifying affine job with the dynamic workload broker job IDv Identifying affine job with the dynamic workload broker job aliasv Identifying affine job with theTivoli Workload Scheduler job name

Identifying affine job with the dynamic workload broker job IDjobName [-var varName=varValue,...,]-affinity jobid=jobid

Identifying affine job with the dynamic workload broker job aliasjobName [-var varName=varValue,...,]-affinity alias=alias

where

jobid Is the ID dynamic workload broker assigns when the job is submitted.

alias Is one of the following:v The alias defined by the user at submission time for dynamic workload

broker jobs.v The alias automatically generated by the workload broker workstation

when the job is submitted from Tivoli Workload Scheduler. For moreinformation on this alias, see “Alias definition in Tivoli WorkloadScheduler.”

Identifying affine job with theTivoli Workload Scheduler job nameThe jobs must belong to the same job streamjobName [-var varName=varValue,...,]-twsAffinity jobname=twsJobName

where

twsJobNameIs the name of the instance of the Tivoli Workload Scheduler jobwith which you want to establish an affinity relationship.

Alias definition in Tivoli Workload Scheduler

When the Tivoli Workload Scheduler job is submitted to the workload brokerworkstation, an alias is automatically generated. This alias uniquely identifies thejob in the Tivoli Workload Scheduler environment and is displayed in the TivoliDynamic Workload Console.

The syntax of the alias is as follows:cpuschedname#schedname.jobname.SCHEDID-schedid.ON-yymmdd.JNUM-nnnn

where:

34 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 49: awsbrmst-fp1

cpuschednameIs the job stream workstation.

schednameIs the job stream name.

jobnameIs the job name.

SCHEDIDIs the ID that identifies the job stream instance.

ON Is the scheduled date of the job stream.

JNUM Is the job number created by Tivoli Workload Scheduler before submittingthe job. Identifies a specific instance of a job within a given productiondate.

Scenario: A job exploiting the strengths of Tivoli Workload Schedulerand dynamic workload broker

This scenario demonstrates how you can exploit both the scheduling featuresprovided by Tivoli Workload Scheduler and the resource optimization featuresprovided by dynamic workload broker.

Data is regularly collected from branches of a company and stored in the filesystem of the computer where the branch collection job runs. The branch datacollected within a definable number of hours is used by another job to update acentral database. Both the branch collection and the centralized update jobs mustrun on the same computer, which for the update procedure must have access tothe central database. The centralized update job must not start until the branchcollection job has completed successfully.

The following steps describe an example process for creating and submitting thejobs to complete this scenario:1. Create job definitions in dynamic workload broker using the Job Brokering

Definition Console as follows:v BRANCH_COLLECT which must run on a Windows® platform.v COLLECT_DATA which must run on a Windows platform and have access to the

central database.All Windows candidate operating systems are selected for both jobs and alogical resource identifying the database access requirement is added to the jobdefinition of COLLECT_DATA.

2. Save the job definitions to the Job Repository.3. In Tivoli Workload Scheduler, create the two jobs, TWS_BRANCH_ COLLECT and

TWS_COLLECT_DATA, to be associated with the jobs you have just created. Bothjobs are added to the same job stream and the TWS_BRANCH_COLLECT job precedesthe TWS_COLLECT_DATA job. For both jobs, define the standard WorkloadScheduler syntax and instructions as follows:v Define the workload broker workstation as target CPU for the jobs.v In the Task String section of the jobs, specify the name of the associated job

definition you created in the dynamic workload broker environment. ForTWS_BRANCH_ COLLECT, the name is BRANCH_COLLECT and for TWS_COLLECT_DATA,the name is COLLECT_DATA.

Chapter 2. Using dynamic workload broker to run Tivoli Workload Scheduler jobs 35

Page 50: awsbrmst-fp1

For the COLLECT_DATA job, the following additional information must beincluded in the Task String section:v To ensure that this job runs after the branch collection job in this job stream,

which will be submitted with the alias, branch_collect_20070607, on the samecomputer, specify the following syntax in the Task String section:COLLECT_DATA -affinity alias=branch_collect_20070607

v To define the time interval for which data is to be collected and updated inthe centralized database, add a variable to the Task String section as follows:COLLECT_DATA -var data_collect_interval=12

The COLLECT_DATA job will now collect data produced in the last 12 hours.4. Add both jobs to a job stream, using the standard procedure.5. Submit or schedule the jobs in the Tivoli Workload Scheduler environment,

using the standard procedure.6. When all dependencies are solved, the Master Domain Manager submits the

jobs to the workload broker workstation.7. As each job is submitted to the workload broker workstation, it identifies the

job definition to be submitted based on the information in the Task Stringsection of the Workload Scheduler job and submits it. It also creates an aliaswhich contains the association with the job in the Tivoli Workload Schedulerenvironment.When the COLLECT_DATA job is submitted, it identifies the affinity with theBRANCH_COLLECT job and ensures that the job runs on the same computer.

dynamic workload broker returns status information on the job to the workloadbroker workstation, which communicates it to the Master Domain Manager. Thejob status is mapped to the Tivoli Workload Scheduler status as described inTable 18.

Monitoring and cancelling jobs

You can use the Tivoli Dynamic Workload Console or the conman command lineto monitor the status of submitted jobs, retrieve the job output, and cancel jobs ifnecessary, as you normally do in Tivoli Workload Scheduler. You can also use theTivoli Dynamic Workload Console to view their status since it provides more detailon jobs processed through dynamic workload broker.

Job statuses in dynamic workload broker correspond to the following statuses inTivoli Workload Scheduler:

Table 18. Status mapping between dynamic workload broker and Tivoli Workload Scheduler

Dynamic workload broker job status Tivoli Workload Scheduler job status

1. Run failed

2. Unable to start

3. Resource allocation failed

4. Unknown

1. ABEND

2. FAILED

3. FAILED

4. ABEND

1. Submitted

2. Submitted to Agent

3. Resource Allocation Received

4. Waiting for Reallocation

5. Waiting for Resources

1. INTRO+

2. WAIT

3. WAIT

4. WAIT

5. WAIT

36 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 51: awsbrmst-fp1

Table 18. Status mapping between dynamic workload broker and Tivoli Workload Scheduler (continued)

Dynamic workload broker job status Tivoli Workload Scheduler job status

1. Running 1. EXEC+

1. Completed Successfully 1. SUCC

1. Canceled

2. Cancel Pending

3. Cancel Allocation

1. ABEND

2. The status is updated when the job reaches theCanceled state in dynamic workload broker

3. The status is updated when the job reaches theCanceled state in dynamic workload broker

You can view the job output by using both the Tivoli Dynamic Workload Consoleor the conman command-line.

The following example displays the output of the TWS_COLLECT_DATA job,submitted from Tivoli Workload Scheduler to the workload broker workstation.%sj ITDWB_SA#JOBS.TWS_COLLECT_DATA;stdlist

=========================================================== JOB : lab134114#TWS_COLLECT_DATA= USER : mdm_821= JCLFILE : COLLECT_DATA -var data_collect_interval=12

-twsaffinity jobname=branch_collect= Job Number: 226589429= Wed Oct 25 00:31:03 GMT+08:00 2006==========================================================THIS IS THE OUTPUT OF THE JOB=========================================================== Exit Status : 0= System Time (Seconds) : 30 Elapsed Time (Minutes) : 0= User Time (Seconds) : 30= Wed Oct 25 00:31:33 GMT+08:00 2006==========================================================

The keywords in the file output are as follows:

JOB Is the host name of the Tivoli Workload Scheduler agent to which the jobhas been submitted and the job name.

USER Is the Tivoli Workload Scheduler user who submitted the job to theworkload broker workstation. When a scheduled job is submitted, the username is retrieved from the STREAMLOGON keyword specified in the jobdefinition. When an ad-hoc job is submitted, the user name corresponds tothe user who submitted the job.

JCLFILEIs the job name.

Job NumberIs the job number.

Exit StatusIs the status of the job when completed.

System TimeIs the time the kernel system spent for the job.

User TimeIs the time the system user spent for the job.

Chapter 2. Using dynamic workload broker to run Tivoli Workload Scheduler jobs 37

Page 52: awsbrmst-fp1

Note: The job output is not displayed if the job belongs to a carry forward jobstream. For more information on carry forward job streams, refer to IBM TivoliWorkload Scheduler User's Guide and Reference.

You can also kill the job after submitting it. Killing a job in Tivoli WorkloadScheduler performs the same operations as issuing the cancel command indynamic workload broker.

38 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 53: awsbrmst-fp1

Chapter 3. Identifying the resources for jobs

To schedule jobs, dynamic workload broker first scans the computers in theenvironment to retrieve hardware and operating system information from theagent computers. You can also optionally create logical resources that representcharacteristics of the computers that are not gathered by the scan, such as softwarelicenses or installed applications, to further identify resources available in theenvironment.

About this task

After the Tivoli Workload Scheduler agent is installed, an automatic scan isperformed on the discovered computers where the agent is installed. The scanreturns hardware and operating system information which is stored in theResource Repository.

The hardware and operating system information returned by the scan is considereda physical resource. Physical resources collected from the agent computers includethe following:

Types of physical resources Examples

Computer system Computer system name, model, number ofprocessors, CPU speed

Operating system Operating system type and version, virtualmemory, physical memory, swap space

Network system IP address, network card, host name

File system File system storage capacity

The automatic discovery process of gathering physical resource information iscapable of identifying available computers with the resources required for jobs torun on. The scan is scheduled and configurable. You can configure the scan fromthe ResourceAdvisorAgentConfig.properties file on the master domain managerand from the JobManager.ini file on the agents. Ensure the scan runs at regulartimes to update any changes to resources. Refer to the IBM Tivoli WorkloadScheduler Administration Guide for more information about this configuration file.

When the physical resources gathered by the scan do not supply enoughinformation to accurately address specific job requirements, you can define logicalresources or resource groups using the Tivoli Dynamic Workload Console. TheTivoli Dynamic Workload Console gives you the capability to set up additionallogical resources and link them to computers where the resources are available.Logical resources help identify resources required by jobs to make allocation moreaccurate. Logical resources can also be used when expressing a consumablequantity of a resource. For example, you might use a logical resource to identifyspecific applications, and you might also use them to define a limited number ofsoftware licenses available. When a job is submitted, the job definition includes thephysical and logical resource requirements, and with this information dynamicworkload broker finds the most suitable computer.

You can also use the Tivoli Dynamic Workload Console to define a resource group.A resource group is a combination of physical and logical resources defined to

© Copyright IBM Corp. 2009, 2010 39

Page 54: awsbrmst-fp1

accurately match and allocate resources to job requirements when the job issubmitted. After creating logical resources and resource groups, you cansubsequently edit them using the Tivoli Dynamic Workload Console. If a computer,logical resource, or resource group becomes unavailable or you need to make itunavailable to perform maintenance tasks, for example, you can set the status tooffline. You can subsequently set the status online using the Tivoli DynamicWorkload Console.

The following are tasks for configuring resources:v “Creating logical resources” on page 42v “Creating resource groups” on page 44

Checking physical resources on computersYou can browse and display the physical resources discovered by the agent scanon the computers in your environment.

Before you begin

The automatically scheduled scan that runs on computers when the TivoliWorkload Scheduler agent is installed returns hardware and operating systeminformation from the agent computers to the Resource Repository. You can use theTivoli Dynamic Workload Console to view the information collected by the agent,in addition to the other information about the computers. The followinginformation can be accessed:v Operating system informationv Computer availabilityv Processor informationv Machine informationv Free memory, free virtual memory, and free swap spacev System resources allocated to jobsv A history of job instances that ran on the computers and are currently running

About this task

To view information about the physical resources available on the computers inyour environment, do the following:

Procedure1. In the console navigation tree, expand Tracking and click Computers.2. Specify the search criteria for the computers you want to find.3. Click Search. The computers that meet the search criteria are displayed in the

Computer Search Results page.4. To view the physical resources for a computer, select the display name link for

the computer. The Computer details page displays the physical resources onthe computer.

What to do next

Figure 5 on page 42 shows the Computer Search Results page. From this view youcan perform the following tasks:v Set computers offline so that they cannot be allocated to run jobs.

40 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 55: awsbrmst-fp1

v Set offline computers back online so that they can be allocated to run jobs.v Delete computers so that they are no longer visible when you search for

computers. When you delete a computer, it is temporarily removed from thedatabase for a period of time defined in theResourceAdvisorAgentConfig.properties file. After the deletion, the TivoliWorkload Scheduler agent remains installed and running. Any jobs currentlyallocated and running on the computer complete. To permanently delete acomputer, you must uninstall the Tivoli Workload Scheduler agent.

v Refresh the view of the computer search results to see updated informationabout computers.

v View the number of jobs currently allocated on a given computer in the ActiveJobs column. For each computer this column shows the number of jobs thathave selected the computer as a target system, as well as the number of jobs thatare currently allocating the computer as a related resource. In the specific caseyou defined a computer system as a type for a related resource required to run ajob (in the JSDL definition of the job), when the job is allocated it is displayedtwice in Active Jobs as follows:– If the same computer is selected both as a target system and as a related

resource, the column shows 2 jobs for that computer, even though there isonly one job running.

– If different computers are selected for the target system and the relatedresource, the column shows the same job twice (once for each computer).

v View additional information about a computer.

To perform these tasks, do the following:1. Select a computer in the Computer Search Results table.2. Select one of the following operations from the Actions menu:v Set as online

v Set as offline

v Delete

v Refresh

3. Click Go to perform the operation.

You can display details on computers by clicking the computer name link in theComputer Search Results table.

Chapter 3. Identifying the resources for jobs 41

Page 56: awsbrmst-fp1

In general, you can click links for job names, job instance names, and computersfrom the Tivoli Dynamic Workload Console to display more details about them.

Creating logical resourcesUsing the Tivoli Dynamic Workload Console, you can define logical resources andresource groups for workstations with properties that are not discovered with asystem scan. You create a logical resource specifying the characteristics of theresource that are required to run jobs.

About this task

To create a logical resource, perform the following steps:

Procedure1. In the console navigation tree, expand Scheduling Environment and click

Define a New Logical Resource. The Define a New Logical Resource wizardstarts. The wizard helps you create a new resource and add it to computers inyour environment.

2. In the General Properties page, define the general properties for the logicalresource:a. In the Name field, type the name to be assigned to the logical resource. This

field is required. The name must start with an alphabetical character, andcan contain underscore symbols ( _ ), minus symbols (-), and periods (.).Spaces, special characters, accented characters are not supported.

b. In the Type field, type a meaningful name for the logical resource type. Forexample, if the logical resource describes DB2® applications, you might callthe resource DB2. The name must start with an alphabetical character, and

Figure 5. Computer Search Results page

42 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 57: awsbrmst-fp1

can contain underscore symbols ( _ ), minus symbols (-), and periods (.).Spaces, special characters, accented characters are not supported.

c. In the Quantity field, specify a value that represents the availability of thelogical resource. For example, if the resource consists in a license server, youcan specify the number of licenses available on the server for a product.This field is optional.

d. Select the Set as Offline check box to mark the resource as not available.You can subsequently change the resource status by expanding SchedulingEnvironment in the left pane and selecting Logical Resources. You can thensearch for a resource and modify the status.

e. Click the Next button to proceed.3. In the Computer Search Criteria page, specify the criteria for searching the

computers to be added to the logical resource. In this page, you can eitherperform a search on all computers available in the dynamic workload brokerenvironment or you can search for specific computers. To search on allavailable computers, leave all fields blank. As an alternative, you can specifyone or more of the search criteria listed below. The search criteria arecumulative; each additional information you specify further refines the search:v In the Host Name field, specify the host name of a computer. Wildcards are

supported. The search is performed on computers with the specified hostname or section of the host name. For example, if you enter test* in the Hostname field, the test1 and testing host names are returned.

v In the Logical resources already on the computer area, specify the name andtype of logical resources already present on the computer, if any. In theName field, specify the logical resource name and in the Type field specifythe logical resource type. Wildcards are supported.

v In the Availability area, specify whether the computer is:

AvailableThe computer is available and can be assigned jobs.

UnavailableThe computer is not available. The network might be down or thecomputer might be switched off.

v In the Status area, define the status of the specified computer.

OnlineThe computer is online.

OfflineThe computer is offline. The administrator might have set thecomputer offline for maintenance purposes.

v In the Hardware Characteristics area, specify the number of processorsavailable on the computer:

Single processorThe computer contains one processor.

Double processorThe computer contains two processors.

Multi processorThe computer contains three or more processors.

v In the Operating System area, specify the operating system installed on thecomputers for which you want to search. The search is performed only forcomputers with the selected operating systems. Available operating systemsare:

Chapter 3. Identifying the resources for jobs 43

Page 58: awsbrmst-fp1

– Windows

– Linux

– AIX

– Sun Solaris

– HP-UX

The results of the search are displayed in the Computer Search Results pages.4. In the Computer Search Results page, you specify to which computers you

want to add the logical resource you are creating. Your selections are displayedin the Summary page.

5. In the Summary page, you can optionally remove the selected computer fromthe logical resource you are defining. Click Finish to save the logical resource.

Results

The logical resource has been created and can be accessed using the SchedulingEnvironment → Logical Resources task. You can perform the following operationsusing this task:v Set the online or offline status of the logical resource.v Delete the logical resource.v Edit the logical resource specifications, including the computers where the

logical resource is located, the online or offline status of the computers, and thelogical resource name, unless the logical resource was imported from theConfiguration Management Database. A Configuration Management Databaselogical resource can be identified in the table of logical resources by the valueCCMDB in the Owner column.

Creating resource groupsUsing the Tivoli Dynamic Workload Console, you can create resource groups togroup computers, logical resources, or both. A resource group represents a logicalassociation between computers, logical resources, or both with similar hardware orsoftware characteristics. It is a combination of physical and logical resources toaccurately match and allocate resources to job requirements when the job issubmitted.

About this task

To create a resource group, perform the following steps:

Procedure1. In the console navigation tree, expand Scheduling Environment and click

Define New Resource Group. The Resource Group wizard starts. The wizardhelps you create a new resource group.

2. In the Group Type Selection page, specify a name, the status, and a type forthe resource group:a. In the Name field, type the name to be assigned to the resource group. The

name must start with an alphabetical character, and can contain underscoresymbols ( _ ), minus symbols (-), and periods (.). Spaces, special characters,and accented characters are not supported. This field is required.

b. Select the Set as Offline check box to mark the resource group as notavailable. You can subsequently change the resource group status by

44 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 59: awsbrmst-fp1

expanding Scheduling Environment in the left pane and selecting ResourceGroups. You can then search for a resource group and modify the status.

c. In the Select items to be grouped area, select the elements the groupconsists of. Supported values are computers, logical resources or both. Thisfield is required.

d. Click the Next button to proceed.3. In the Computer Search Criteria page, specify the criteria for searching

available computers to be added to the resource group. In this page, you caneither perform a search on all computers available in the dynamic workloadbroker environment or you can search for specific computers. To search on allavailable computers, leave all fields blank. As an alternative, you can specifyone or more of the search criteria listed below. The search criteria arecumulative; each additional information you specify further refines the search:v In the Host Name field, specify the host name of a computer. Wildcards are

supported. The search is performed on computers with the specified hostname or section of the host name. For example, if you enter test* in the Hostname field, the test1 and testing host names are returned.

v In the Logical resources already on the computer area, specify the name andtype of logical resources already present on the computer, if any. In theName field, specify the logical resource name and in the Type field specifythe logical resource type. The name and type must start with an alphabeticalcharacter, and can contain underscore symbols ( _ ), minus symbols (-), orperiods (.). Spaces, special characters, and accented characters are notsupported.

v In the Availability area, specify whether the computer is:

AvailableThe computer is available to be allocated.

UnavailableThe computer is not available. The network might be down or thecomputer might be switched off.

v In the Status area, define the status of the specified computer.

OnlineThe computer is online.

OfflineThe computer is offline. The administrator might have set thecomputer offline for maintenance purposes.

v In the Hardware Characteristics area, specify the number of processorsavailable on the computer:

Single processorThe computer contains one processor.

Double processorThe computer contains two processors.

Multi processorThe computer contains three or more processors.

v In the Operating System area, specify the operating system installed on thecomputers for which you want to search. The search is performed only forcomputers with the selected operating systems. Available operating systemsare:– Windows

– Linux

Chapter 3. Identifying the resources for jobs 45

Page 60: awsbrmst-fp1

– AIX

– Sun Solaris

– HP-UX

Click Next to perform the search based on the criteria specified. The results ofthe search are displayed in the Computer Search Result page.

4. In the Computer Search Result page, you specify to which computers youwant to add the group you are creating. Click Next.

5. If the resource group you are defining includes a logical resource, then theLogical Resource Search Criteria page prompts you to specify the followingsearch criteria:a. The name of the logical resource.b. The type of logical resource.

Click Next to display the Logical Resources Search Results page.6. Select the logical resource to add to the resource group you are defining and

click Next to display the Summary page.7. In the Summary page, you can optionally remove any computer or logical

resource that you included in the resource group. Click Finish to save theresource group.

Results

The resource group has been created and can be accessed using the SchedulingEnvironment → Resource Groups task. You can perform the following operationsusing this task:v Set the online or offline status of the resource group.v Delete the resource group.v Edit the resource group specifications, including adding and removing

computers and logical resources from the group, changing their online or offlinestatus, and changing the resource group name.

46 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 61: awsbrmst-fp1

Chapter 4. Writing JSDL definitions with the Job BrokeringDefinition Console

The Job Brokering Definition Console provides an easy-to-use graphical interfacethat helps you create and edit JSDL job definitions for use with dynamic workloadbroker.

The Job Brokering Definition Console graphical interface helps you create and editjob definitions based on the Job Submission Definition Language (JSDL) schema.Each text field in the Job Brokering Definition Console corresponds to an elementor attribute in the JSDL file and vice versa.

The Job Brokering Definition Console simplifies the task of creating a JSDL file byhiding the complexity of the file itself and validating the file structure against theJSDL schema. Information defined in the Job Brokering Definition Console isautomatically converted to the corresponding element or attribute in the JSDL file.

You can save a JSDL file locally or upload it as a job definition in the JobRepository where it becomes available for submission. When you save the file inthe Job Brokering Definition Console, the JSDL file is checked against an .xsd fileprovided with the product installation which contains the syntax rules. A messageis displayed if a syntax error is encountered in the JSDL file, allowing you tocorrect the error.

The Job Submission Description Language (JSDL) is an XML-based language usedfor specifying the characteristics and requirements of a job, as well as instructionson how to manage and run it. These include the following:v Job identification informationv Program running informationv Resource requirementsv Scheduling and running requirementsv Resource quantity to be allocated or requiredv Logical allocation of the resource quantity

Selecting target types

When creating a JSDL file, you can choose between the following resource types astargets for your job:

ResourcesA resource is a computer system. You can use this resource type to define abasic requirement for your job.

Related resourcesA related resource is a set of resource types. You can use this resource typeto define a basic requirement for your job. A related resource includes thefollowing resource types:v A set of hardware and software properties of a computer such as

operating system, file system and network system.

© Copyright IBM Corp. 2009, 2010 47

Page 62: awsbrmst-fp1

v Logical resources and logical entities that can be associated to one ormore computers to represent applications, groups, licenses, servers andso on.

Related resources have two main functions:v You can specify related resources as an additional requirement adding to

the resource requirement. In this case, you must create a relationshipbetween the resource and the related resource.

v You can use the related resource to indicate that the presence of a certainresource in your environment is a co-requisite for running the job. Inthis case, you must not create a relationship between the resource andthe related resource. A related resource having no relation to a resourceis a global resource. For example, if you want to move a file fromresource A to resource B, resource B is a co-requisite for running the jobwhich moves the file. Computers can only be defined as globalresources.

Selecting resource types

Dynamic workload broker manages the resource types listed in Table 19. For eachresource type, you can specify requirements on the properties listed in theAvailable properties column. Table 19 also lists consumable properties andproperties that can be optimized. Consumable properties can be allocatedexclusively to the job while it runs using the allocation mechanism. Properties thatcan be optimized can be used to provide a more effective load balancing on theresource property.

Table 19. Resource types and properties

Resource Type Available properties Is consumable Can be optimized Supports wildcards

ComputerSystem CPUUtilization No Yes No

HostName No No Yes

Manufacturer No No Yes

Model No No Yes

NumOfProcessors Yes Yes No

ProcessingSpeed No Yes No

ProcessorType No No No

LogicalResource DisplayName No No Yes

SubType No No Yes

Quantity Yes Yes No

OperatingSystem DisplayName No No Yes

FreePhysicalMemory No Yes No

FreeSwapSpace No Yes No

FreeVirtualMemory No Yes No

OperatingSystemType No No No

OperatingSystemVersion

No No No

TotalPhysicalMemory Yes Yes No

TotalSwapSpace Yes Yes No

TotalVirtualMemory Yes Yes No

48 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 63: awsbrmst-fp1

Table 19. Resource types and properties (continued)

Resource Type Available properties Is consumable Can be optimized Supports wildcards

FileSystem DisplayName No No Yes

FileSystemRoot No No Yes

FileSystemType No No No

FreeStorageCapacity No Yes No

TotalStorageCapacity Yes Yes No

NetworkSystem NetworkAddress No No No

NetworkSystemHostName

No No Yes

When you define the requirements for a job definition, you can define the amountof a consumable property which will be allocated to the job. When a resourceproperty is allocated to a job, the amount you specify is logically reserved for thejob. If another job is submitted which allocates a value greater than the remainingcapacity of the same consumable property, this job cannot run on the sameresource as the previous job because the required property is already reserved. Ifno property allocation is specified in the job definition, the job can run on the sameresource as the previous job because the allocation mechanism applies only if bothjobs allocate the same property.

You can use the allocation mechanism to limit concurrent use of the same quantityby several jobs and improve system performance.

To allocate a property for a job, use the allocation element in the JSDL file or theSoftware Requirements and Hardware Requirements tabs in the Job BrokeringDefinition Console.

This allocation type applies to computer systems. To allocate a property for aresource other than a computer system, you define the resource whose propertyyou want to allocate in the Related resource pane and define the allocation settingfor one or more of its properties. You then define a relationship between theresource and the related resource you created. In this way you define the relatedresource and the allocated property as a requirement for the job to run.

Job definitionsThis topic provides an overview of the possible content of job definitions anddescribes how the different types of job definition content are added using the JobBrokering Definition Console.

A job definition contains all the information required to determine the computersystem or systems on which a job could run, any scheduling and job balancingrules that are to be applied when allocating resources, as well as the informationrequired to identify and run the application. It is defined using the Job SubmissionDescription Language (JSDL).

JSDL is an XML-based language used for specifying the characteristics andrequirements of a job, as well as instructions on how to manage and run the jobs.A JSDL file can include the following types of information

Chapter 4. Writing JSDL definitions with the Job Brokering Definition Console 49

Page 64: awsbrmst-fp1

Basic job informationIncludes the job name, any job categories to which you want to assign it,and any variables that are used in the job.

Variables can be used in several ways in a job definition. For example:v A set of variables can describe a command and its arguments. These can

be added to program running information and within the script of thejob.

v Variables can also be used to identify resources, for example, a targethost.

The default value assigned to the variable in the job definition is usedwhen the job is run, unless it is overridden at submission time. See “UsingTivoli Workload Scheduler variables in dynamic workload broker jobs” onpage 31 and “Using variables in job definitions” on page 57.

Program running informationIdentifies the script or executable to be run and, if necessary, standardinput, output, and error files and the working directory. If the job needs toprovide credentials these can also be specified.

You can define the required credentials to run a job if the credentials aredifferent from those under which the Tivoli Workload Scheduler agentruns.

On Windows targets, jobs with no specified credentials, run under the useraccount specified during the Tivoli Workload Scheduler agent installation,unless the agent runs under the Local System account. In this case, any jobsubmitted to the agent runs under the default administrator's account.

On UNIX® targets, jobs with no specified credentials, run under root.

Required resource specificationsEnables dynamic workload broker to identify the computer systems onwhich the job can run based on hardware and software requirements.

Related requirementsAllow you to specify required relationships between resources andco-requisite resources for a job.

AllocationResource quantity to be allocated or required.

Optimization and load-balancing policies.

The following load balancing policies are available:

Balance load between resources by number of jobs runningJobs are assigned to targets based on the number of jobs currentlyrunning on each target. The objective is to ensure that eachresource runs the same number of jobs during the same timeinterval. This policy is the default. It is suitable for situationswhere many similar jobs, which consume similar quantities ofsystem resources, are to be run on a set of resources

Balance load between resources by optimization objectiveYou define an objective by selecting a resource type and relatedresource property and specifying the objective to maximize orminimize the property. For example, you could balance load withthe aim of keeping the amount of free physical memory availableon operating system resources as high as possible. The objectivewould be set to maximize free physical memory and when jobs

50 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 65: awsbrmst-fp1

with this objective are submitted, they are allocated to availableresources so that more jobs go to the resources that currently havethe greatest amount of free physical memory.

Select best resource by optimization objectiveYou define the optimization objective in exactly the same way asdescribed for the Balance load between resources by optimizationobjective. However, when a job with this policy is submitted, itwould always be assigned to the resource that best matched theobjective. For example, if the objective is to maximize free physicalmemory, the job would run on the resource that had the highestamount of free physical memory at submission time.

Enterprise Workload ManagerIf you have Enterprise Workload Manager installed, you can definejobs with an optimization policy to use the load-balancingcapabilities of this product.

In the JSDL schema, the Optimization page corresponds to theoptimization element.

Scheduling and running requirements.Allows you to define a priority, the time a job can wait for resources beforefailing, and recovery actions in the event of a failure.

The maximum priority is 100 and priority settings between 90 and 100should only be used for critical jobs. Jobs with these priorities are alwaysallocated resources ahead of other waiting jobs regardless of how long theother jobs have been waiting. At lower priorities than 90, jobs are allocatedresources based on the priority setting and the age of the job. As timepasses, jobs with a low priority setting increase their priority so that theyeventually are allocated resources even if jobs with higher initial prioritiesare waiting.

The Job Brokering Definition Console graphical interface allows you to create andedit job definitions based on the JSDL schema. Fields in the Job BrokeringDefinition Console correspond to elements in the JSDL schema. When creating ajob definition using the Job Brokering Definition Console, you can view the jobdefinition structure in the Outline pane.

Chapter 4. Writing JSDL definitions with the Job Brokering Definition Console 51

Page 66: awsbrmst-fp1

The JSDL schema offers great flexibility in defining jobs and their requirements. Ajob can have a very open definition, with few defined requirements, allowing it torun on a wide range of resources and to follow default rules for load balancing.Other jobs could have a much more detailed set of hardware and softwarerequirements, as well as specific resource allocations and a load balancing policy.Using the graphical interface simplifies the task of creating JSDL files andeliminates many of the risks of error that occur when the files are edited manually.The different elements that make up a job definition are available, in many caseswith a set of fixed values from which you can choose. Information defined in theJob Brokering Definition Console is validated, ensuring that any values you haveentered are correct and consistent with each other.

In addition, the Job Brokering Definition Console also includes content assistancethat provides server-side values for several fields on the interface, for example,candidate host names and logical resources, to name a few. Fields with contentassistance are identified by a light-bulb icon next to the field. Position your mouseover the light-bulb and press Ctrl + Space to display a list of possible values.Server-side values are populated using the server cache for the currently activeserver connection. Server data is cached automatically when the initial connectionto a server is made or each time the server connection is changed. You can refreshthe cache at any time, for example, if you have defined a new resourcerequirement on the server, by selecting Server → Refresh Server Data Cache.

When you save the file in the Job Brokering Definition Console, the JSDL file ischecked against an .xsd file provided with the product installation which containsthe syntax rules. A message is displayed if a syntax error is encountered in the

Figure 6. Job Brokering Definition Console main page

52 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 67: awsbrmst-fp1

JSDL file, allowing you to correct the error. You can save the JSDL files locally orupload them as job definitions in the Job Repository where they become availablefor submission.

Resources in the job definitionThis topic provides an overview of how resources and their properties are used inthe job definition to identify possible targets, to reserve allocations of consumableresources, and to optimize load balancing between available resources.

An understanding of physical and logical resources and their properties is the keyto creating a job definition that accurately targets suitable resources for running thejob, determines the resource allocation requirement, and contributes to balancingthe load between available resources. Each resource has one or more propertiesassociated with it. Properties can have the following characteristics:

Is consumableProperties of resources that are consumable have finite amount associatedwith them which can be consumed by the jobs that are allocated to theresource. For example, a computer system has a finite number ofprocessors.

Can be optimizedSome properties can be used to define optimization objectives, whichdetermine how load is to be balanced when jobs are allocated to a group ofresources. For example, you could choose to allocate a job to the matchingresource that has the lowest CPU usage.

Supports wildcardsSome properties can be specified in the job definition using wildcards. Forexample, a requirement for a particular series of computer models could bedefined by specifying the model using wildcards.

Table 20 shows the different resource types that can be included in a job definitionand their available properties.

Table 20. Resource types and properties

Resource Type Available properties Is consumable Can be optimized Supports wildcards

ComputerSystem CPUUtilization No Yes No

HostName No No Yes

Manufacturer No No Yes

Model No No Yes

NumOfProcessors Yes Yes No

ProcessingSpeed No Yes No

ProcessorType No No No

LogicalResource DisplayName No No Yes

SubType No No Yes

Quantity Yes Yes No

Chapter 4. Writing JSDL definitions with the Job Brokering Definition Console 53

Page 68: awsbrmst-fp1

Table 20. Resource types and properties (continued)

Resource Type Available properties Is consumable Can be optimized Supports wildcards

OperatingSystem DisplayName No No Yes

FreePhysicalMemory No Yes No

FreeSwapSpace No Yes No

FreeVirtualMemory No Yes No

OperatingSystemType No No No

OperatingSystemVersion

No No No

TotalPhysicalMemory Yes Yes No

TotalSwapSpace Yes Yes No

TotalVirtualMemory Yes Yes No

FileSystem DisplayName No No Yes

FileSystemRoot No No Yes

FileSystemType No No No

FreeStorageCapacity No Yes No

TotalStorageCapacity Yes Yes No

NetworkSystem NetworkAddress No No No

NetworkSystemHostName

No No Yes

Resource properties can be used in the job definition in the following ways:

Identifying targets for the jobOn the Resources page of the Job Brokering Definition Console, you cansupply information about the resources required for the job. Using thisinformation, dynamic workload broker can identify the computer systemson which the job could run. In addition to the basic hardware and softwarerequirements, you can use the Advanced Requirements tab to includerequirements for specific resource properties. For example, you can add arequirement for a specific processor type or specify a required range ofprocessor speeds. In the JSDL schema, the Resources page corresponds tothe resources element.

When you define a resource requirement, the underlying relationshipbetween the required resource and the computer system which containsthe resource is automatically created by the Job Brokering DefinitionConsole to facilitate the usage of the product.

Resource property requirements to be used when identifying targets for jobcan also be specified on the Related Resources page. A related resourceincludes the following resource types:v A set of hardware and software properties of a computer such as

operating system, file system, and network system.v Logical resources, which are a flexible means of providing information

about your environment in addition to the information collected by thehardware scan. For example, you could create logical resources torepresent applications, groups, licenses, or database access. A logicalresource can be linked to one or more specified computers or it can be afreestanding global resource, available to all computers.

54 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 69: awsbrmst-fp1

Related resources have two main functions:

To specify additional requirements, making the matching criteria forpossible targets more precise

Targets can only match if they either contain or are associated withthe specified resource. In addition to defining the related resourcein the job definition, you must also define its relationship to thetarget resource and specify the relationship type as contains orassociates with. Related resource that define hardware andsoftware properties always have a contains relationship whilelogical resources often have an associates with relationship. Forexample, if a related requirement for a logical resource thatrepresents a node-locked license is included, the target systemmust be one of those that is associated with this resource, andtherefore a target where the license is available.

To specify global resources that must be available for the job to runThese related resources are not related to the target resource andhave no role in finding matching resources for the job to run on.The resource must be available to the job at submission time. Forexample, if a license required to run the software used by the job isof a type that is not assigned to any computer, a logical resourcecould be created to identify it and to track the number of licensesthat exist and that are in use. No computers are associated withthis logical resource and so it is referred to as a global resource,available to all computers. The job definition includes a relatedresource identifying the floating license logical resource and thenumber of licenses required. Before the job can run, it must bepossible to meet this requirement.

In the JSDL schema, the Related Resources page corresponds to therelatedResources element.

When the resource requirements for the job are defined, logical rules areapplied to determine whether the requirements are alternatives to eachother (OR) or whether they are inclusive (AND). In general, the differenttypes of requirements have an AND relationship, for example, if youspecify an operating system type, CPU architecture, and a value forminimum physical memory, the target resource for the job must meet all ofthese requirements.

Within the following requirement types, you can specify alternatives thathave an OR relationship:v Candidate hostsv Candidate CPU architecturesv Candidate operating systems

If several entries are added for any of these requirement types, they areconsidered as alternatives. For example, if Linux, AIX, and HP-UX arespecified as candidate operating systems, the target resource for the jobmust have one of these operating system types.

Within the following requirement types, all requirements specified must bemet by the target resource for the job.v Logical resourcesv File systems

Chapter 4. Writing JSDL definitions with the Job Brokering Definition Console 55

Page 70: awsbrmst-fp1

For example, if you add Local Disk and CD ROM to the File systemrequirements, the target resource for the job must have both a local diskand a CD ROM.

Reserving resourcesWhen defining the requirements for a job definition, you can define theamount of a consumable property which will be allocated to the job. Whena resource property is allocated to a job, the amount you specify islogically reserved for the job. If another job is submitted which allocates avalue greater than the remaining capacity of the same consumableproperty, this job cannot run on the same resource as the previous jobbecause the required property is already reserved. If no property allocationis specified in the job definition, the job can run on the same resource asthe previous job because the allocation mechanism applies only if both jobsallocate the same property.

You can use the allocation mechanism to limit concurrent use of the samequantity by several jobs and improve system performance.

On theJob Brokering Definition Console, you can allocate a specifiedquantity of a consumable property. You can use the allocation pane fromthe Advanced Requirements tab of the Resources page or you can definea required resource and property in the Related resource page and specifythe amount of the property to be allocated. From the AdvancedRequirements tab on the Resources page, you can only allocateconsumable properties of computer system resources.

Defining load-balancing policiesYou can use the Optimization page in the Job Brokering DefinitionConsole to define custom rules for load-balancing to be applied when thejob is submitted. The default method of load-balancing is to aim toequalize the number of jobs running on each resource.

Dynamic workload broker provides two types of optimization policy typesthat use rules based on resource properties:v Balance load between resources by optimization objectivev Select best resource by optimization objective

For both policies, you define an objective to distribute jobs minimizing ormaximizing the property of a computer system, a file system, a logicalresource, or an operating system. For example, you could balance loadswith the aim of keeping the free physical memory available on operatingsystem resources as high as possible.

When the Balance load between resources by optimization objectivepolicy is used, jobs are distributed between matching resources based on astatistical probability that the resource currently has highest amount of freephysical memory of all matching resources. When the Select best resourceby optimization objective policy is used, the job is allocated to theresource that has the highest amount of free physical memory.

When defining an objective, you must select a resource that is included inthe job definition as part of the identification of targets for the job. Forexample, if you want to define the objective to minimize free physicalmemory, at least one operating system requirement must be included inthe job definition. This could be candidate operating systems, a physical orvirtual memory requirement, or a related requirement involving operatingsystem properties. Computer system properties are the exception to this

56 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 71: awsbrmst-fp1

rule. Optimization objectives using computer system properties can bealways defined even if the job definition includes no explicit computersystem requirements.

For information about all available load balancing policies, see “Jobdefinitions” on page 49.

Using variables in job definitionsUse of variables adds flexibility to the job definitions.

There are two types of variables in a job definition:

Job variablesThere are three types of job variables: String, Double, Integer. You candefine job variables in your job definition that are resolved or overwrittenat job submission time. This enables the job definition to be used fordifferent situations by specifying different values for the variable atsubmission time. You define variables in the variable element, but you canrefer to the variable from several other elements.

You define variables and assign them values from the Overview page onthe Job Brokering Definition Console. Job variables are referenced in thejob definition in the format ${variable_name}. For example, to use a variableto set the minimum amount of physical memory required for a job to 512MB, do the following:1. In the Variables pane of the Overview page, add the string variable

memory and assign it a value of 512.2. On the Hardware Requirements tab of the Resources page, select

Range value for Physical memory and set the Minimum value to${memory}.

When jobs are submitted, using Tivoli Dynamic Workload Console, TivoliWorkload Scheduler Task field, or the dynamic workload broker CLI,default values for variables defined in the job definition can be overriddenand new variables can be added.

Environment variablesEnvironment variables are set in the run time environment for the dynamicworkload broker job definition. Environment variables can be used tochange the run time environment for the job on the assigned resource. Thisenables you to change only the values of the environment variables whenyou change the resources for the job definition. Environment variables arereferenced in the job definition in the format $variable_name wherevariable_name is the name of the environment variable.

Environment variable values cannot be set or overwritten when the job issubmitted.

Using JSDL job definition templatesUse job definition templates to be able to run multiple jobs based on a single JSDLdocument, or to turn a traditional job into a dynamic job without the need to createa specific JSDL definition for it.

You have two options for writing the JSDL job definitions for the workload youwant to submit with dynamic workload broker:v Writing a separate definition for each job

Chapter 4. Writing JSDL definitions with the Job Brokering Definition Console 57

Page 72: awsbrmst-fp1

v Writing a generalized definition that you can use as a template to run more jobs

Writing and using templates is an option that lets you reuse the same JSDLdocument on multiple jobs when they use the same resources and candidate hostsand share similar scheduling and optimization preferences. This requires that youalso define an extended agent workstation for each template you implement, sothat at runtime the JSDL template can be properly identified by selecting theextended agent on which the job you want to run is defined. In this way, you canmake up classes of jobs where all the jobs that belong to the same class are definedto run on the same extended agent and therefore select, by means of the workloadbroker workstation, the same JSDL document to submit to the broker.

Except when they include return code mapping expressions, traditional TivoliWorkload Scheduler jobs can be routed to dynamic workload broker by simplychanging their CPU to an appropriate extended agent, without changing the jobdefinition and without requiring a different JSDL definition for each job. This is therecommended way for changing static workload into dynamic workload in TivoliWorkload Scheduler. It is in the long run more expedient than the transitionprocedure described in “Modifying your existing workload definitions for use withdynamic workload broker” on page 28.

Writing a JSDL job definition template

Specific, prepackaged JSDL templates that you can fill in do not exist. Rather, youwork a number of steps so that you can write in the Job Brokering DefinitionConsole a JSDL file that can be referenced by more Tivoli Workload Scheduler jobdefinitions.

To write a template you use the following:v The composer command line or the Tivoli Dynamic Workload Console to define

extended agents (with their access method) and to create or modify jobdefinitions in Tivoli Workload Scheduler.

v The Job Brokering Definition Console to write the JSDL file that you then use asa template.

The steps are:1. In the Job Brokering Definition Console, you create a JSDL document, give it a

name, and save it in the in the Job Repository of dynamic workload broker.Like for regular job definitions, fill in the data throughout the pages of the JobBrokering Definition Console, specifying the required resources, andoptimization and scheduling details. Unlike you do in regular job definitions, inthe Application page, after setting the Type to Executable (or to Extended Job),specify the following variable name in the Script (or Task string) field:${tws.job.taskstring}

2. With composer or the Tivoli Dynamic Workload Console define a workstation oftype extended agent hosted by the workload broker workstation.If you need background information about extended agents, see the TivoliWorkload Scheduler User's Guide and Reference. For the purpose of creating thetemplate, however, you only need to know the following facts about anextended agent:v It is a logical definition that must be hosted by a physical workstation. In

this case the physical workstation must always be the workload brokerworkstation. This workstation can host as many extended agents as youneed.

58 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 73: awsbrmst-fp1

v It requires an access method. An access method can be a complex program,but in this case it is only a statement that references the name of the JSDLfile that will be your template. The access method statement is included inthe definition of the extended agent and must have the following syntax:ACCESS "/jsdl/filename_of_the_ JSDL_template -var name=value,name=value,..."

where -var name=value is optional and represents one or more variablespassed by the workload broker workstation to dynamic workload broker atjob submission time.

3. Add the extended agent to the plan as you do with any other workstation. Theworkload broker workstation has the task of managing the lifecycle of theextended agent, notifying the master domain manager that it is up andrunning.

When jobs are run on the extended agent, they are routed to the workload brokerworkstation, which handles them differently from other jobs. Instead of searchingfor the name of the JSDL definition in the task string of the job, the workloadbroker workstation:1. Gets the name of the target JSDL from the access method, and passes the task

string as a value for variable ${tws.job.taskstring}.2. The task string value is replaced in the script element of the target JSDL, and is

used as a command string to run on the target agent that is dynamicallyselected by the dynamic workload broker.Thus, the JSDL definition invoked by the workload broker workstation worksas a sort of template that you can use to run different task strings defined indifferent Tivoli Workload Scheduler jobs: the same JSDL document is reused formultiple jobs.

Example

You want to exploit dynamic workload broker to run a job named SUBMIT_JOBXAand you want to use a JSDL template. The following definitions accomplish this:1. The definition of the workload broker workstation. It is named DGCENTER_DWB

and it is of type BROKER. There can be only one workload broker workstationrunning at a time in a Tivoli Workload Scheduler network (this applies also tothe dynamic workload broker server).CPUNAME DGCENTER_DWB

OS OTHERNODE DGCENTER TCPADDR 41111ENGINEADDR 31111DOMAIN MASTERDMFOR MAESTRO

TYPE BROKERAUTOLINK ONBEHINDFIREWALL OFFFULLSTATUS OFF

END

2. The definition of extended agent DGCENTER_DWBXA. The extended agent must:v Be hosted by the workload broker workstation (DGCENTER_DWB in this

example).v Include the access method. While normally the ACCESS keyword is followed

by the name of the program that implements the specific access method, inthe case of JSDL templates it needs only to define the name of the JSDLdocument you use as template - that must be stored in the dynamicworkload broker Job Repository in the Tivoli Workload Scheduler database

Chapter 4. Writing JSDL definitions with the Job Brokering Definition Console 59

Page 74: awsbrmst-fp1

and available in a local folder in the workstation where you run the JobBrokering Definition Console- and whatever other parameters you want touse. These items must be enclosed between double quotes.This requires that you created the JSDL document you will be using as atemplate (named SJT in this example), defining the required resources,candidate hosts, and scheduling and optimization preferences, and specifying${tws.job.taskstring} in the Script field of the executable.

CPUNAME DGCENTER_DWBXAOS OTHERNODE DGCENTER TCPADDR 41111FOR MAESTRO HOST DGCENTER_DWB ACCESS "/jsdl/SJT -var target=D:\vmware,RES=RES1"

TYPE X-AGENTAUTOLINK OFFBEHINDFIREWALL OFFFULLSTATUS OFF

END

3. The definition of job SUBMIT_JOBXA in Tivoli Workload Scheduler:DGCENTER_DWBXA#SUBMIT_JOBXASCRIPTNAME "C:\TWS\Utils\Jobs\javacount_on.bat"STREAMLOGON AdministratorDESCRIPTION "Added by composer."TASKTYPE WINDOWSRECOVERY STOP

The fact that the job is defined to run on extended agent DGCENTER_DWBXA,hosted by the workload broker workstation and matched with the SJT JSDLdefinition, drives the process that:a. Submits the job via dynamic workload brokerb. Uses the specifications of the SJT JSDL definitionc. Replaces variable ${tws.job.taskstring} in SJT with the task string of

SUBMIT_JOBXA, that is:C:\TWS\Utils\Jobs\javacount_on.bat

Scenarios for creating job definitionsThese scenarios provide examples of creating job definitions with different types ofrequirements.

JSDL and the Job Brokering Definition Console provide very flexible tools fordefining jobs. The following scenarios provide examples of how to set up a jobdefinition to achieve your objectives for identification of targets, resourceallocation, and load balancing:v “Scenario: Creating a job definition using a computer resource group” on page

61.This scenario demonstrates the use of a resource group to specify candidatetarget systems.

v “Scenario: Creating a job definition using a logical resource group” on page 62.This scenario demonstrates the use of a resource group to specify logicalresources required for the job..

v “Scenario: Creating a job definition for a job to run on x86 processors” on page63This scenario demonstrates the use of advanced requirements for resources andthe use of resource properties for defining load-balancing rules.

v “Scenario: Creating a job definition for a script to run on a specific operatingsystem” on page 64

60 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 75: awsbrmst-fp1

This scenario demonstrates the creation of relationships between an operatingsystem type software resource and an additional resource requirement.

v “Scenario: Alternative operating system requirements” on page 65This scenario demonstrates the definition of two resource requirements related tospecific operating system types and a minimum free physical memoryrequirement.

Scenario: Creating a job definition using a computer resourcegroup

In this scenario, a job is created to run the inventory update program, selecting thetarget system from the invadmin resource group set up to include the computersthat are suitable for running the script.

About this task

To create a job definition that does this, perform the following steps:

Procedure1. In the Job Brokering Definition Console select File → New → Job brokering

definition and create a new job definition named compgroupjob. The jobdefinition opens at the Overview page with the job name assigned.

2. Open the Application page and identify and attach the script, as follows:a. In the Type menu, select Executable.b. In the Executable pane, select the Executable File radio button.c. Click Browse and locate the executable file.d. Click OK.

3. Open the Resources page and specify the resource group, as follows:a. Select the Advanced Requirements tab.b. In the Resource Group pane, click Add. The Resource Group Details dialog

box is displayed.c. In the Group Name field, type invadmin (the resource group name, as

defined in the Tivoli Dynamic Workload Console).4. Select File → Save to save the job definition file.

Results

The JSDL file created for this scenario has the following syntax:<jsdl:jobDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:jsdl="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdl"xmlns:jsdle="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdle"xsi:schemaLocation="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdl JSDL.xsdhttp://www.ibm.com/xmlns/prod/scheduling/1.0/jsdle JSDL-Native.xsd"description="Run inventory update script on a computer from theinvadmin resource group." name="compgroupjob">

<jsdl:application name="executable"><jsdle:executable path="/opt/invupdate">

</jsdle:executable></jsdl:application><jsdl:resources>

<jsdl:group name="invadmin"/></jsdl:resources>

</jsdl:jobDefinition>

Chapter 4. Writing JSDL definitions with the Job Brokering Definition Console 61

Page 76: awsbrmst-fp1

Scenario: Creating a job definition using a logical resourcegroup

In this scenario, the target for the job is determined by several requirementsdefined as logical resources. A resource group has been created to include all thelogical resources required for the job.

About this task

To create a job definition that does this, perform the following steps:

Procedure1. In the Job Brokering Definition Console selectFile → New → Job brokering

definition and create a new job definition named loggroupjob. The jobdefinition opens at the Overview page with the job name assigned.

2. Open the Application page and define the required information for theapplication that the job is to run.

3. Open the Related Resources page and create a requirement for a logicalresource, as follows:a. In the Resource Requirements pane, click Add. The Resource Requirement

Details dialog box is displayed.b. In the ID field, specify a meaningful ID, in this example, loggroup.

4. Open the Resources page and create a relationship to the resource requirement,as follows:a. Select the Advanced Requirements tab.b. In the Relationships pane, click Add. The Relationship Details dialog box is

displayed.c. In the Type menu, select Associates with.d. In the Target menu, select the resource requirement that you created and

click OK.5. Switch back to the Related Resources page and add the logical resource group

as follows:a. In the Resource Group pane, click Add. The Resource Group Details dialog

box is displayed.b. In the Group Name field, type the resource group name, as defined in the

Tivoli Dynamic Workload Console.6. Select File → Save to save the job definition file.

Results

The JSDL file created for this scenario has the following syntax:<jsdl:jobDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:jsdl="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdl"xsi:schemaLocation="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdl JSDL.xsd"description="A job whose requirements are defined by a number of logicalresources. " name="loggroupjob">

<jsdl:application name="executable"><jsdle:executable path="/opt/myExecutable"></jsdle:executable>

</jsdl:application><jsdl:resources>

<jsdl:relationship target="loggroup" type="AssociatesWith"/></jsdl:resources>

62 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 77: awsbrmst-fp1

<jsdl:relatedResources id="loggroup" type="LogicalResource"><jsdl:group name="logresgroup"/>

</jsdl:relatedResources></jsdl:jobDefinition>

Scenario: Creating a job definition for a job to run on x86processors

In this scenario, a job is created to run the application, appx86. The applicationmust run on a workstation with an x86 processor where the CPU usage between 3and 30%. Load balancing is to be defined by an objective to keep CPU use onmatching resources to a minimum.

About this task

To create the job definition, perform the following steps:

Procedure1. In the Job Brokering Definition Console select File → New → Job brokering

definition and create a new job definition named x86job. The job definitionopens at the Overview page with the job name assigned.

2. Open the Application page and define the required information for the appx86application that the job is to run.

3. Open the Resources page and specify the processor and CPU usagerequirements as follows:a. Select the Advanced Requirements tab.b. Click Add Requirement. The Resource Property Details dialog box is

displayed.c. In the Property Name menu, select CPU Utilization.d. In the Property Value section, select the Range Value radio button and

assign values of 3 to Minimum and 30 to Maximum.e. Click Add Requirement. The Resource Property Details dialog box is

displayed.f. In the Property Name menu, select Processor type.g. In the Property Value section, select the Exact Value radio button and

assign a values of x86.4. Open the Optimization page and specify the load balancing requirement as

follows:a. In the Type menu, select Balance load between resources by optimization

objective.b. In the Resource Type menu, select Computer System.c. In the Resource Property menu, select CPU Utilization.d. In the Optimization Objective menu, select the Minimize.

5. Select File → Save to save the job definition file.

Results

The JSDL file created for this scenario has the following syntax:<jsdl:jobDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:jsdl="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdl"xsi:schemaLocation="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdl JSDL.xsd"description="Job to run on X86 processors" name="x86job"><jsdl:application name="executable">

Chapter 4. Writing JSDL definitions with the Job Brokering Definition Console 63

Page 78: awsbrmst-fp1

<jsdle:executable path="/opt/appx86"></jsdle:executable>

</jsdl:application><jsdl:resources>

<jsdl:properties><jsdl:requirement propertyName="CPUUtilization">

<jsdl:range><jsdl:minimum>3</jsdl:minimum><jsdl:maximum>30</jsdl:maximum>

</jsdl:range></jsdl:requirement><jsdl:requirement propertyName="ProcessorType">

<jsdl:exact>x86</jsdl:exact></jsdl:requirement>

</jsdl:properties></jsdl:resources><jsdl:optimization name="JPT_JSDLOptimizationPolicyType">

<jsdl:objective propertyObjective="minimize"resourcePropertyName="CPUUtilization"resourceType="ComputerSystem"/>

</jsdl:optimization></jsdl:optimization></jsdl:jobDefinition>

Scenario: Creating a job definition for a script to run on aspecific operating system

In this scenario, a job is created to run a script on a Red Hat Enterprise Linuxsystem.

About this task

By specifying candidate operating systems, you can define the type of operatingsystem on which a job is to run, in this case Linux. To direct the job to a specificflavor of Linux, you must define a related resource and link it to the job resourcesby creating a relationship. To create a job definition that does this, perform thefollowing steps:

Procedure1. In the Job Brokering Definition Console select File → New → Job brokering

definition and create a new job definition named rhjob. The job definitionopens at the Overview page with the job name assigned.

2. Open the Application page and define the required information for theapplication that the job is to run.

3. Open the Resources page and specify the operating system type requirement,as follows:a. Select the Software Requirements tab.b. In the Candidate Operating Systems pane, click Add. The Operating

System Details dialog box is displayed.c. In the Type menu, select LINUX and click OK.

4. Open the Related Resources page and create a resource requirement for the RedHat flavor of Linux, as follows:a. In the Resource Requirements pane, click Add. The Resource Requirement

Details dialog box is displayed.b. In the ID field, specify a meaningful ID, in this example, redhat.c. In the Type menu, select Operating System.

64 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 79: awsbrmst-fp1

d. In the Resource Properties pane, click Add Requirement. The ResourceProperty details dialog box is displayed.

e. In the Property Name menu, select Display Name.f. In the Property Value , type Red*.

5.

6. Switch back to the Resources page to link the resource requirement to theoperating system resource.a. Select the Advanced Requirements tab.b. In the Relationships pane, click Add. The Relationship Details dialog box is

displayed.c. In the Type menu, select Contains.d. In the Target menu, select the Red Hat resource requirement that you

created and click OK.7. Select File → Save to save the job definition file.

Results

The JSDL file created for this scenario has the following syntax:<jsdl:jobDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:jsdl="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdl"xsi:schemaLocation="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdlJSDL.xsd" description="Job to run on Red Hat Linux" name="rhjob">

<jsdl:application name="executable"><jsdle:executable path="/opt/myExecutable"></jsdle:executable>

</jsdl:application><jsdl:resources> <jsdl:resources>

<jsdl:candidateOperatingSystems><jsdl:operatingSystem type="LINUX"/>

</jsdl:candidateOperatingSystems><jsdl:relationship target="redhat" type="Contains"/>

</jsdl:resources><jsdl:relatedResources id="redhat" type="OperatingSystem">

<jsdl:properties><jsdl:requirement propertyName="DisplayName">

<jsdl:exact>red*</jsdl:exact></jsdl:requirement>

</jsdl:properties></jsdl:relatedResources>

</jsdl:jobDefinition>

Scenario: Alternative operating system requirementsIn this scenario, a definition is created for a job that can run on either a Linux oran AIX computer.

About this task

The job can run on Linux operating systems with a minimum of 512 MB of RAMor on AIX operating systems with a minimum of 1024 MB of RAM. The jobdefinition must include a resource requirement that specifies the two alternativerequirements.

To create job definition for this job, perform the following steps:

Chapter 4. Writing JSDL definitions with the Job Brokering Definition Console 65

Page 80: awsbrmst-fp1

Procedure1. In the Job Brokering Definition Console select File → New → Job brokering

definition and create a new job definition named jobWithRequirementsByOS.The job definition opens at the Overview page with the job name assigned.

2. Open the Application page and define the required information for theapplication that the job is to run.

3. Open the Related Resources page.4. In the Resource Requirements pane, click Add then specify a meaningful value

for the ID field. In this example it is OperatingSystemType.5. In the Resource Properties pane, define the logic that describes the two

alternative operating system requirements, as follows:a. Click Add OR Operand to indicate that you are defining alternatives.b. Highlight the OR operand and click Add AND Operand to indicate that the

alternative includes more than requirement.c. Highlight the AND operand and click Add Requirement.d. In the Resource Property Details dialog, select Operating System Type from

the Property Name menu and type LINUX in the Property value field.e. Highlight the AND operand again and click Add Requirement.f. In the Resource Property Details dialog, select Total Physical Memory from

the Property Name menu and type 512 in the Property value field.g. Highlight the OR operand again and click Add AND Operand to add the

requirements for the second alternative.h. Highlight the new AND operand and click Add Requirement.i. In the Resource Property Details dialog, select Operating System Type from

the Property Name menu and type AIX in the Property value field.j. Highlight the AND operand again and click Add Requirement.k. In the Resource Property Details dialog, select Total Physical Memory from

the Property Name menu and type 1024 in the Property value field.6. Open the Resources page and create a relationship to the resource requirement,

as follows:a. Select the Advanced Requirements tab.b. In the Relationships pane, click Add. The Relationship Details dialog box is

displayed.c. In the Type menu, select Contains.d. In the Target menu, select the resource requirement OperatingSystemType

and click OK.7. Select File → Save to save the job definition file.

Results

The JSDL file created for this scenario has the following syntax:<jsdl:jobDefinition xmlns:jsdl="http://www.ibm.com/xmlns/prod/scheduling/

1.0/jsdl" xmlns:jsdle="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdle"xmlns:xmi="http://www.omg.org/XMI" xmi:version="2.0" description="This jobhas different requirements for memory based on the operating system it willrun on " name="jobWithRequirementsByOS">

<jsdl:application name="executable"><jsdle:executable path="/opt/myExecutable"></jsdle:executable>

</jsdl:application><jsdl:resources>

<jsdl:relationship target="OperatingSystemType" type="Contains"/>

66 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 81: awsbrmst-fp1

</jsdl:resources><jsdl:relatedResources id="OperatingSystemType" type="OperatingSystem">

<jsdl:properties><jsdl:or>

<jsdl:and><jsdl:requirement propertyName="OperatingSystemType">

<jsdl:exact>LINUX</jsdl:exact></jsdl:requirement><jsdl:requirement propertyName="TotalPhysicalMemory">

<jsdl:range><jsdl:minimum>512</jsdl:minimum>

</jsdl:range></jsdl:requirement>

</jsdl:and><jsdl:and>

<jsdl:requirement propertyName="OperatingSystemType"><jsdl:exact>AIX</jsdl:exact>

</jsdl:requirement><jsdl:requirement propertyName="TotalPhysicalMemory">

<jsdl:range><jsdl:minimum>1024</jsdl:minimum>

</jsdl:range></jsdl:requirement>

</jsdl:and></jsdl:or>

</jsdl:properties></jsdl:relatedResources>

</jsdl:jobDefinition>

Chapter 4. Writing JSDL definitions with the Job Brokering Definition Console 67

Page 82: awsbrmst-fp1

68 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 83: awsbrmst-fp1

Chapter 5. Submitting and tracking jobs

Although you should normally use the standard Tivoli Workload Scheduler meansto schedule and submit workload, there is also an additional way to submit jobsdirectly to dynamic scheduling using either the Tivoli Dynamic Workload Consoleor the dynamic workload broker command line, described in the next chapter. Thisimplies that you only need to write a JSDL job definition. You do not need to writea job definition in Tivoli Workload Scheduler and the workload broker workstationdoes not come into play. Choosing to do so, however, results in not exploiting thescheduling and choreography services of Tivoli Workload Scheduler. This chapterexplains how to submit and track jobs using the Tivoli Dynamic WorkloadConsole.

About this task

Job definitions are stored in the Job Repository and you search for them and selectthem when the job needs to be submitted. At submission time, you can also specifythat a job run on the same resource as a job that has previously run. The jobdefinition provides all necessary parameters for a job to run, however, you can addto and change the parameters defined in the job definition for the job instance youare submitting. This does not change the job definition stored in the JobRepository.

The lifecycle of a job involves the following sequence of phases:1. Submission of the job to the Job Dispatcher.2. Job scheduling.3. Allocation of resources by the Resource Advisor.4. Job execution.5. Job status monitoring.

Using the Tivoli Dynamic Workload Console, you can manage the whole lifecycleof a job by performing the following tasks:v “Submitting jobs”v “Monitoring submitted jobs” on page 74

Submitting jobsThis section describes how to submit jobs with the Tivoli Dynamic WorkloadConsole based on the JSDL job definition only.

Before you begin

You can submit jobs according to the specifications defined in the JSDL file, or youcan modify some of the specifications at submission time. Using the Submit...action from the Definitions → Job task, you can specify the following informationat submission time:v Define an alias for the job to be submitted so that you can subsequently submit

an affine job using the jobsubmit command specifying the alias name. Sinceevery job instance has its own job ID which is not easy to remember, define analias name that can be easily recognized.

© Copyright IBM Corp. 2009, 2010 69

Page 84: awsbrmst-fp1

v Specify the computer on which to run the job. If you choose to submit a job on aspecified computer, the Tivoli Dynamic Workload Console performs a search anddisplays physical computers that meet the requirements of the job at thatmoment. You can then select a specific computer on which to run the job, orallow dynamic workload broker to allocate the job dynamically to one of thejobs in the list of matching computers.

v Add, remove, or modify the values for variables defined in the job. See“Submitting jobs with variables” on page 72.

v Specify that a job run on the same resource as another job. See “Submitting jobswith affinity relationships.”

About this task

To submit a job according to the specifications defined in the JSDL file without theoption to modify the definition at submission time, perform the following steps:

Procedure1. In the console navigation tree, expand Definitions and click Jobs.2. Search for a job definition stored in the Job Repository database.3. Select the job definition that you want to submit.4. Click Submit.5. Click Go. The job is submitted.

Results

After submitting a job, it can assume one of the following statuses:

Table 21. Job status

ErrorConditions

WaitingConditions Running

CompletedSuccessfully

CancelConditions

v Run Failed

v Unable toStart

v ResourceAllocationFailed

v Unknown

v Submitted

v Submitted toAgent

v ResourceAllocationReceived

v Waiting forReallocation

v Waiting forResources

Running CompletedSuccessfully

v Canceled

v CancelPending

v CancelAllocation

What to do next

You can also use the jobsubmit command from the command-line interface. See“jobsubmit command - Submitting jobs” on page 84

Submitting jobs with affinity relationshipsAn affinity relationship is established between two or more jobs when you wantthem to run on the same resource.

70 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 85: awsbrmst-fp1

Before you begin

An affinity relationship is useful when the results of one job are required for thenext job to run. You can define an affinity relationship between two or more jobs inthe following ways:v “Submitting a job with affinity from the Tivoli Dynamic Workload Console”v “Submitting a job with affinity from the command line”v “Defining affinity relationships” on page 34 in Tivoli Workload Scheduler.

Submitting a job with affinity from the Tivoli DynamicWorkload Console

About this task

To submit a job to run on the same resources as a previous job, do the following:

Procedure1. In the console navigation tree, expand Definitions and click Jobs.2. Search for a job definition stored in the Job Repository database.3. Select the job definition that you want to submit.4. Click Submit...5. Click Go. The Job Definitions wizard starts.6. You can optionally define an alias for the job by selecting Provide an alias to

the job for this submission. Subsequently, you can use the alias name tosubmit a new job using the jobsubmit command to define an affinityrelationship with the job you are submitting now. You can also use the alias asa user-friendly alternative to the job ID when performing queries on jobs fromthe command line or tracking job instances.

7. In the Target Resource area, select the option Specify that this job runs onthe same resources as a previous job.

8. Click Next. If you selected to specify an alias, then you are prompted toprovide the alias name. Click Next.

9. Search and select the job with which you want to establish an affinityrelationship. The current job will then run on the same resource as the job youselect. Click Next.

10. On the summary page, review your selections and click Finish to submit thejob.

Results

The job is submitted on the same resources as the job you selected. You can nowcheck the job status by selecting Tracking → Job Instances from the navigation. See“Monitoring submitted jobs” on page 74 for more information.

Submitting a job with affinity from the command lineAbout this task

The jobsubmit command requires a job ID or an alias name for the affine job.

Chapter 5. Submitting and tracking jobs 71

Page 86: awsbrmst-fp1

What to do next

Submit the following command to make the job defined in job definitionWinJob2.jsdl, with the alias WJ220070606, run on the same resource as thepreviously run job, WinJob1, which was submitted with the alias, WJ120070606:jobsubmit -jsdl WinJob2.jsdl -alias WJ220070606 -affinity alias=WJ120070606

Submitting jobs with variablesWhen you submit a job, you can define or change a variable to be used by the job.

About this task

During job submission, you can define variables that are to be used by the jobitself or to assign the job to a resource. You can add new variables or override thedefault values for variables that are included in the job definition. For moreinformation about including variables in the job definitions see “Using variables injob definitions” on page 57. At submission time, you can add or change variablesin the following ways:v “Submitting a job with variables from the Tivoli Dynamic Workload Console”v “Submitting a job with variables from the command line” on page 73v “Using Tivoli Workload Scheduler variables in dynamic workload broker jobs”

on page 31 in Tivoli Workload Scheduler.

Submitting a job with variables from the Tivoli DynamicWorkload Console

About this task

To submit a job, changing or adding variables, do the following:

Procedure1. In the console navigation tree, expand Definitions and click Jobs.2. Search for a job definition stored in the Job Repository database.3. Select the job definition that you want to submit.4. Click Submit...5. Click Go. The Job Definitions wizard starts.6. Select Provide values for any of the job variables. The Job Variables page

shows any variables that are defined in the job definition.7. Add or change variables as follows:v Change the value of a variable defined in the job definition by replacing the

value shown in the Predefined Variables table.v Add a text or numeric variable by clicking Add text variable or Add

numeric variable and providing a variable name and value when the entryis added to the table of variables.

You can remove a variable that you have defined by selecting it and clickingRemove selected variables. You cannot remove predefined variables.

8. Click Next.9. On the summary page, review your selections and click Finish to submit the

job.

72 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 87: awsbrmst-fp1

Submitting a job with variables from the command lineAbout this task

The jobsubmit command submits jobs from the command line interface. You caninclude arguments to change the value of predefined variables and add new ones.For example, the job definition for Job1 includes the variable memory with the value512 which is used to set the free physical memory requirement. To increase therequirement to 1024 when submitting the job, issue the following command:jobsubmit -jdname Job1 -var memory=1024

What to do next

Job statusesThis section describes all supported statuses for a job as returned both by thecommand line interface and by the Tivoli Dynamic Workload Console. It also liststhe operations a user can perform depending on the status the job is in.

Table 22. Job statuses and supported operations

Tivoli DynamicWorkloadConsole status

Icon Command line statusYou can cancelthe job

You can browsethe job output

You candefineaffinity

Run failed RED FAILED_EXECUTION

' '

Resourceallocation failed

RED RESOURCE_ALLOCATION_FAILED

Unable to start RED NOT_EXECUTED '

Unknown YELLOW UNKNOWN ' '

Submitted WAITING SUBMITTED '

Waiting forresources

WAITING WAITING_FOR_RESOURCES

'

Resourceallocationreceived

WAITING RESOURCE_ALLOCATION_RECEIVED

'

Submitted toagent

WAITING SUBMITTED_TO_ENDPOINT

' '

Waiting forreallocation

WAITING RESOURCE_REALLOCATE

'

Cancel pending ABORT PENDING_CANCEL

' '

Cancel allocation ABORT CANCEL_ALLOCATION

' '

Canceled ABORT CANCELLED ' '

Running RUNNING EXECUTING ' ' '

Completedsuccessfully

GREEN SUCCEEDED_EXECUTION

' '

Note: You can define an affinity relationship with a job in Canceled state only ifthe job was canceled while running.

Chapter 5. Submitting and tracking jobs 73

Page 88: awsbrmst-fp1

Monitoring submitted jobsA job instance is a job that is submitted to run at a specific time. You can track theoutcome of a submitted job from the Tivoli Dynamic Workload Console.

Before you begin

Prerequisite: A job must be submitted to dynamic workload broker before you canview its instances. Submitted jobs are stored in the Job Repository for a defaulttime interval. Refer to the IBM Tivoli Workload Scheduler Administration Guidefor information about configuring this interval in theJobDispatcherConfig.properties file. You can access the following information aboutjob instances:v Status of the job instance.v The host name of the computer where the job instance ran.v The return code of the job instance.v The date and time the job was submitted.v The date and time the job started and finished running.

About this task

For example, to view all jobs that have resulted in error within the last 24 hours,follow these steps:

Procedure1. In the console navigation tree, expand Tracking and click Job Instances. The

Track Job Instance Search Criteria page is displayed2. Specify the search criteria for the job instances as follows:

a. In the Submission Time section, select the Last 24 Hours radio button.b. In the Job Status section, select Error Conditions.c. Click Search.

The results are displayed in the Job Tracking page.

Results

As an alternative, you can take the following steps:1. In the console navigation tree, expand Definitions and click Jobs. The Job

Definition Search Criteria page is displayed.2. Specify the search criteria for the job definition associated with the job instance

that you want to view.3. Select the job for which you want to show instances.4. Click Show Instances. The results are displayed in the Job Definitions Search

Result page.

Once a job is submitted to the Job Dispatcher, it goes through the phases of jobscheduling, allocation of resources, and finally, job execution. Problems might occuralong the way, and there are specific job statuses that identify at which pointthings went wrong. The following is a list of job statuses that a job can assumeafter it is submitted to be run:

74 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 89: awsbrmst-fp1

Job completing successfullyThe job goes through the following statuses:Submitted → Waiting forresources → Resource allocation received → Submitted to agent → Running→ Completed successfully.

Job being canceledThe job goes through the following statuses:Submitted → Waiting forresources → Resource allocation received → Submitted to agent → Running→ Cancel pending → Canceled.

Job being reallocatedThe job is allocated to a computer which is temporarily unreachable, forexample because of a network problem. The job goes through thefollowing statuses:Submitted → Waiting for resources → Resourceallocation received → Waiting for reallocation → Waiting for resources .

Job encountering an errorThere can be several reasons for the error. Here are some examples:v The job encounters an error because the selected working directory does

not exist on the target system. The job goes through the followingstatuses:Submitted → Waiting for resources → Resource allocationreceived → Submitted to agent → Unable to start. As the job cannot start,no output is available.

v The job requires an operating system which is not available in theenvironment. The job goes through the following statuses:Submitted →Waiting for resources → Resource allocation failed.

v The job encounters an error because one of the parameters specified inthe job is not supported on the target system. The job goes through thefollowing statuses:Submitted → Waiting for resources → Resourceallocation received → Submitted to agent → Running → Run failed.

When viewing the job instance details for this job Job Tracking page, thereason for the error is displayed. You can also use the ID indicated in theIdentifier field to retrieve more information on the job results, which isstored in a series of log files on the computer where the job ran. The nameof the computer where the job ran is also indicated in the Job Trackingpage. Locate the computer and analyze the log files available in the foldernamed with the job ID in the following path:TWA_home/TWS/stdlist/JM/yyy.mm.dd/archive

Every job has a compressed file whose name is the job ID, for example:ed1d4933-964b-3f5e-8c73-f720919491d6.zip

The compressed file contains the following:

diagnostics.logMay or may not include diagnostic information.

jm_exit.propertiesIncludes the return code as well as other job statistics, like CPUand memory usage.

out.logIncludes the full job output.

trace.logIncludes the output trace of the task launcher process spawned bythe Tivoli Workload Scheduler agent to run the job.

Chapter 5. Submitting and tracking jobs 75

Page 90: awsbrmst-fp1

trace.log_cmdIncludes the command used to run the task launcher.

76 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 91: awsbrmst-fp1

Chapter 6. Using the command line interface

Dynamic workload broker has a command line for running a set of commands.You can use the command line interface to save, submit, query, monitor, canceljobs, and view the job output. You can also archive database tables.

Commands are stored in the following location on the master domain manager:TWA_home/TDWB/bin

The following commands are available:

Table 23. Dynamic workload broker commands

Command Purpose See

exportserverdata Downloads the list ofdynamic workload brokerinstances from the TivoliWorkload Scheduler databaseto a temporary file. Use torecord a port number or hostname change.

“exportserverdata command- downloading the list ofworkload broker instancesfrom the database” on page81

importserverdata Uploads the list of dynamicworkload broker instancesfrom the temporary file tothe Tivoli WorkloadScheduler database after youare done recording a portnumber or host namechange.

“importserverdata command- uploading the list ofworkload broker instances tothe database” on page 83

jobsubmit Submits a job to the JobDispatcher.

“jobsubmit command -Submitting jobs” on page 84

jobdetails Returns property informationfor the specified job.

“jobdetails command -Viewing details on jobs” onpage 90

jobquery Returns a list of submittedjobs matching the selectioncriteria.

“jobquery command -Performing queries on jobs”on page 86

jobcancel Cancels a submitted job. “jobcancel command -Canceling jobs” on page 92

jobstore Manages job definitions. “jobstore command -Managing job definitions” onpage 93

jobgetexecutionlog Displays the results ofsubmitted jobs.

“jobgetexecutionlogcommand - Viewing joboutput” on page 95

movehistorydata Moves data present in theJob Repository database tothe archive tables.

“movehistorydata command- Maintaining the databasetables” on page 96

© Copyright IBM Corp. 2009, 2010 77

Page 92: awsbrmst-fp1

Table 23. Dynamic workload broker commands (continued)

Command Purpose See

resource Creates and managesresources and groups.Manages associatedcomputers.

By properly configuring theCLIConfig.properties file onthe agent, you can run thiscommand also from anyconnected Tivoli WorkloadScheduler agent. See“Running the resourcecommand from an agent” onpage 105 for details.

“resource command -Working with resources” onpage 98

Command-line syntax

This chapter uses the following special characters to define the syntax ofcommands:

[] Identifies optional attributes. Attributes not enclosed in brackets arerequired.

... Indicates that you can specify multiple values for the previous attribute.

| Indicates mutually exclusive information. You can use the attribute to theleft of the separator or the attribute to its right. You cannot use bothattributes in a single use of the command.

{} Delimits a set of mutually exclusive attributes when one of the attributes isrequired. If the attributes are optional, they are enclosed in square brackets([]).

\ Indicates that the syntax in an example wraps to the next line.

Command-line configuration fileThe CLIConfig.properties file contains configuration information which is usedwhen typing commands. By default, arguments required when typing commandsare retrieved from this file, unless explicitly specified in the command syntax.

The CLIConfig.properties file is created at installation time and is located on themaster domain manager in the following path:TWA_home/TDWB/config

Starting from this version of Tivoli Workload Scheduler, an additional instance ofthis file is installed on every agent for users who want to be able to run theresource command not only from the master but also from specific agents. See“Running the resource command from an agent” on page 105 for details.

The CLIConfig.properties file contains the following set of parameters:

Dynamic workload broker default properties

ITDWBServerHostSpecifies the IP address of dynamic workload broker.

78 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

11111

111111111

111

1111

Page 93: awsbrmst-fp1

ITDWBServerPortSpecifies the number of the dynamic workload broker port. Thedefault value is 9550.

ITDWBServerSecurePortSpecifies the number of the dynamic workload broker port whensecurity is enabled. The default value is 9551.

use_secure_connectionSpecifies whether secure connection must be used. The defaultvalue is false.

KeyStore and trustStore file name and path

keyStoreSpecifies the name and path of the keystore file containing privatekeys. A keystore file contains both public keys and private keys.Public keys are stored as signer certificates while private keys arestored in the personal certificates. The default value is/Certs/TDWBClientKeyFile.jks.

trustStoreSpecifies the name and path of the truststore file containing publickeys. A truststore file is a key database file that contains publickeys. The public key is stored as a signer certificate. The keys areused for a variety of purposes, including authentication and dataintegrity. The default value is /Certs/TDWBClientTrustFile.jks.

Passwords for keyStore and trustStore files

keyStorepwdSpecifies the password for the keystore file.

trustStorepwdSpecifies the password for the truststore file.

File types for keyStore and trustStore files

keyStoreTypeSpecifies the file type for the keyStore file. The default value is JKS.

trustStoreTypeSpecifies the file type for the trustStore file. The default value isJKS.

Default user ID and password for dynamic workload broker

tdwb_userSpecifies the user name for a user authorized to performoperations on dynamic workload broker when security is enabled.The default value is ibmschedcli. This password must bepreviously defined on IBM WebSphere. For more information onsecurity considerations, refer to IBM Tivoli Workload SchedulerAdministration Guide

tdwb_pwdSpecifies the password for a user authorized to perform operationson dynamic workload broker when security is enabled. Thispassword must be previously defined on IBM WebSphere . Formore information on security considerations, refer to IBM TivoliWorkload Scheduler Administration Guide.

Detail level for command-line log and trace information

Chapter 6. Using the command line interface 79

Page 94: awsbrmst-fp1

logger.LevelSpecifies the detail level for the command-line trace and log files.The command-line trace and log files are created in the followinglocation:

log fileTWA_home/TDWB/logs/Msg_cli.log.log

trace fileTWA_home/TDWB/logs/Trace_cli.log

The default value is INFO.

logger.consoleLevelSpecifies the detail level for the log and trace information to bereturned to standard output. The default value is FINE. Supportedvalues for both the consoleLevel and loggerLevel parameters areas follows:

ALL Indicates that all messages are logged.

SEVEREIndicates that serious error messages are logged.

WARNINGIndicates that warning messages are logged.

INFO Indicates that informational messages are logged.

CONFIGIndicates that static configuration messages are logged.

FINE Indicates that tracing information is logged.

FINERIndicates that detailed tracing information is logged.

FINESTIndicates that highly detailed tracing information is logged.

OFF Indicates that logging is turned off.

logger.limitSpecifies the maximum size of a log file in bytes. The default valueis 400000. When the maximum size is reached, a new file iscreated, until the maximum number of files is reached. When allfiles reach the maximum size and the maximum number of files isexceeded, the oldest file is re-written.

logger.countSpecifies the maximum number of log files. The default value is 6.When the maximum size is reached, a new file is created, until themaximum number of files is reached. When all files reach themaximum size and the maximum number of files is exceeded, theoldest file is re-written. When a new file is created the 0 suffix isappended after the file extension. The file with the 0 suffix isalways the current file. Any older files are renumbered accordingly.

java.util.logging.FileHandler.patternSpecifies that the trace information for the Java Virtual Machine islogged in the Trace_cli.log file. The default value is INFO.

java.util.logging.FileHandler.limitSpecifies the maximum size of a trace file in bytes. The default

80 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 95: awsbrmst-fp1

value is 400000. When the maximum size is reached, a new file iscreated, until the maximum number of files is reached. When allfiles reach the maximum size and the maximum number of files isexceeded, the oldest file is re-written.

java.util.logging.FileHandler.countSpecifies the maximum number of trace files. The default value is6. When the maximum size is reached, a new file is created, untilthe maximum number of files is reached. When all files reach themaximum size and the maximum number of files is exceeded, theoldest file is re-written. When a new file is created the 0 suffix isappended after the file extension. The file with the 0 suffix isalways the current file. Any older files are renumbered accordingly.

java.util.logging.FileHandler.formatterSpecifies the formatter to be used for the Trace_cli.log file. Thedefault value is com.ibm.logging.icl.jsr47.CBEFormatter.

DAO common configurationThis section defines the RDBMS settings for the exportserverdata,importserverdata, and movehistorydata commands. These commands usethe RDBMS installed on dynamic workload broker These parameters arevalorized at installation time and should not be modified, except forcom.ibm.tdwb.dao.rdbms.useSSLConnections as noted below.

com.ibm.tdwb.dao.rdbms.rdbmsNameSpecifies the RDBMS name.

com.ibm.tdwb.dao.rdbms.useDataSourceSpecifies the data source to be used.

com.ibm.tdwb.dao.rdbms.jdbcPathSpecifies the path to the JDBC driver.

com.ibm.tdwb.dao.rdbms.jdbcDriverSpecifies the JDBC driver.

com.ibm.tdwb.dao.rdbms.userNameSpecifies the name of the RDBMS user.

com.ibm.tdwb.dao.rdbms.passwordSpecifies the password of the RDBMS user.

com.ibm.tdwb.dao.rdbms.useSSLConnectionsSpecifies that access to the Tivoli Workload Scheduler DB2database by some of the CLI commands is over SSL. Is set to FALSEby default. You must set to TRUE, if the database is DB2 and youuse FIPS security, for the following commands to work:v exportserverdatav importserverdatav movehistorydata

exportserverdata command - downloading the list of workload brokerinstances from the database

Use the exportserverdata command to download the list of dynamic workloadbroker instances from the Tivoli Workload Scheduler database and change a portnumber or a host name.

Chapter 6. Using the command line interface 81

Page 96: awsbrmst-fp1

Syntax

exportserverdata ?

exportserverdata -dbUsr db_user_name -dbPwd db_user_password -exportFilefilename

Description

This command extracts a list of URIs (Uniform Resource Identifier) of all thedynamic workload broker instances from the Tivoli Workload Scheduler databaseand copies them to a temporary file so that, if either the hostname or the portnumber of any of the instances listed are changed, the administrator can recordthis information in the file and place it back in the database with theimportserverdata command.

This action is necessary because the list of dynamic workload broker instancesmust be kept up-to-date at all times, since the Resource Advisor agentsperiodically connect to the active instance to send their data about the resourcesdiscovered in each computer. They are able to automatically switch between theinstances of this list and find the active one to copy these data in its ResourceRepository. Since the master domain manager and every backup master areinstalled with a dynamic workload broker instance, the active dynamic workloadbroker instance runs in the master domain manager, while an idle instance residesin each backup master.

The URI pointing to each dynamic workload broker instance is the following:https://hostname:port_number/JobManagerRESTWeb/JobScheduler

You can change only the hostname and the port number.

Important: The list is ordered. You can change the order of the instances as theyappear in this list, and the agents will follow this order. If you have several backupmasters and decide to follow a specific switching order when a master fails, youcan instruct the agents to switch to the right instance using this ordered list,speeding up the transition time.

If your Tivoli Workload Scheduler database is DB2 and you use FIPS security, torun this command successfully you need to have thecom.ibm.tdwb.dao.rdbms.useSSLConnections option set to TRUE in theCLIConfig.properties file.

Options

? Displays help information.

-dbUsrdb_user_nameThe user name required to access the Tivoli Workload Scheduler databaseserver.

-dbPwddb_user_passwordThe user password required to access the Tivoli Workload Scheduler databaseserver.

-exportFilefilenameThe name of the temporary file where the URIs extracted from the database arecopied for editing. This text file is created when you run the command and

82 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 97: awsbrmst-fp1

you can open it with any editor to change the hostname or the port number. Ifyou do not specify a path, the file is created in the same directory where thecommand is located, that is:<TWA_home>/TDWB/bin

If you do specify a different path, make sure the path exists before you runthis command.

Example

To download the current list of all (active and backup) dynamic workload brokerinstances and copy them in a file named c:\myservers\uris160709, run:exportserverdata -dbUsr twsadm -dbPwd fprefect -exportFile c:\myservers\uris160709

The command returns file uris160709, that looks like this:https://accrec015:42127/JobManagerRESTWeb/JobSchedulerhttps://prodop099:52529/JobManagerRESTWeb/JobSchedulerhttps://prodop111:31116/JobManagerRESTWeb/JobScheduler

prodop099 is the active dynamic workload broker instance because is hosted by thecurrently active master domain manager, whereas accrec015 and prodop111 areidle because they are hosted by backup masters.

You can edit this file to apply your changes before using the importserverdatacommand to upload the URIs back to the database.

See Also

“importserverdata command - uploading the list of workload broker instances tothe database”

importserverdata command - uploading the list of workload brokerinstances to the database

Use the importserverdata command to upload the list of dynamic workload brokerinstances to the Tivoli Workload Scheduler database after editing the temporary fileto change a port number or a host name.

Syntax

importserverdata ?

importserverdata -dbUsr db_user_name -dbPwd db_user_password -importFilefilename

Description

This command puts back the list of dynamic workload broker instances in theTivoli Workload Scheduler database from the temporary file where they werepreviously downloaded with the exportserverdata command.

Use the exportserverdata and importserverdata commands if you have to recordany hostname or port number changes in the URIs of the instances. This isnecessary to keep the list of dynamic workload broker instances up-to-date at alltimes, since the Resource Advisor agents periodically connect to the active instance

Chapter 6. Using the command line interface 83

Page 98: awsbrmst-fp1

to send their data about the resources discovered in each computer. They are ableto automatically switch between the instances of this list and find the active one tocopy these data in its Resource Repository. Since the master domain manager andevery backup master are installed with a dynamic workload broker instance, theactive dynamic workload broker instance runs in the master domain manager,while an idle instance resides in each backup master.

Important: The list is ordered. You can change the order of the instances as theyappear in this list, and the agents will follow this order. If you have several backupmasters and decide to follow a specific switching order when a master fails, youcan instruct the agents to switch to the right instance using this ordered list,speeding up the transition time.

If your Tivoli Workload Scheduler database is DB2 and you use FIPS security, torun this command successfully you need to have thecom.ibm.tdwb.dao.rdbms.useSSLConnections option set to TRUE in theCLIConfig.properties file.

Options

? Displays help information.

-dbUsrdb_user_nameThe user name required to access the Tivoli Workload Scheduler databaseserver.

-dbPwddb_user_passwordThe user password required to access the Tivoli Workload Scheduler databaseserver.

-importFilefilenameThe name of the temporary file you specified with the -exportFile keyword inthe exportserverdata command.

Example

To upload the edited list of dynamic workload broker instance URIs from filec:\myservers\uris160709 to the Tivoli Workload Scheduler database, run:importserverdata -dbUsr twsadm -dbPwd fprefect -importFile c:\myservers\uris160709

See Also

“exportserverdata command - downloading the list of workload broker instancesfrom the database” on page 81

jobsubmit command - Submitting jobsUse the jobsubmit command to submit jobs to the Job Dispatcher.

Syntax

jobsubmit ?

jobsubmit [-usr user_name -pwd password] {-jsdl jsdl_file | -jdnamejob_definition_name} [-alias job_alias] [-var variable=value...] [-affinity {jobid=job_id |alias=alias}] [-configFile configuration_file]

84 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 99: awsbrmst-fp1

Description

This command submits a job to the Job Dispatcher. When the job is submitted, it isassigned a unique ID, which can be used for retrieving information on andcanceling jobs.

You can use this command to submit jobs saved locally on the dynamic workloadbroker server or saved in the Job Repository. To submit a local job, use the -jsdloption and specify the path to the JSDL file. To submit a job saved in the JobRepository, use the -jdname option and specify the job definition name.

When submitting jobs, you can also define an alias to be used as an alternative tothe job ID when performing queries on the job, or for defining subsequent jobs asaffine. To define affinity between two or more jobs, use the -affinity option whensubmitting the subsequent jobs. You define jobs as affine when you want them torun on the same resource, for example when the second job must use the resultsgenerated by the previous job.

Options

? Displays help information.

-usr user_nameSpecifies the username for a user authorized to perform operations on thecommand line. This parameter is required when security is enabled and theusername is not defined in the CLIConfig.properties configuration file (withthe tdwb_user keyword).

-pwd passwordSpecifies the password for a user authorized to perform operations on thecommand line. This parameter is required when security is enabled and thepassword is not defined in the CLIConfig.properties configuration file (withthe tdwb_pwd keyword).

-jsdl jsdl_fileSpecifies the name and path to a local JSDL file which provides the parametersfor a job when it is submitted. This parameter is required when the jdnameparameter is not is not specified.

-jdname job_definition_nameSpecifies the name of a job definition stored in the Job Repository database.The job definition name is defined within the JSDL file and can be modifiedonly by editing the JSDL file. This parameter is required when the jsdlparameter is not specified. To obtain this name, you can use the Definitions →Jobs task from the Tivoli Dynamic Workload Console console navigation tree,or the jobstore command specifying one or more of the query options. Formore information on the jobstore command, see “jobstore command -Managing job definitions” on page 93.

-alias job_aliasIndicates that an alias must be generated for the job being submitted. You canuse the alias as a user-friendly alternative to the job ID when performingqueries on the job. You can also use the alias when submitting new jobs so thatthe new job is affine to the job having this alias. To define affinity between twoor more jobs, use the -affinity option when submitting the new jobs. Youdefine jobs as affine when you want them to run on the same resource. OnWindows systems, the maximum length for the alias is 200 characters, if youused the default installation paths for WebSphere Application Server anddynamic workload broker.

Chapter 6. Using the command line interface 85

Page 100: awsbrmst-fp1

-var variable=valueSpecifies a variable and the associated value. You can also specify a list ofvariables by separating them with a comma. This value overrides the valuespecified when creating the JSDL file. You can also specify new variableswithout previously defining them in the JSDL file.

-affinity jobid=job_idSpecifies that the current job is affine to a previously submitted job. Toestablish the affinity relationship, specify the job ID for the previous job. Thejob ID is automatically generated at submission time.

-affinity alias=aliasSpecifies that the current job is affine to a previously submitted job. Toestablish the affinity relationship, specify the job alias for the previous job. Thejob alias is generated at submission time when you specify the -alias option.

-configFile configuration_fileSpecifies the name and path of a custom configuration file. This parameter isoptional. If this parameter is not specified, the default configuration file isassumed. For more information on the configuration file, see “Command-lineconfiguration file” on page 78.

Authorization

The user name and password for the command are defined in theCLIConfig.properties file. To override the settings defined in this file, you can enterthe user name and password when typing the command. For more information onthe CLIConfig.properties file, see “Command-line configuration file” on page 78.

Return Values

The jobsubmit command returns one of the following values:0 Indicates that jobsubmit completed successfully.< > 0 Indicates that jobsubmit failed.

Examples1. To submit the local job test_job located in the /staging_area/accounts/ path

using the configuration parameters specified in the custom_config.propertiesconfiguration file, type the following command:jobsubmit -jsdl /staging_area/accounts/test_job -configFile/opt/test/custom_config.properties

2. To submit the job definition domestic_accounts saved in the Job Repository,type the following command:jobsubmit -jdname domestic_accounts

See Also

“jobdetails command - Viewing details on jobs” on page 90

jobquery command - Performing queries on jobsUse the jobquery command to perform advanced queries on submitted jobs.

Syntax

jobquery ?

86 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 101: awsbrmst-fp1

jobquery [-usr user_name -pwd password] {[-status status...] [-submitter submitter][-name job_definition_name] [-alias job_alias] [-sdf submit_date_from] [-sdtsubmit_date_to] [-jsdf job_start_date_from] [-jsdt job_start_date_to ] [-jedfjob_end_date_from] [-jedt job_end_date_to]} [-configFile configuration_file]

Description

This command performs advanced queries on submitted jobs based on thefollowing attributes:v job statusv name of the user who submitted the jobv job namev job aliasv job submission datev job start datev job completion date

You can also use this command to retrieve the job ID generated at submissiontime, which is required when running the jobstatus, jobdetails and jobcancelcommands. To retrieve the job ID, specify the -name option.

Options

? Displays help information.

-usr user nameSpecifies the user name for a user authorized to perform operations on thecommand line. This option is required when security is enabled and the username is not defined in the CLIConfig.properties configuration file (with thetdwb_user keyword).

-pwd passwordSpecifies the password for a user authorized to perform operations on thecommand line. This option is required when security is enabled and thepassword is not defined in the CLIConfig.properties configuration file (withthe tdwb_pwd keyword).

-status statusSpecifies the status of the jobs to be searched. Separate statuses using commas;spaces are not supported. Supported statuses are as follows:

0 all supported statuses

1 submitted

2 waiting for resources

3 resource allocation received

4 submitted to agent

5 running

6 cancel pending

7 canceling allocation

8 waiting for reallocation

41 resource allocation failed

42 run failed

Chapter 6. Using the command line interface 87

Page 102: awsbrmst-fp1

43 completed successfully

44 canceled

45 unknown job

46 job not started

-submitter submitterSpecifies the name of the user who submitted the job.

-name job_definition_nameSpecifies the job name. This option returns the unique job ID, which can beused for retrieving information on and canceling jobs. This option supports theasterisk (*) wildcard character as described below:

as a single parameterit must be enclosed in inverted commas, for exampleC:\Program Files\TDWB\bin>jobquery -name "*"

This command returns a list of all submitted jobs.

to complete a job nameit does not require inverted commas, for exampleC:\Program Files\TDWB\bin>jobquery -name batchsub*

This command returns a list of all submitted jobs starting with thebatchsub suffix.

-alias job_aliasSpecifies the job alias. The job alias is generated at submission time using the-alias option. For more information see “jobsubmit command - Submittingjobs” on page 84.

-sdf submit_date_fromSpecifies a time range starting from the date when the job was submitted. Thequery is performed starting from the date you specified to the present date,unless the -sdt option is specified. Use both the -sdf and -sdt options to definea specific time range. Specify the date in the dd/MM/yyyy-hh:mm:ss format.

-sdt submit_date_toSpecifies a time range starting from the date when the job was submitted. Thequery is performed starting from the date when the dynamic workload brokerdatabase was populated to the date you specified, unless the -sdf option isspecified. Use both the -sdf and -sdt options to define a specific time range.Specify the date in the dd/MM/yyyy-hh:mm:ss format.

-jsdf job_start_date_fromSpecifies a time range starting from the date when the job started. The query isperformed starting from the date you specified to the present date, unless the-jsdt option is specified. Use both the -jsdf and -jsdt options to define aspecific time range. Specify the date in the dd/MM/yyyy-hh:mm:ss format.

-jsdt job_start_date_toSpecifies a time range starting from the date when the job started. The query isperformed starting from the date when the dynamic workload broker databasewas populated to the date you specified, unless the -jsdf option is specified.Use both the -jsdf and -jsdt options to define a specific time range. Specify thedate in the dd/MM/yyyy-hh:mm:ss format.

-jedf job_end_date_fromSpecifies a time range starting from the date when the job completed. The

88 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 103: awsbrmst-fp1

query is performed starting from the date you specified to the present date,unless the -jedt option is specified. Use both the -jedf and -jedt options todefine a specific time range. Specify the date in the dd/MM/yyyy-hh:mm:ssformat.

-jedt job_end_date_toSpecifies a time range starting from the date when the job completed. Thequery is performed starting from the date when the dynamic workload brokerdatabase was populated to the date you specified, unless the -jedf option isspecified. Use both the -jedf and -jedt options to define a specific time range.Specify the date in the dd/MM/yyyy-hh:mm:ss format.

-configFile configuration_fileSpecifies the name and path of a custom configuration file. This option isoptional. If this option is not specified, the default configuration file isassumed. For more information on the configuration file, see “Command-lineconfiguration file” on page 78.

Authorization

The user name and password for the command are defined in theCLIConfig.properties file. To override the setting defined in this file, you can enterthe user name and password when typing the command. For more information onthe CLIConfig.properties file, see “Command-line configuration file” on page 78.

Return Values

The jobquery command returns one of the following values:0 Indicates that jobquery completed successfully.< > 0 Indicates that jobquery failed.

Examples1. To retrieve the job ID for a job named CLIJSB11, type the following command:

jobquery -usr john -pwd BCA12EDF -name CLIJSB11

The following output is displayed. The job ID is associated to the Job Identifierkey:Call Job Dispatcher to query jobs. There are 10 Jobs found for your requestDetails are as follows:

Job Name: CLIJSB11Job Alias: aliasJob Identifier: 617c9bf7095787c83e1c36744e569cebStatus: FAILED_runningJob EPR: http://lab135200.romelab.it.ibm.com:955/JDServiceWS/services/JobJob Submitter Name:Submit Time: Tue May 23 15:41:54 CEST 2006Start Time: Tue May 23 14:48:09 CEST 2006End Time: Tue May 23 14:48:09 CEST 2006Job Last Status Message:Job Duration: PT0SReturncode: 0Job Resource Name: LAB237010Job Resource Type: ComputerSystem

2. To retrieve all jobs submitted by test_user in submitted, resource allocationfailed, and canceled state, type the following command:jobquery -status 1,3,44 -submitter test_user

Chapter 6. Using the command line interface 89

Page 104: awsbrmst-fp1

See Also

“jobsubmit command - Submitting jobs” on page 84

jobdetails command - Viewing details on jobsUse the jobdetails command to view details on submitted jobs.

Syntax

jobdetails ?

jobdetails [-usr user_name -pwd password] -id job_ID [-v ][-configFileconfiguration_file]

Description

This command displays details on submitted jobs using the unique ID created atjob submission. To retrieve the job ID after submitting the job, use the jobquerycommand specifying the -name parameter.

Options

? Displays help information.

-usr usernameSpecifies the username for a user authorized to perform operations on thecommand line. This parameter is required when security is enabled and theusername is not defined in the CLIConfig.properties configuration file (withthe tdwb_user keyword).

-pwd passwordSpecifies the password for a user authorized to perform operations on thecommand line. This parameter is required when security is enabled and thepassword is not defined in the CLIConfig.properties configuration file (withthe tdwb_pwd keyword).

-id job_IDSpecifies the unique job ID created at submission time. This parameter isrequired.

-v Displays job details.

-configFile configuration_fileSpecifies the name and path of a custom configuration file. This parameter isoptional. If this parameter is not specified, the default configuration file isassumed. For more information on the configuration file, see “Command-lineconfiguration file” on page 78.

Authorization

The user name and password for the command are defined in theCLIConfig.properties file. To override the setting defined in this file, you can enterthe user name and password when typing the command. For more information onthe CLIConfig.properties file, see “Command-line configuration file” on page 78.

Return Values

The jobdetails command returns one of the following values:

90 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 105: awsbrmst-fp1

0 Indicates that jobdetails completed successfully.< > 0 Indicates that jobdetails failed.

Examples1. To view run information on a job with ID 617c9bf7095787c83e1c36744e569ceb,

type the following command:jobdetails -id 617c9bf7095787c83e1c36744e569ceb

An output similar to the following is displayed:Call Job Dispatcher to get the job properties.Success return from Job Dispatcher.Job Identifier: 617c9bf7095787c83e1c36744e569cebJob Name: CLIJSB11Job Alias: aliasJob State: SUBMITTEDJob Submitter: nullClient Notification: http://lab135200.romelab.it.ibm.com:9550/RAServiceWS/services/AllocationJob Last Status Message:Job Submit Time: Tue May 23 15:43:44 CET 2009Job Start Time: Tue May 23 14:49:51 CET 2009Job End Time: Tue May 23 14:49:51 CET 2009Job Duration: PT0SJob Return Code: 0Job Resource Name: LAB237010Job Resource Type: ComputerSystemJob Usage Metric Name: StartTimeJob Usage Metric Type: nullJob Usage Metric Value: 1148388591000Job Usage Metric Name: EndTimeJob Usage Metric Type: nullJob Usage Metric Value: 1148388591000

2. To submit the job with ID 617l9jw7095787g83f1c36744e569glf using theconfiguration parameters specified in the custom_config.propertiesconfiguration file, type the following command:jobdetails -id 617l9jw7095787g83f1c36744e569glf -configFile/opt/test/custom_config.properties

3. To view the status of a job with ID 617c9bf7095787c83e1c36744e569ceb, typethe following command:jobdetails -id 617c9bf7095787c83e1c36744e569ceb

An output similar to the following is displayed:Call Job Dispatcher to get the job properties.Success return from Job Dispatcher.Job ID: 617c9bf7095787c83e1c36744e569cebStatus: SUBMITTED

4. To view details on the job with ID 617c9bf7095787c83e1c36744e569ceb usingthe configuration parameters specified in the custom_config.propertiesconfiguration file, type the following command:jobdetails -jsdl 617c9bf7095787c83e1c36744e569ceb -configFile/opt/test/custom_config.properties

See Alsov “jobsubmit command - Submitting jobs” on page 84v “jobquery command - Performing queries on jobs” on page 86

Chapter 6. Using the command line interface 91

Page 106: awsbrmst-fp1

jobcancel command - Canceling jobsUse the jobcancel command to cancel a submitted job.

Syntax

jobcancel ?

jobcancel [-usr user_name -pwd password] -id job_ID [-configFile configuration_file]

Description

This command cancels the running of submitted jobs using the unique ID createdat job submission. To retrieve the job ID after submitting the job, you can use thejobquery command specifying the job name.

Options

? Displays help information.

-usr user_nameSpecifies the username for a user authorized to perform operations on thecommand line. This parameter is required when security is enabled and theusername is not defined in the CLIConfig.properties configuration file (withthe tdwb_user keyword).

-pwd passwordSpecifies the password for a user authorized to perform operations on thecommand line. This parameter is required when security is enabled and thepassword is not defined in the CLIConfig.properties configuration file (withthe tdwb_pwd keyword).

-id job_IDSpecifies the unique job ID created at submission time. This parameter isrequired.

-configFile configuration_fileSpecifies the name and path of a custom configuration file. This parameter isoptional. If this parameter is not specified, the default configuration file isassumed. For more information on the configuration file, see “Command-lineconfiguration file” on page 78.

Authorization

The user name and password for the command are defined in theCLIConfig.properties file. To override the settings defined in this file, you can enterthe user name and password when typing the command. For more information onthe CLIConfig.properties file, see “Command-line configuration file” on page 78.

Return Values

The jobcancel command returns one of the following values:0 Indicates that jobcancel completed successfully.< > 0 Indicates that jobcancel failed.

Examples1. To cancel the running of a job with ID 617l9jq7037529f83x1w36185e569fwl, type

the following command:

92 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 107: awsbrmst-fp1

jobcancel -id 617l9jq7037529f83x1w36185e569fwl

See Also

“jobsubmit command - Submitting jobs” on page 84

jobstore command - Managing job definitionsUse the jobstore command to manage job definitions.

Syntax

jobstore ?

jobstore [-usr user_name -pwd password]{[ -create jsdl_file ] | [ -update jsdl_file ] |[-del job_definition_name ] | [ -get job_definition_name ] | [-queryall ] | [[-queryname job_definition_name...] [ -querydesc job_definition_description...][-queryowner job_definition_owner... ]]} [ -configFile configuration_file }

Description

This command saves and updates JSDL files in the Job Repository. JSDL files aresaved in the database as job definitions with unique names. After saving JSDL filesin the database, you can perform the following operations on job definitions:v Delete job definitionsv Print job definitions to standard output or save them to a filev Perform queries on job definitions based on several attributes

You can submit job definitions using the jobsubmit command. For moreinformation on the jobsubmit command, see “jobsubmit command - Submittingjobs” on page 84.

Options

? Displays help information.

-usr usernameSpecifies the user name for a user authorized to perform operations on thecommand line. This parameter is required when security is enabled and theuser name is not defined in the CLIConfig.properties configuration file (withthe tdwb_user keyword).

-pwd passwordSpecifies the password for a user authorized to perform operations on thecommand line. This parameter is required when security is enabled and thepassword is not defined in the CLIConfig.properties configuration file (withthe tdwb_pwd keyword).

-create jsdl_fileSpecifies the name and path to a JSDL file to be saved in the Job Repositorydatabase. The JSDL file is saved as a job definition. The name for the jobdefinition is saved within the JSDL file and can only be modified by editingthe JSDL file. Delete and retrieve (get) operations are performed on the jobdefinition.

-update jsdl_fileSpecifies the name and path to a JSDL file to be updated in the Job Repositorydatabase. The JSDL file must be already existing in the database.

Chapter 6. Using the command line interface 93

Page 108: awsbrmst-fp1

-del job_definition_nameDeletes a job definition from the Job Repository database.

-get job_definition_namePrints the JSDL file contained in the job definition to standard output or to afile you specify. You can use this command for performing minor editing onjob definitions.

-queryallPerforms a query without any filters. This query returns all job definitionsstored in the dynamic workload broker database.

-queryname job_definition_namePerforms a search on job definitions based on the job definition name. The jobdefinition name is unique. This parameter is case sensitive. Wildcards (*, ?) aresupported.

-querydesc job_definition_descPerforms a search on job definitions based on the job definition description.Wildcards are supported.

-queryowner job_definition_ownerPerforms a search on job definitions based on the user who created the jobdefinition.

-configFile configuration_fileSpecifies the name and path of a custom configuration file. This parameter isoptional. If this parameter is not specified, the default configuration file isassumed. For more information on the configuration file, see “Command-lineconfiguration file” on page 78.

Authorization

The user name and password for the command are defined in theCLIConfig.properties file. To override the setting defined in this file, you can enterthe user name and password when typing the command. For more information onthe CLIConfig.properties file, see “Command-line configuration file” on page 78.

Return Values

The jobstore command returns one of the following values:0 Indicates that jobstore completed successfully.< > 0 Indicates that jobstore failed.

Examples1. To retrieve all jobs created by user Administrator, type the following

command:jobstore -queryuser Administrator

2. To update the job branch_update already stored in the Job repository database,type the following command:jobstore -update ../jsdl/branch_update.xml

See Alsov “jobsubmit command - Submitting jobs” on page 84v “jobquery command - Performing queries on jobs” on page 86

94 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 109: awsbrmst-fp1

jobgetexecutionlog command - Viewing job outputUse the jobgetexecutionlog command to view the output of a submitted job.

Syntax

jobgetexecutionlog ?

jobgetexecutionlog [-usr user_name -pwd password] -id job_ID -sizePage size Page-offset offset [-configFile configuration_file]

Description

This command displays the job output for submitted jobs using the unique IDcreated at job submission. To retrieve the job ID after submitting the job, you canuse the jobquery command specifying the job name. You can also specify thelength of the output page to be displayed and the number of the byte in the joboutput from where you want to start displaying the output.

Options

? Displays help information.

-usr user_nameSpecifies the username for a user authorized to perform operations on thecommand line. This parameter is required when security is enabled and theusername is not defined in the CLIConfig.properties configuration file (withthe tdwb_user keyword).

-pwd passwordSpecifies the password for a user authorized to perform operations on thecommand line. This parameter is required when security is enabled and thepassword is not defined in the CLIConfig.properties configuration file (withthe tdwb_pwd keyword).

-id job_IDSpecifies the unique job ID created at submission time. This parameter isrequired.

-sizePage size PageSpecifies the number of bytes to be displayed in the job output page.

-offset offsetSpecifies the number of the first byte to be displayed in the job output page.This option can be used to view large job outputs.

-configFile configuration_fileSpecifies the name and path of a custom configuration file. This parameter isoptional. If this parameter is not specified, the default configuration file isassumed. For more information on the configuration file, see “Command-lineconfiguration file” on page 78.

Authorization

The user name and password for the command are defined in theCLIConfig.properties file. To override the settings defined in this file, you can enterthe user name and password when typing the command. For more information onthe CLIConfig.properties file, see “Command-line configuration file” on page 78.

Chapter 6. Using the command line interface 95

Page 110: awsbrmst-fp1

Return Values

The jobgetexecutionlog command returns one of the following values:0 Indicates that jobgetexecutionlog completed successfully.< > 0 Indicates that jobgetexecutionlog failed.

Examples1. To view the output of a job with ID 617l9jq7037529f83x1w36185e569fwl

displaying the output in pages containing 400® bytes starting from the first bytein the page, type the following command:jobgetexecutionlog -id 617l9jq7037529f83x1w36185e569fwl -sizePage 400 -offset 1

The following output is displayed:Call Job Dispatcher to get the output of the jobSuccess returned from Job DispatcherGet Execution Log request submittedThe Execution Log Page requested is:al 5drwxrwxrwx 7 root root 200 Aug 24 16:39 .drwxrwxrwx 8 root root 208 Aug 22 15:11 ..drwxrwxrwx 6 root root 248 Aug 22 15:11 eclipse-rw-rw-rw- 1 root root 139 Aug 24 16:39 jsdefdrwxr-xr-x 2 root root 552 Aug 24 16:54 logsdrwxrwxrwx 5 root root 240 Aug 22 15:11 rcpdrwxrwxrwx 3 root root 72 Aug 22 15:11 shareddrwxrwxrwx 3 root root 80 Aug 22 15:11 workspace

The file size is:381

See Alsov “jobsubmit command - Submitting jobs” on page 84v “jobquery command - Performing queries on jobs” on page 86

movehistorydata command - Maintaining the database tables

You can use the movehistorydata command when access to the database becomestoo slow.

This problem might be due to a huge number of records being present in thedatabase, for example when bulk job submissions are performed.

You can use the movehistorydata command to move the data present in the JobRepository to the archive tables. When you run this command, the jobs are movedto the following tables in the database:

JOA_JOB_ARCHIVESContains archived job instances

JRA_JOB_RESOURCE_ARCHIVESContains resource information related to the jobs

MEA_METRIC_ARCHIVESContains metrics collected for the jobs

For more information on historical tables, refer to the IBM Tivoli Workload SchedulerAdministration Guide.

96 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 111: awsbrmst-fp1

Note: Depending on the number of jobs and accesses to the database, a cleanupoperation might cause some peaks in memory or CPU usage.

If your Tivoli Workload Scheduler database is DB2 and you use FIPS security, torun this command successfully you need to have thecom.ibm.tdwb.dao.rdbms.useSSLConnections option set to TRUE in theCLIConfig.properties file.

Syntax

movehistorydata ?

movehistorydata -dbUsr db_user_name-dbPwd db_password[-successfulJobsMaxAge successfulJobsMaxAge [-notSuccessfulJobsMaxAgenotSuccessfulJobsMaxAge ][ -archivedJobsMaxAge archivedJobsMaxAge]]

Description

This command performs a cleanup operation on the Job Repository database.Based on the values you specify, information on submitted jobs is moved to thearchive database and the information in the archive database is deleted.

Use this command to temporarily override the settings defined in theJobDispatcherConfig.properties file, when unexpected events require animmediate database cleanup. The settings in the JobDispatcherConfig.propertiesfile remain unchanged. For more information on theJobDispatcherConfig.properties file, refer to the IBM Tivoli Workload SchedulerAdministration Guide.

Options

? Displays help information.

-dbUsr db_user_nameSpecifies the username for a user authorized to perform operations on thedatabase server.

-dbPwd db_passwordSpecifies the password for a user authorized to perform operations on thedatabase server.

-successfulJobsMaxAge successfulJobsMaxAgeSpecifies how many hours jobs completed successfully or cancelled must bekept in the Job Repository database before being archived. The default value is12 hours.

-notSuccessfulJobsMaxAge notSuccessfulJobsMaxAgeSpecifies how many hours jobs completed unsuccessfully or in unknown statusmust be kept in the Job Repository database before being archived. The defaultvalue is 72 hours.

-archivedJobsMaxAge archivedJobsMaxAgeSpecifies how many hours jobs must be kept in the archive database beforebeing archived. The default value is 168 hours.

Return Values

The movehistorydata command returns one of the following values:0 Indicates that movehistorydata completed successfully.

Chapter 6. Using the command line interface 97

Page 112: awsbrmst-fp1

< > 0 Indicates that movehistorydata failed.

Examples1. To move to the archive database all successful jobs completed in the last 40

hours, type the following command:movehistorydata -dbUsr halmst -dbPwd dgordon -successfulJobsMaxAge 40

2. To move to the archive database all jobs in all supported statuses and removefrom the archive database all jobs older than 700 hours, type the followingcommand:movehistorydata -dbUsr halmst -dbPwd dgordon -successfulJobsMaxAge 0

-notSuccessfulJobsMaxAge 0 -archivedJobsMaxAge 700

resource command - Working with resources

You can use the resource command to create, modify, associate, query or setresources online or offline.

Syntax

resource ?

resource [-usr user_name -pwd password ]{[-create{ -logical name -type type[-quantity quantity ][-offline ] |-group name[-offline ]}]|[-delete{-logical name |-group name |-computer name |-computerByID ID}]|[-update{-computer name{[-setOnline | -setOffline]} |-logical name[-setName name][-setType type][-setQuantity quantity][-setOnline | -setOffline][-addComputer name |-addComputerByID ID |-removeComputer name |-removeComputerByID ID]|-group name[-setName name][-setOnline | -setOffline][-addComputer name |-addComputerByID ID |-removeComputer name |-removeComputerByID ID |-addLogical name |-removeLogical name]}]|[-query{-computer name [-v] |-logical name [-v] |

98 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 113: awsbrmst-fp1

-groupname [-v]}[-configFile configuration_file]}

Description

Use this command to work with computers, logical resources, and resource groups.In particular it is possible to:v Create, update, list and delete logical resources or groupsv Create logical resources, associate them to computers, define groups of logical

resources or computers and set them online or offlinev Retrieve and update resource properties by using the query and the update

optionsv Change the association between computers and logical resourcesv Delete computers associated to resources, set them online or offline, and query

computer properties

Options

? Displays help information.

-usr user_nameSpecifies the user name for a user authorized to perform operations on thecommand line. This option is required when security is enabled and the username is not defined in the CLIConfig.properties configuration file (with thetdwb_user keyword).

-pwd passwordSpecifies the password for a user authorized to perform operations on thecommand line. This option is required when security is enabled and thepassword is not defined in the CLIConfig.properties configuration file (withthe tdwb_pwd keyword).

-create -logical name -type typeCreates the logical resource with the specified name and type. It is alsopossible to set a specific quantity or set the resource offline by using optionalparameters in the following way:

-create -logical name -type type-quantity quantity -offline

-create -group nameCreates the resource group with the specified name. It is also possible to set itoffline by using the -offline optional parameter in the following way:

-create -group name -offline

-delete -logical nameDeletes the logical resource with the specified name.

-delete -group nameDeletes the resource group with the specified name.

-delete -computer nameDeletes the computer system with the specified name.

-delete -computerByID IDDeletes the computer system with the specified ID.

-update -computer nameUpdates the computer system with the specified name. You can set thecomputer online or offline as follows:

Chapter 6. Using the command line interface 99

Page 114: awsbrmst-fp1

-update -computer name -setOnlineSets the specified computer online.

-update -computer name -setOfflineSets the specified computer offline.

-update -logical nameUpdates the specified logical resource. You can update the properties andstatus of a resource in the following ways:

-update -logical name -setName nameUpdates the name of the specified logical resource.

-update -logical name -setType typeUpdates the type of the specified logical resource.

-update -logical name -setQuantity quantityUpdates the quantity of the specified logical resource.

-update -logical name -setOnlineSets online the specified logical resource.

-update -logical name -setOfflineSets offline the specified logical resource.

You can change the association between a logical resource and a computer inthe following ways:

-update -logical name -addComputer nameAssociates the specified logical resource to the computer with the specifiedname.

-update -logical name -addComputerByID IDAssociates the specified logical resource to the computer with the specifiedID.

-update -logical name -removeComputer nameRemoves the association between the specified logical resource and thecomputer with the specified name.

-update -logical name -removeComputerByID IDRemoves the association between the specified logical resource and thecomputer with the specified ID.

-update -group nameUpdates the specified resource group. You can update the properties and statusof a resource group in the following ways:

-update -group name -setName nameUpdates the name of the specified resource group.

-update -group name -setOnlineSets online the specified resource group.

-update -group name -setOfflineSets offline the specified resource group.

You can add and remove logical resources or computers to and from a resourcegroup in the following ways:

-update -group name -addLogical nameAdds the logical resource with the specified name to the resource group.

100 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 115: awsbrmst-fp1

-update -group name -removeLogical nameRemoves the logical resource with the specified name from the resourcegroup.

-update -group name -addComputer nameAdds the computer with the specified name to the resource group.

-update -group name -addComputerByID IDAdds the computer with the specified ID to the resource group.

-update -group name -removeComputer nameRemoves the computer with the specified name from the resource group.

-update -group name -removeComputerByID IDRemoves the computer with the specified ID from the resource group.

-query -computer nameRetrieves the following properties of the specified computer:v Namev Computer IDv Operating system namev Operating system typev Operating system versionv Statusv Availability status

Retrieves the following additional properties if you add the -v option:v Physical memoryv Virtual memoryv CPU utilizationv Free physical memoryv Free virtual memoryv Free swap spacev Allocated physical memoryv Allocated virtual memoryv Allocated swap spacev Processors numberv Allocated processors numberv Processor typev Processor speedv Manufacturerv Modelv Serial number

You can use the asterisk (*) as a wildcard character in the following ways:

As a single parameterYou must enclose it between double quotes, for example:C:\IBM\TWA\TDWB\bin>resource –query –computer "*"

This command returns a list of all existing computers.

To complete a computer nameYou must enclose the entire name between double quotes, for example:

Chapter 6. Using the command line interface 101

1

Page 116: awsbrmst-fp1

C:\IBM\TWA\TDWB\bin> resource –query –computer "lab123*"

This command returns a list of all existing computers with a namestarting with lab123.

-query -logical nameRetrieves the name and the type of the specified logical resource. Retrieves thefollowing additional properties if you add the -v option:v Statusv Quantityv Current allocationv Computers list

You can use the asterisk (*) as a wildcard character in the following ways:

As a single parameterYou must enclose it between double quotes, for example:C:\IBM\TWA\TDWB\bin>resource –query –logical "*"

This command returns a list of all existing logical resources.

To complete a resource nameYou must enclose the entire name between double quotes, for example:C:\IBM\TWA\TDWB\bin> resource –query –logical "myRes*"

This command returns a list of all existing logical resources with aname starting with myRes.

-query -group nameRetrieves the name and the status of the specified resource group. Retrieves thelist of computers and of logical resources contained in the resource group ifyou use the –v option.

You can use the asterisk (*) as a wildcard character in the following ways:

As a single parameterYou must enclose it between double quotes, for example:C:\IBM\TWA\TDWB\bin>resource –query –group "*"

This command returns a list of all existing resource groups.

To complete a resource group nameYou must enclose the entire name between double quotes, for example:C:\IBM\TWA\TDWB\bin> resource –query –group "myResGrou*"

This command returns a list of all existing resource groups with aname starting with myResGrou.

-configFile configuration_fileSpecifies the name and the path of a custom configuration file. This keyword isoptional. If you do not specify it, the default configuration file is assumed. Formore information on the configuration file, see “Command-line configurationfile” on page 78.

Authorization

The user name and password for the command are defined in theCLIConfig.properties file. To override the settings defined in this file, you canenter the user name and the password when you type the command. For more

102 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 117: awsbrmst-fp1

information on the CLIConfig.properties file, see “Command-line configurationfile” on page 78.

Return Values

The resource command returns one of the following values:0 Indicates that the command completed successfully.< > 0 Indicates that the command failed.

Examplesv To create a logical resource named myApplication, of type Applications, type the

following command:resource.bat -usr john -pwd BXVFDCGS -create -logical myApplication -type Applications

The following output is displayed:AWKCLI153I Logical resource "myApplication" created.

v To update the quantity of the logical resource named myApplication, type thefollowing command:resource.bat -update -logical myApplication -setQuantity 5 -usr john -pwd BXVFDCGS

The following output is displayed:AWKCLI165I Logical resource "myApplication" updated.

v To add the relationship between a logical resource and a computer, type thefollowing command:resource.bat -update -logical myApplication -addComputer myComputer -usr john -pwd BXVFDCGS

The following output is displayed:AWKCLI165I Logical resource "myApplication" updated.

v To retrieve details of a logical resource named myApplication, type the followingcommand:resource.bat -usr john -pwd BXVFDCGS -query -logical myApplication –v

The following output is displayed:AWKCLI171I Calling the resource repository to perform a query on resources.

AWKCLI172I "1" logical resources were found for your query.Details are as follows:

Resource Name:myApplicationResource Type:ApplicationsResource Status:OnlineResource Quantity:5Resource Current Allocation:0Computers List:

Computer Name:myComputerComputer ID:D656470E8D76409F9F4FDEB9D764FF59Computer Status:OnlineComputer Availability Status:Unavailable

v 4. To set the logical resource named myApplication offline, type the followingcommand:resource.bat -usr john -pwd BXVFDCGS -update -logical myApplication -setOffline

The following output is displayed:AWKCLI165I Logical resource "myApplication" updated.

v 5. To set the computer named myComputer offline, type the following command:

Chapter 6. Using the command line interface 103

Page 118: awsbrmst-fp1

resource.bat -usr john -pwd BXVFDCGS -update -computer myComputer -setOffline

The following output is displayed:AWKCLI165I Computer "myComputer" updated.

v 6. To retrieve basic properties of the computer named myComputer, type thefollowing command:resource.bat -usr john -pwd BXVFDCGS -query -computer myComputer

The following output is displayed:AWKCLI171I Calling the resource repository to perform a query on resources.AWKCLI174I "1" computers were found for your query.Details are as follows:

Computer Name: myComputerComputer ID:D656470E8D76409F9F4FDEB9D764FF59Computer OS Name: Microsoft Windows XP Professional English (United States) versionComputer OS Type:Windows XPComputer OS Version:5Computer Status:OfflineComputer Availability Status:Unavailable

v 7. To retrieve detailed properties of the computer named myComputer, type thefollowing command:resource.bat -usr john -pwd BXVFDCGS -query -computer myComputer -v

The following output is displayed:AWKCLI171I Calling the resource repository to perform a query on resources.AWKCLI174I "1" computers were found for your query.Details are as follows:

Computer Name: myComputerComputer ID:D656470E8D76409F9F4FDEB9D764FF59Computer OS Name:Microsoft Windows XP Professional English (United States) versionComputer OS Type:Windows XPComputer OS Version:5Computer Status:OfflineComputer Availability Status:UnavailableComputer details:

Physic memory = 2095536.0Virtual memory = 3513788.0Cpu utilization = 16.0Free physic memory = 947972.0Free virtual memory = 2333484.0Free swap space = 52.0Allocated physic memory = 0.0Allocated virtual memory = 0.0Allocated swap space = 0.0Processors number = 1.0Allocated processors number = 0.0Processor type = x86Processor speed = 1995.00Manufacturer = IBMModel = 2668F8GSerial number = L3WZYNC

v To create a resource group named myGroup, type the following command:resource.bat -usr john -pwd BXVFDCGS -create -group myGroup

The following output is displayed:AWKCLI153I Resource group "myGroup" created.

104 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 119: awsbrmst-fp1

v To retrieve basic properties of a resource group named myGroup, type thefollowing command:resource.bat -query -group myGroup

The following output is displayed:Setting CLI environment variables....

AWKCLI171I Calling the resource repository to perform a query on resources.AWKCLI173I "1" groups were found for your query.Details are as follows:

Group Name:myGroupGroup Status:Online

v To add the computer named myComputer to a resource group named myGroup,type the following command:resource.bat -update -group myGroup -addComputer myComputer

The following output is displayed:Setting CLI environment variables....

AWKCLI165I Resource Group "myGroup" updated.

v To retrieve details of a resource group named myGroup, type the followingcommand:resource.bat -query -group myGroup -v

The following output is displayed:Setting CLI environment variables....

AWKCLI171I Calling the resource repository to perform a query on resources.AWKCLI173I "1" groups were found for your query.Details are as follows:

Group Name:myGroupGroup Status:OnlineComputers List:Computer Name:myComputer

Computer ID:D656470E8D76409F9F4FDEB9D764FF59Computer Status:Online

Computer Availability Status:Unavailable

Resources List:

Running the resource command from an agentStarting from this version of Tivoli Workload Scheduler, you can create andmanage resources and groups of resources and computers from Tivoli WorkloadScheduler agents besides the master domain manager. For this purpose anadditional instance of the CLIConfig.properties file is installed on every agent. Ifyou intend to run the resource command from an agent, you must configurecertain keywords of CLIConfig.properties locally.

Configuring the local CLIConfig.properties file

When you apply the version 8.5.1.01 fixpack on a Tivoli Workload Schedulerversion 8.5.1 agent, a local copy of CLIConfig.properties is automatically installedand partially configured.

Important: For this to work properly, the 8.5.1 version of the agent must havebeen installed with the runtime environment for Java jobs.

Chapter 6. Using the command line interface 105

1

111111

1

111

11

Page 120: awsbrmst-fp1

CLIConfig.properties is installed in the following path in the agent:TWA_home/TWS/TDWB_CLI/config

To be able to run resource.bat or resource.sh from the agent, customize thefollowing keywords of the local CLIConfig.properties file:

ITDWBServerHostSpecify the IP address or the hostname of the master domain manager.

ITDWBServerPortSpecify the number of the WebSphere Application Server HTTP port.

ITDWBServerSecurePortSpecify the number of the WebSphere Application Server HTTPS port.

tdwb_userSpecify the user name for a user authorized to perform operations ondynamic workload broker when security is enabled. This user must bepreviously defined on IBM WebSphere. For more information on securityconsiderations, refer to IBM Tivoli Workload Scheduler Administration Guide.

tdwb_pwdSpecify the password for a user authorized to perform operations ondynamic workload broker when security is enabled. This password mustbe previously defined on IBM WebSphere. For more information onsecurity considerations, refer to IBM Tivoli Workload Scheduler AdministrationGuide.

Starting the command

To run the command, enter:resource.bat

orresource.sh

106 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

1

1

11

11

11

11

11111

111111

1

1

1

1

1

1

Page 121: awsbrmst-fp1

Appendix A. Accessibility

Accessibility features help users with physical disabilities, such as restrictedmobility or limited vision, to use software products successfully. The majoraccessibility features in this product enable users to do the following:v Use assistive technologies, such as screen-reader software and digital speech

synthesizer, to hear what is displayed on the screen. Consult the productdocumentation of the assistive technology for details on using those technologieswith this product.

v Operate specific or equivalent features using only the keyboard.v Magnify what is displayed on the screen.

In addition, the product documentation was modified to include features to aidaccessibility:v All documentation is available in both HTML and convertible PDF formats to

give the maximum opportunity for users to apply screen-reader software.v All images in the documentation are provided with alternative text so that users

with vision impairments can understand the contents of the images.

Navigating the interface using the keyboardStandard shortcut and accelerator keys are used by the product and aredocumented by the operating system. Refer to the documentation provided byyour operating system for more information.

Magnifying what is displayed on the screenYou can enlarge information on the product windows using facilities provided bythe operating systems on which the product is run. For example, in a MicrosoftWindows environment, you can lower the resolution of the screen to enlarge thefont sizes of the text on the screen. Refer to the documentation provided by youroperating system for more information.

© Copyright IBM Corp. 2009, 2010 107

Page 122: awsbrmst-fp1

108 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 123: awsbrmst-fp1

Appendix B. Support information

If you have a problem with your IBM software, you want to resolve it quickly. Thissection describes the following options for obtaining support for IBM softwareproducts:v “Searching knowledge bases”v “Obtaining fixes”v “Receiving weekly support updates” on page 110v “Contacting IBM Software Support” on page 110

Searching knowledge basesYou can search the available knowledge bases to determine whether your problemwas already encountered and is already documented.

Searching the information centerIBM provides extensive documentation that can be installed on your localcomputer or on an intranet server. You can use the search function of thisinformation center to query conceptual information, instructions for completingtasks, and reference information.

Searching the InternetIf you cannot find an answer to your question in the information center, search theInternet for the latest, most complete information that might help you resolve yourproblem.

To search multiple Internet resources for your product, use the Web search topic inyour information center. In the navigation frame, click Troubleshooting andsupport � Searching knowledge bases and select Web search. From this topic, youcan search a variety of resources, including the following:v IBM technotesv IBM downloadsv IBM Redbooksv IBM developerWorksv Forums and newsgroupsv Google

Obtaining fixesA product fix might be available to resolve your problem. To determine what fixesare available for your IBM software product, follow these steps:1. Go to the IBM Software Support Web site at http://www.ibm.com/software/

support.2. Click Downloads and drivers in the Support topics section.3. Select the Software category.4. Select a product in the Sub-category list.5. In the Find downloads and drivers by product section, select one software

category from the Category list.

© Copyright IBM Corp. 2009, 2010 109

Page 124: awsbrmst-fp1

6. Select one product from the Sub-category list.7. Type more search terms in the Search within results if you want to refine your

search.8. Click Search.9. From the list of downloads returned by your search, click the name of a fix to

read the description of the fix and to optionally download the fix.

For more information about the types of fixes that are available, see the IBMSoftware Support Handbook at http://techsupport.services.ibm.com/guides/handbook.html.

Receiving weekly support updatesTo receive weekly e-mail notifications about fixes and other software support news,follow these steps:1. Go to the IBM Software Support Web site at http://www.ibm.com/software/

support.2. Click My support in the upper right corner of the page.3. If you have already registered for My support, sign in and skip to the next

step. If you have not registered, click register now. Complete the registrationform using your e-mail address as your IBM ID and click Submit.

4. Click Edit profile.5. In the Products list, select Software. A second list is displayed.6. In the second list, select a product segment, for example, Application servers.

A third list is displayed.7. In the third list, select a product sub-segment, for example, Distributed

Application & Web Servers. A list of applicable products is displayed.8. Select the products for which you want to receive updates, for example, IBM

HTTP Server and WebSphere Application Server.9. Click Add products.

10. After selecting all products that are of interest to you, click Subscribe to emailon the Edit profile tab.

11. Select Please send these documents by weekly email.12. Update your e-mail address as needed.13. In the Documents list, select Software.14. Select the types of documents that you want to receive information about.15. Click Update.

If you experience problems with the My support feature, you can obtain help inone of the following ways:

OnlineSend an e-mail message to [email protected], describing your problem.

By phoneCall 1-800-IBM-4You (1-800-426-4968).

Contacting IBM Software SupportIBM Software Support provides assistance with product defects.

110 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 125: awsbrmst-fp1

Before contacting IBM Software Support, your company must have an active IBMsoftware maintenance contract, and you must be authorized to submit problems toIBM. The type of software maintenance contract that you need depends on thetype of product you have:v For IBM distributed software products (including, but not limited to, Tivoli,

Lotus, and Rational products, as well as DB2 and WebSphere products that runon Windows, or UNIX operating systems), enroll in Passport Advantage in oneof the following ways:

OnlineGo to the Passport Advantage Web site at http://www.lotus.com/services/passport.nsf/ WebDocs/Passport_Advantage_Home and clickHow to Enroll.

By phoneFor the phone number to call in your country, go to the IBM SoftwareSupport Web site at http://techsupport.services.ibm.com/guides/contacts.html and click the name of your geographic region.

v For customers with Subscription and Support (S & S) contracts, go to theSoftware Service Request Web site at https://techsupport.services.ibm.com/ssr/login.

v For customers with IBMLink, CATIA, Linux, OS/390, iSeries, pSeries, zSeries,and other support agreements, go to the IBM Support Line Web site athttp://www.ibm.com/services/us/index.wss/so/its/a1000030/dt006.

v For IBM eServer software products (including, but not limited to, DB2 andWebSphere products that run in zSeries, pSeries, and iSeries environments), youcan purchase a software maintenance agreement by working directly with anIBM sales representative or an IBM Business Partner. For more informationabout support for eServer software products, go to the IBM Technical SupportAdvantage Web site at http://www.ibm.com/servers/eserver/techsupport.html.

If you are not sure what type of software maintenance contract you need, call1-800-IBMSERV (1-800-426-7378) in the United States. From other countries, go tothe contacts page of the IBM Software Support Handbook on the Web athttp://techsupport.services.ibm.com/guides/contacts.html and click the name ofyour geographic region for phone numbers of people who provide support foryour location.

To contact IBM Software support, follow these steps:1. “Determining the business impact”2. “Describing problems and gathering information” on page 1123. “Submitting problems” on page 112

Determining the business impactWhen you report a problem to IBM, you are asked to supply a severity level.Therefore, you need to understand and assess the business impact of the problemthat you are reporting. Use the following criteria:

Severity 1The problem has a critical business impact. You are unable to use theprogram, resulting in a critical impact on operations. This conditionrequires an immediate solution.

Severity 2The problem has a significant business impact. The program is usable, butit is severely limited.

Appendix B. Support information 111

Page 126: awsbrmst-fp1

Severity 3The problem has some business impact. The program is usable, but lesssignificant features (not critical to operations) are unavailable.

Severity 4The problem has minimal business impact. The problem causes little impacton operations, or a reasonable circumvention to the problem wasimplemented.

Describing problems and gathering informationWhen describing a problem to IBM, be as specific as possible. Include all relevantbackground information so that IBM Software Support specialists can help yousolve the problem efficiently. To save time, know the answers to these questions:v What software versions were you running when the problem occurred?v Do you have logs, traces, and messages that are related to the problem

symptoms? IBM Software Support is likely to ask for this information.v Can you re-create the problem? If so, what steps were performed to re-create the

problem?v Did you make any changes to the system? For example, did you make changes

to the hardware, operating system, networking software, and so on.v Are you currently using a workaround for the problem? If so, be prepared to

explain the workaround when you report the problem.

Submitting problemsYou can submit your problem to IBM Software Support in one of two ways:

OnlineClick Submit and track problems on the IBM Software Support siteathttp://www.ibm.com/software/support/probsub.html. Type yourinformation into the appropriate problem submission form.

By phoneFor the phone number to call in your country, go to the contacts page ofthe IBM Software Support Handbook at http://techsupport.services.ibm.com/guides/contacts.html and click the name of your geographic region.

If the problem you submit is for a software defect or for missing or inaccuratedocumentation, IBM Software Support creates an Authorized Program AnalysisReport (APAR). The APAR describes the problem in detail. Whenever possible,IBM Software Support provides a workaround that you can implement until theAPAR is resolved and a fix is delivered. IBM publishes resolved APARs on theSoftware Support Web site daily, so that other users who experience the sameproblem can benefit from the same resolution.

112 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 127: awsbrmst-fp1

Notices

This information was developed for products and services offered in the U.S.A.IBM may not offer the products, services, or features discussed in this document inother countries. Consult your local IBM representative for information about theproducts and services currently available in your area. Any reference to an IBMproduct, program, or service is not intended to state or imply that only that IBMproduct, program, or service may be used. Any functionally equivalent product,program, or service that does not infringe any IBM intellectual property right maybe used instead. However, it is the user's responsibility to evaluate and verify theoperation of any non-IBM product, program, or service.

IBM may have patents or pending patent applications covering subject matterdescribed in this document. The furnishing of this document does not give youany license to these patents. You can send license inquiries, in writing, to:

IBM Director of LicensingIBM CorporationNorth Castle DriveArmonk, NY 10504-1785 U.S.A.

For license inquiries regarding double-byte (DBCS) information, contact the IBMIntellectual Property Department in your country or send inquiries, in writing, to:

IBM World Trade Asia CorporationLicensing2-31 Roppongi 3-chome, Minato-kuTokyo 106, Japan

The following paragraph does not apply to the United Kingdom or any othercountry where such provisions are inconsistent with local law:

INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THISPUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHEREXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIEDWARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESSFOR A PARTICULAR PURPOSE.

Some states do not allow disclaimer of express or implied warranties in certaintransactions, therefore, this statement might not apply to you.

This information could include technical inaccuracies or typographical errors.Changes are periodically made to the information herein; these changes will beincorporated in new editions of the publication. IBM may make improvementsand/or changes in the product(s) and/or the program(s) described in thispublication at any time without notice.

Any references in this information to non-IBM Web sites are provided forconvenience only and do not in any manner serve as an endorsement of those Websites. The materials at those Web sites are not part of the materials for this IBMproduct and use of those Web sites is at your own risk.

© Copyright IBM Corp. 2009, 2010 113

Page 128: awsbrmst-fp1

IBM may use or distribute any of the information you supply in any way itbelieves appropriate without incurring any obligation to you.

Licensees of this program who wish to have information about it for the purposeof enabling: (i) the exchange of information between independently createdprograms and other programs (including this one) and (ii) the mutual use of theinformation which has been exchanged, should contact:

IBM Corporation2Z4A/10111400 Burnet RoadAustin, TX 78758 U.S.A.

Such information may be available, subject to appropriate terms and conditions,including in some cases payment of a fee.

The licensed program described in this document and all licensed materialavailable for it are provided by IBM under terms of the IBM Customer Agreement,IBM International Program License Agreement or any equivalent agreementbetween us.

Any performance data contained herein was determined in a controlledenvironment. Therefore, the results obtained in other operating environments mayvary significantly. Some measurements may have been made on development-levelsystems and there is no guarantee that these measurements will be the same ongenerally available systems. Furthermore, some measurement may have beenestimated through extrapolation. Actual results may vary. Users of this documentshould verify the applicable data for their specific environment.

Information concerning non-IBM products was obtained from the suppliers ofthose products, their published announcements or other publicly available sources.IBM has not tested those products and cannot confirm the accuracy ofperformance, compatibility or any other claims related to non-IBM products.Questions on the capabilities of non-IBM products should be addressed to thesuppliers of those products.

All statements regarding IBM's future direction or intent are subject to change orwithdrawal without notice, and represent goals and objectives only.

All IBM prices shown are IBM's suggested retail prices, are current and are subjectto change without notice. Dealer prices may vary.

This information is for planning purposes only. The information herein is subject tochange before the products described become available.

This information contains examples of data and reports used in daily businessoperations. To illustrate them as completely as possible, the examples include thenames of individuals, companies, brands, and products. All of these names arefictitious and any similarity to the names and addresses used by an actual businessenterprise is entirely coincidental.

COPYRIGHT LICENSE:

This information contains sample application programs in source language, whichillustrate programming techniques on various operating platforms. You may copy,modify, and distribute these sample programs in any form without payment to

114 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 129: awsbrmst-fp1

IBM, for the purposes of developing, using, marketing or distributing applicationprograms conforming to the application programming interface for the operatingplatform for which the sample programs are written. These examples have notbeen thoroughly tested under all conditions. IBM, therefore, cannot guarantee orimply reliability, serviceability, or function of these programs. You may copy,modify, and distribute these sample programs in any form without payment toIBM for the purposes of developing, using, marketing, or distributing applicationprograms conforming to IBM‘s application programming interfaces.

Each copy or any portion of these sample programs or any derivative work, mustinclude 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_. All rightsreserved.

If you are viewing this information in softcopy form, the photographs and colorillustrations might not display.

TrademarksIBM, the IBM logo, AIX, DB2, IBMLink, Informix, OS/2, OS/390, OS/400,PowerPC, RAA, Tivoli, Tivoli Enterprise Console, TME, and WebSphere aretrademarks or registered trademarks of International Business MachinesCorporation in the United States, other countries, or both.

Intel, Intel Inside (logos), MMX, Celeron, Intel Centrino, Intel Xeon, Itanium,Pentium and Pentium III Xeon are trademarks or registered trademarks of IntelCorporation or its subsidiaries in the United States, other countries, or both.

Linux is a trademark of Linus Torvalds in the United States, other countries, orboth.

Microsoft and Windows NT are registered trademarks of Microsoft Corporation inthe United States, other countries, or both.

Java and all Java-based trademarks and logos are trademarks orregistered trademarks of Sun Microsystems, Inc. in the United States,other countries, or both.

UNIX is a registered trademark of The Open Group in the United States and othercountries.

HP Runtime Environment for J2SE HP-UX 11i platform, adapted by IBM for IBMSoftware, Version 1.4.2

SET and the SET Logo are trademarks owned by SET Secure Electronic TransactionLLC.

Other company, product, and service names may be trademarks or service marksof others.

Notices 115

Page 130: awsbrmst-fp1

116 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 131: awsbrmst-fp1

Index

Aaccessibility xaffine jobs

defining 5, 85submitting 71

affinitydefining 34, 71, 85definition 5syntax 34

affinity relationshipdefining 34

affinity with job alias 34affinity with job ID 34affinity with job name 34alias

creating when submitting 71defining when submitting 71

archivingjob instances 96

authorization 5

Ccall to a Web service

sample JSDL files 11canceling TWS jobs

kill command 36checking

scan results 40CLIConfig.properties file

command-line configuration 78command line

command location 77managing jobs 77setting the environment 77

command line job statuses 73command line syntax 78command-line configuration

CLIConfig.properties file 78commands

exportserverdata 82importserverdata 83jobcancel 92jobdetails 90jobgetexecutionlog 95jobquery 86jobstore 93jobsubmit 84movehistorydata 96resource 98

computerresource 53

computersconfiguring 39physical resources 40

conman commandmonitoring TWS jobs 36viewing job output 36

consumable resourceresource quantity 49, 56

conventions used in publications xcredentials 49customer support

See Software Support

Ddatabase data extract 11database data validation 11database operations

sample JSDL files 11database stored procedure

database jobssample JSDL files 11

sample JSDL files 11DB tables maintenance

movehistorydata command 96defining user preferences 5dynamic workload broker instance

URI 82, 83

Eeducation

See Tivoli technical trainingenvironment variables 57exportserverdata command 82

Ffile system

related resource 53file transfer jobs

sample JSDL files 11file transfer operations

sample JSDL files 11fixes, obtaining 109

Ggeneric Java job

template 11generic Web service call

template 11global resources

definition 55glossary x

Iimportserverdata command 83information centers, searching for

problem resolution 109Internet

searching for problem resolution 109

JJ2EE jobs

direct scheduling 9EJB 9indirect scheduling 9JMS 9supported operations 9

J2EE operationsJ2EE security 9supported configurations 9supported scheduler type 9WebSphere Application Server

security 9Java jobs

sample JSDL files 11Java operations

sample JSDL files 11job alias

alternative to job ID 71defining 85

Job Brokering Definition Console 49, 61,62, 63, 64, 65

editing job definitions 61, 62, 63, 64,65

job cancelingTWS kill command 36

job definitioncreating 61, 62, 63, 64, 65

job dependencydefining 34

job IDjobcancel command 87jobdetails command 87jobquery command 87jobstatus command 87retrieving 87

job instancesarchiving 96showing 74status 74

job priorityassigning 49

Job Scheduling Consoleaccessibility x

job status 69job status mapping 36

TWS job status 36job statuses

mapping 73supported operations 73

Job Submission DescriptionLanguage 49

job targetsdefining 49, 53

job variables 33creating 71, 72editing 71, 72

jobcancel command 92jobdetails command 90jobgetexecutionlog command 95jobquery command 86

© Copyright IBM Corp. 2009, 2010 117

Page 132: awsbrmst-fp1

jobsallocation 49, 53creating 49, 53defining 49, 53jobs

consumable properties 53optimizable properties 53

optimization 49, 53scheduling 49submitting 70using variables 49

jobstore command 93jobsubmit command 84jsdl

template 57JSDL 49

Kkill command

job canceling 36knowledge bases, searching for problem

resolution 109

Lload-balancing policies 49

defining 56logical resource

related resource 53logical resources

configuring 39creating 42defining 42software information 39

Mmonitoring TWS jobs

conman command 36movehistorydata command 96

Nnetwork system

related resource 53

Ooperating system

related resource 53optimization policies 49

Pphysical resources

checking 40priority 49

assigning to jobs 49problem determination

describing problems 112determining business impact 111submitting problems 112

publications x

Rrelated resource

file system 53logical resource 53network system 53operating system 53

resourcecomputer 53

resource command 98running from agent

CLIConfig.properties setup 105requirement 105

resource groupscreating 44definition 39

resource quantityconsumable resource 49, 56defining 49, 56

resource typesconsumable 53

resourcesoptimizable 53

roles 5

Sscan results 40Software Support

contacting 110describing problems 112determining business impact 111receiving weekly updates 110submitting problems 112

specific job typessample JSDL files 11

status of a job 69submitted jobs

showing 74syntax

command line 78

Ttechnical training

See Tivoli technical trainingTivoli Dynamic Workload Console

accessibility xTivoli technical training xiTivoli Workload Scheduler agent

computer scan 39environment scan 39

Tivoli Workload Scheduler UNISONvariables

in job definitions 28training

See also Tivoli technical trainingtechnical xi

TWS aliasdefinition 34

TWS job statusjob status mapping 36

TWS jobssubmitting 70

TWS kill commandjob canceling 36

UUNISON variables

in job definitions 28user credentials 49user preferences 5users 5using variables 57

Vvariable management 33variables 49

defining 72variables in job

defining at submission 72defining at submissions 71defining in job definition 57editing at submission 71, 72

viewing job outputconman command 36

WWeb Console

roles 6user groups 6users 6

Web Console job statuses 73Web service jobs

sample JSDL files 11welcome page 5

118 IBM Tivoli Workload Scheduler: Scheduling Workload Dynamically

Page 133: awsbrmst-fp1
Page 134: awsbrmst-fp1

����

Program Number: 5698-WSH

Printed in USA

SC23-9856-01

Page 135: awsbrmst-fp1

Spineinformation:

IBM

Tivo

liW

orkl

oad

Sche

dule

rVe

rsio

n8.

5.1

(Rev

ised

May

2010

)Sc

hedu

ling

Wor

kloa

dDy

nam

ical

ly��