HCL Workload Automation, Version 9.4

< Previous

Scheduling jobs dynamically on SAP R/3 systems - A high availability scenario

This scenario shows how to achieve high availability when scheduling critical jobs dynamically on SAP R/3 systems. Tivoli® Workload Scheduler for Applications users can take advantage of the dynamic scheduling capabilities of HCL Workload Automation version 8.5.1 by defining a group of two or more HCL Workload Automation agents, configured to schedule on a given SAP R/3 system, as completely interchangeable. If an agent is unavailable to schedule on the SAP R/3 system, another agent in the group is dynamically selected.

Business goal

Tivoli Workload Scheduler for Applications users scheduling on SAP R/3 systems can achieve 24 x 7 scheduling services on their vendor-acquired software by implementing the dynamic scheduling scenario described in this section.

Roles

This section lists the user roles needed to run the scenario:
dynamic workload broker Developer
Defines the jobs using the Job Brokering Definition Console
dynamic workload broker Operator
Monitors and controls the jobs that have been submitted.
HCL Workload Automation Job Scheduler
Manages Tivoli Workload Scheduler workload by submitting and monitoring jobs.

Software requirements

The following software must be installed and configured, before running this scenario:
  • A HCL Workload Automation version 8.5.1 network with the dynamic scheduling capability.
  • Tivoli Workload Scheduler for Applications version 8.5 or earlier
  • Dynamic Workload Console version 8.5.1.

Setting up the environment

Complete the following tasks before running the scenario:
  • If you are already using Tivoli Workload Scheduler Version 8.5 or earlier and Tivoli Workload Scheduler for Applications for SAP R/3 (r3batch method):
    1. Upgrade your Tivoli Workload Scheduler master domain manager installation to version 8.5.1 using the procedures described in HCL Workload Automation: Planning and Installation. During the upgrade procedure, tick the checkbox option to create the Dynamic Workload Broker CPU definition and activate the dynamic scheduling capability After the upgrade completes, the broker application is started automatically. If you do not choose this option, after the upgrade completes you must start the Broker application manually by running the StartBrokerApplication.bat from the wastools directory on your master domain manager.
      Note: If in your network you have a backup master domain manager of a previous release, you must install the latest fix pack level before you launch the upgrade. The latest fix pack levels are:
      • For HCL Workload Automation version 8.3: fix pack 8.
      • HCL Workload Automation version 8.4: fix pack 4.
    2. Upgrade the agents you intend to use for dynamic scheduling to HCL Workload Automation version 8.5.1. These are the agents on which Tivoli Workload Scheduler for Applications is also installed. During the upgrade procedure, select Add Dynamic scheduling capability. This feature installs the HCL Workload Automation agent and starts it.
    3. Optionally upgrade the agents you selected to Tivoli Workload Scheduler for Applications version 8.5.
    4. On the agent systems which you selected as eligible targets for dynamic scheduling on the SAP R/3 system, choose a common name for the options files. All options files on each of the agents you selected must have the same name.
  • If you are installing Tivoli Workload Scheduler Version 8.5.1 for the first time:
    1. Install a HCL Workload Automation version 8.5.1 master domain manager using the procedures described in HCL Workload Automation: Planning and Installation. Tick the checkbox option to create the Dynamic Workload Broker CPU definition and activate the dynamic scheduling capability. After the installation completes, the broker application is started automatically.
    2. Install two or more HCL Workload Automation agents by selecting the Add Dynamic scheduling capability during the installation. These are the agents that are eligible for dynamic scheduling on your SAP R/3 system.
    3. Install Tivoli Workload Scheduler for Applications version 8.5 on the agents you selected in the previous step.
    4. On the agent systems, choose a common name for the options files. All options files on each of the agents you selected must have the same name.

Running the Scenario

To complete the scenario, perform the following steps:

