Configuring Java batch to collect execution data

The owner of the Java™ batch job must be authorized to the BPX.SMF profile of the FACILITY class to write System Management Facility (SMF) records. You can enable the SMF recording feature to collect execution data by setting a property.

About this task

Authorize the user who is executing the Java batch job to be able to write SMF records.

Procedure

  1. Ensure that the user who runs the Java batch job is authorized to the BPX.SMF profile of the FACILITY class. Use the following commands:
    PERMIT BPX.SMF CLASS(FACILITY) ID(<JAVABATCHID>)ACCESS(READ)
    SETROPTS RACLIST(FACILITY) REFRESH
  2. Set the following property in the ++HBRWORKDS++.SHBRPARM(HBRBATCH) member of the Java batch job that requires the SMF execution data:
    HBRSMFST100=YES
  3. Optional: Set the HBRSMFST100EMPTY property to YES if you want to write an empty record when there have been no rule executions during the interval. This property is set to NO by default.
  4. Run the Java batch configuration JCL to regenerate the ra.xml configuration file. Submit ++HBRWORKDS++(HBRCJCFG).
  5. Ensure that the JVM that starts the Java batch workload has the system property set hbr.javabatch="true". This system property set can be passed in via the Java command line by using the following technique:
    -Dhbr.javabatch="true"

Results

SMF type 120 subtype 100 records is now written by the Java batch workload. The following fields are set when the workload is a Java batch:
  • SMF120XUL contains the first 16 characters of the main class name which Java is executing. For example, running the class com.ibm.rules.hbr.samples.miniloan.MiniLoanDemo results in the value MiniLoanDemo being shown in SMF120XUL.
  • SMF120XUT contains the string Embedded Rule Execution Server.