WORKLOAD AUTOMATION COMMUNITY
  • Home
  • Blogs
  • Forum
  • Resources
  • Events
    • IWA 9.5 Roadshows
  • About
  • Contact
  • What's new

Controlling SAP jobs scheduled by end-user

11/26/2018

1 Comment

 
Picture
If you are a Workload Automation Administrator and you are involved in orchestrating SAP workloads, one of most frequent questions is: How do I control background jobs that are scheduled by end-users? 

This is definitely one of the top challenges in the Workload Automation area. 


End-user scheduled jobs that bypass a central scheduling are undermining all efforts to control the batch workload on a backend-system and can cause unexpected overloads. 

To make things more complicated, company policies often do not permit to limit scheduling authorization for end-user.
​

The SAP scheduling environment suffers from a high number of background jobs scheduled by end-users that can reduce the efficiency of your SAP ecosystem. 

How can Workload Automation help you? 

By leveraging the SAP Job Interception feature, Workload Automation offers a strong SAP integration through the official eXternal Background Interface (BC-XBP 3.0), enabling a very sophisticated control over the jobs launched by the R/3 users from the SAP GUI. 


The Job Interception mechanism becomes active when the R/3 job scheduler is about to start an R/3 job, (i.e. when the start conditions of an R/3 job are satisfied). It checks the job parameters (job name, creator, client) against the entries in the R/3 table TBCICPT1, and when the job parameters match the criteria, the R/3 job status is set back to scheduled and the job is marked with a special flag, indicating that the it has been intercepted. 
Picture
When Workload Automation has been set up to handle Job Interception, it periodically runs a job to retrieve the list of the intercepted jobs, and reschedules these jobs. In the rest of this blog, this job will be called Interception Collector. 

How do I set up Workload Automation to handle Job Interception in an R/3 environment? 
​

1.) Activate the Job Interception feature of the BC-XBP 3.0 interface  Run INITXBP2 ABAP report to configure the Interception version. The following options are     available:   
  • Interception OFF 
  • Interception with version XBP 2.0 (Using table criteria for ICP rule) 
  • Interception with version XBP 3.0 (Using Criteria Manager for ICP rule) 
Picture
2.) Set up a Workload Automation job to periodically collect the intercepted R/3 jobs 
To define a Workload Automation job that collects and relaunches jobs, use the following syntax: 
 
ENGINE_NAME_HOSTING_XA#JOBNAME 
 DOCOMMAND "WA_home/methods/r3batch -t HIJ -c ENGINE_NAME_HOSTING_XA -- \"-profile_id <profile_ID_number>\"" 
STREAMLOGON WAuser 
DESCRIPTION "Collects intercepted jobs on SAP ENGINE_NAME_HOSTING_XA" 
TASKTYPE UNIX 
RECOVERY STOP 
Picture
The Interception Collector job runs at periodical intervals (for example, every 10 minutes).  
It retrieves all the jobs that have been intercepted since the last run of the Interception Collector, and launches them again according to a template.
​

3.) Specify interception criteria in the R/3 system 
Interception criteria are set by using the SAP Criteria Manager for Workload Automation. 
Criteria Manager is a new feature with XBP 3.0. 
It enables the definition of criteria profiles for: 
  • SAP events 
  • SAP event history reorg 
  • Job Interception  
  • Custom types 
Picture
4.) Specify interception criteria on the Workload Automation side 
Interception criteria for each R/3 system are automatically hold in a separate file: 
CPUNAME_r3batch.icp 

Which is located in the WAhome/methods/r3batch_icp directory on the Workload Automation host workstation. This file is read by r3batch when it is executed by the Interception Collector, as described above. 

Each row in the file is considered as an interception criteria, having it the following fields: 
<client> <job_mask> <user_mask> <template> 

where <client>, <job_mask>, and <user_mask> correspond to the columns of the TBCICPT1 SAP table, and <template> is the name of the template which should be used by the Interception Collector to relaunch the R/3 job.  

Template files 

The template is a file with extension .jdf, located in the same directory as the interception criteria file, for example in WAhome/methods/r3batch_icp<profile_id>. The template file contains instructions for the Interception Collector about how to execute the intercepted R/3 job under control of Workload Automation.   

The syntax corresponds to the syntax of docommand conman command in Workload Automation. To edit this file, you can use any text editor. 

If the template field is empty, the template file default.jdf is used. If this file does not exist, the following instructions are used: 

alias=SAP_$RUN_$JOBNAME_$JOBCOUNT 

This means that the intercepted R/3 jobs are restarted immediately, due to absence of the at=... command, with the Workload Automation name composed of the string: 

 “SAP_”, the current run number of the Interception Collector, the jobname and job ID of the R/3 job. 