Procedure

  1. Log in to the Dynamic Workload Broker Console, and select Scheduling Environment.
  2. To define the agent computers that are part of the group eligible for scheduling on the remote SAP system, select Define New Resource Group to start the wizard.
  3. In the Group Type Selection pane, specify the following:
    • In the Name field specify the name of the group you are creating.
    • Select the Computers radio button and click Next.
    • In the Computer Search Criteria pane specify the search criteria of your choice to select the computers for the resource group and click Next.
    • Select the computers to include in the resource group from the search results table and click Next.
    • In the Summary pane, check your choices and click Finish to create the resource group.

    The agent computers belonging to the resource group must each have an options file with the same name.

    As an alternative, you can create a logical resource and associate it to the agents you selected.

  4. In the Job Brokering Definition Console, select File > New > Job brokering definition to create a new definition for the job that runs on the SAP R/3 system. Specify a name for the definition and click Finish to display the Overview page.
  5. Open the Application page and type the required information for the job that you are defining:
    1. In the Type field, select Extended Job.
    2. In the Task String field, specify the job instructions to be run on the target SAP R/3 system. The submit job task is the only task supported in this configuration. For example:-job DYN_SUB -C A -flag type=exec -user TWS4APPS1 -s1 type=A -s1 program=Z_TWS_SLEEP -v1 ONE.
    3. In the Task Type field, specify LJ (launch job).
    4. In the Target field specify the name of the configuration (options) file which is located on the systems that you defined in the resource group. You can also define and use a variable with a default value for this field. In this way, you can use the same JSDL to schedule on different SAP R/3 systems.
    5. In the Access Method field, specify r3batch.exe.
  6. In the Resources page, select Advanced Requirements > Resource Groups > Add to associate the job definition to the resource group created previously.
  7. Write the resource group name.
  8. Click Save to store the job definition.
    Note: You can also define optimization policies for your resource group. For further information, see HCL Workload Automation: Scheduling Workload Dynamically.
  9. Select the new JSDL and upload it to the server by clicking on the corresponding icon.
  10. Submit the job in one of the following ways, depending on whether you want to submit it as a broker job or by using a Tivoli Workload Scheduler job definition.
    • Log in to the Dynamic Workload Console and choose the Tivoli Dynamic Workload Broker portfolio option.
      • Select Definitions > Jobs Optionally specify search criteria and click Search. Select the job definition you created in the previous steps.
      • To run the job, select Submit and click Go.
    • Log in to the Dynamic Workload Console and choose the Tivoli Workload Scheduler portfolio option.
      • Select Workload > Design > Create Workload Definitions. In the Workload Designer create a new broker job definition filling in the required fields as appropriate. In the Workload Broker Job Name field type the name of the JSDL file you created in the previous steps.
      • Submit the HCL Workload Automation job by selecting Workload > Submit > Submit Predefined Jobs .
      You can also add the job to an existing job stream , or submit the job using the jobsubmit command. For further information about the dynamic workload broker command-line interface, see HCL Workload Automation: Scheduling Workload Dynamically.

Expected Results

When the job is submitted, the broker application selects an agent from those defined in the resource group, based on availability and other criteria which you can specify.

When multiple instances of the job are submitted using the selected JSDL, HCL Workload Automation sends them dynamically to the agents defined in the resource group. Regardless of the agent selected, the job is run on the same SAP R/3 system.

Sample Configuration files

An example jsdl file for the job:
<?xml version="1.0" encoding="UTF-8"?>
<jsdl:jobDefinition xmlns:jsdl="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdl"
 xmlns:jsdlxa="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdlxa" name="sapjobs">
 <jsdl:variables>
   <jsdl:stringVariable name="optionFile">SAP_SYS</jsdl:stringVariable>
 <jsdl:variables>
<jsdl:application name="xajob">
 <jsdlxa:xajob accessMethod="r3batch.exe" error="C:\myerr.txt" 
     output="C:\myout.txt" target="${optionFile}">
      <jsdlxa:taskString>-job DYN_SUB -C A -flag type=exec -user TWS4APPS1 
        -s1 type=A -s1 program=Z_TWS_SLEEP -v1 ONE </jsdlxa:taskString>
      <jsdlxa:credential>
        <jsdlxa:userName>fta85bro</jsdlxa:userName>
        <jsdlxa:password>fta85bro</jsdlxa:password>
      </jsdlxa:credential>
    </jsdlxa:xajob>
  </jsdl:application>
  <jsdl:resources>
    <jsdl:group name="SAP_ENV"/>
  </jsdl:resources>
</jsdl:jobDefinition>
An example options file:
R3CLIENT=000
R3HOST=9.168.125.153
R3INSTANCE=00
R3PASSWORD=&p2N-l?bO-dF3F-uX
R3SID=NSP
R3USER=twsuser 
LONG_INTERVAL=300
R3AUDITLEVEL=0 
SHORT_INTERVAL=10 
retry=-1
xbpversion=3 
pchain_details=on 
rfc_open_retry=-1
ccms_alert_history=ON 
throttling_enable_job_interception=ON 
throttling_send_ccms_data=ON
throttling_interval=30 
throttling_send_ccms_rate=2
< Previous