IBM Tivoli Workload Scheduler (TWS) - Hints

Monday, February 8, 2016

Select job streams with a specific Time Zone (TZ)

Selecting a job stream with a specific time zone set-up is a bit challenging as there is no out of the box option, the simplest method is to use direct SQL queries as below:
       
alter session set current_schema=<TWS DB user>;

SELECT DISTINCT WKS.WKS_NAME, STREAM.AJS_NAME, TZ.JST_TIMEZONE_ID
   FROM WKS_WORKSTATIONS WKS, AJS_ABSTRACT_JOB_STREAMS STREAM, JST_JOB_STREAMS TZ
WHERE WKS.WKC_ID=STREAM.WKC_ID AND WKS.WKS_NAME like '%<FTA name>%' AND 
      STREAM.AJS_ID=TZ.AJS_ID AND TZ.JST_TIMEZONE_ID = 'Europe/Bucharest'


where:
<TWS DB user> --> the DB user for TWS schema
<FTA name> --> FTA name (eider full or partial, % is a wild card like @)
TZ.JST_TIMEZONE_ID = 'Europe/Bucharest' --> jobs streams with time zone 'Europe/Bucharest'

Select job streams with / without Carry Forward (CF)

Selecting a job stream with carry forward on / off is a bit challenging as there is no out of the box option, the simplest method is to use direct SQL queries as below:
       
alter session set current_schema=<TWS DB user>;

SELECT DISTINCT WKS.WKS_NAME, STREAM.AJS_NAME, CF.JST_CARRY_FORWARD
   FROM WKS_WORKSTATIONS WKS, AJS_ABSTRACT_JOB_STREAMS STREAM, JST_JOB_STREAMS CF
WHERE WKS.WKC_ID=STREAM.WKC_ID AND WKS.WKS_NAME like '%<FTA name>%' AND 
      STREAM.AJS_ID=CF.AJS_ID AND CF.JST_CARRY_FORWARD = 'N'


where:
<TWS DB user> --> the DB user for TWS schema
<FTA name> --> FTA name (eider full or partial, % is a wild card like @)
CF.JST_CARRY_FORWARD = 'N' --> jobs streams without CF, and 'Y' with

Thursday, September 3, 2015

TWS for Apps, SAP configuration

SAP side configuration:

Copy the 4 correction and transport files from the Tivoli Workload Scheduler home directory to the SAP R/3 server and import them into the SAP R/3 database, as follows:

     1. On your SAP R/3 database server, log on to the SAP R/3 system as an administrator.

     2. Copy the control file and data file from the <TWA_home>\methods directory to the following directories on your SAP R/3 database server:
copy  control_file to /usr/sap/trans/cofiles/
copy data_file to /usr/sap/trans/data/
The names of control_file and data_file are different for releases and are located in <TWA_home>\methods with the following names and formats:
      For SAP R/3 releases earlier than 6.10:
control_file: K000xxx.TV1, K900xxx.TV2
data_file: R000xxx.TV1, R900xxx.TV2
      For SAP R/3 releases 6.10, or later:
control_file: K9000xx.TV1, K9007xx.TV1
data_file: R9000xx.TV1, R9007xx.TV1
where xx is a digit generated by the SAP system

Specifically, for Tivoli Workload Scheduler for Applications version 8.5 the following files are used:
      For SAP R/3 releases earlier than 6.10:
for standard jobs scheduling: K000538.TV1, R000538.TV1
for IDoc monitoring and job throttling: K900294.TV2, R900294.TV2
      For SAP R/3 releases 6.10, or later:
for standard jobs scheduling: K900044.TV1, R900044.TV1
for IDoc monitoring and job throttling: K900751.TV1, R900751.TV1

TWS side configuration (on the server where TWS for Applications was deployed):

After a new TWS4APPS installation, if you try to start a SAP job, you will get missing library error(s), to fix the problem, take the following steps:
      1. Check the LINK and search for SAP Remote Function Call libraries, to see which RFC libraries are needed – check the OS type where TWS4APPS is installed and look it to the .pdf table.
      2. The libraries should be available on SAP WebSite (help from SAP team may be needed, to download them).
      3. The libraries are compressed in car format, with file extension .sar, once you uncar them, copy the content of lib directory to the agent there TWS4APPS is installed in the <TWA_home>\methods folder.

Example of how to uncar the .sar file:
RFC_7-10009745.SAR
SAPCAR_315-20010450.exe
Place the SAPCAR and the CAR file in the same directory
./SAPCAR_315-20010450.exe -xvf RFC_7-10009745.SAR
Copy the content of lib directory, from the newly created directory tree, to the agent where TWS4APPS is installed, in the <TWA_home>\methods folder.