To summarize, the instructions for restarting an intercepted R/3 job are retrieved from: 
  • The template file, if the template is specified in the interception criteria file and it exists. 
  • The default template file, if the template is specified in the interception criteria file but it does not exist, or the template is not specified in the interception criteria file. 
  • The default instruction set, if the default template file does not exist. 

Examples: 
The interception criteria table on the R/3 side contains the following entry: 
000*fa* 

The interception criteria file on the Workload Automation side contains the following entry: 
000 * fa* at1700 

The template file at1700.jdf contains the following entry: 
alias;at=1700 

This means that all jobs started by the R/3 users in client 000 whose user name begins with “fa” will be intercepted. The Interception Collector will restart those jobs using the instructions from the template file at1700.jdf. 

For example, the R/3 jobs will be restarted at 17:00 with a random name, due to the alias command. 

Placeholders 

There is a number of placeholders that can be used in the template file and that are replaced by the Interception Collector at runtime: 
Picture
For example, the template: 
alias=ICP_$RAND_$JOBNAME_$JOBCOUNT_$CLIENT;at=1000 

would instruct the Interception Collector to restart the R/3 job DEMO_JOB with job ID 12345678 on client 100 at 10:00 as WA job ICP_1432_DEMO_JOB_12345678_100. 
 
As a conclusion, the end-users can still schedule background jobs via transaction SM36, or by sending reports in the background, but the respective jobs are no longer executed: they are intercepted and managed by Workload Automation!  

Using Workload Automation as a single point of control to orchestrate and optimize your SAP jobs will help you integrate your SAP workload with the rest of your company workflow and will prevent unexpected overloads.   

Stay tuned for my next articles on SAP topics.  If you need additional information, send an email to marco.borgianni@hcl.com. 
 
Picture
Marco Borgianni  
​Senior Technical Specialist Engineer

Marco Borgianni is currently a Senior Technical Specialist Engineer and is working as a services for Workload Automation, an IBM + HCL product. Marco has been working in the Workload Automation team since 2000 as a developer, Level 3 Service Specialist, finally services acquiring a deep knowledge of customers' needs in that area. He is interested in everything that is strongly related to supporting customers in their technological challenges.

​He has a background in computer science technologies, in the design and development of integrations with ERP and Business Analytic tools.
1 Comment
custom report writing service link
9/13/2019 09:48:08 am

If you really want to be productive, then you need to put in all of the hours the right way. If you cannot properly manage your workload, then you will never be able to reach your quotas. I hope that this blog helps you understand or at least get an idea of how important scheduling is. It may not be much, but it can really help you increase some free time for yourself, at least if you are good with it. Be more productive starting today.

Reply

Your comment will be posted after it is approved.


Leave a Reply.

    Archives

    March 2023
    February 2023
    January 2023
    December 2022
    September 2022
    August 2022
    July 2022
    June 2022
    May 2022
    April 2022
    March 2022
    February 2022
    January 2022
    December 2021
    October 2021
    September 2021
    August 2021
    July 2021
    June 2021
    May 2021
    April 2021
    March 2021
    February 2021
    January 2021
    December 2020
    November 2020
    October 2020
    September 2020
    August 2020
    July 2020
    June 2020
    May 2020
    April 2020
    March 2020
    January 2020
    December 2019
    November 2019
    October 2019
    August 2019
    July 2019
    June 2019
    May 2019
    April 2019
    March 2019
    February 2019
    January 2019
    December 2018
    November 2018
    October 2018
    September 2018
    August 2018
    July 2018
    June 2018
    May 2018
    April 2018
    March 2018
    February 2018
    January 2018
    December 2017
    November 2017
    October 2017
    September 2017
    August 2017
    July 2017
    June 2017
    May 2017

    Categories

    All
    Analytics
    Azure
    Business Applications
    Cloud
    Data Storage
    DevOps
    Monitoring & Reporting

    RSS Feed

www.hcltechsw.com
About HCL Software 
HCL Software is a division of HCL Technologies (HCL) that operates its primary software business. It develops, markets, sells, and supports over 20 product families in the areas of DevSecOps, Automation, Digital Solutions, Data Management, Marketing and Commerce, and Mainframes. HCL Software has offices and labs around the world to serve thousands of customers. Its mission is to drive ultimate customer success with their IT investments through relentless innovation of its products. For more information, To know more  please visit www.hcltechsw.com.  Copyright © 2019 HCL Technologies Limited
  • Home
  • Blogs
  • Forum
  • Resources
  • Events
    • IWA 9.5 Roadshows
  • About
  • Contact
  • What's new