You can check an SAP job's output for specific text strings to determine whether the job is a success or a failure. You specify the text string in the SAPSUCCESSMSG or SAPFAILUREMSG statements in the job definition. For example, suppose when you cancel an SAP job you want it to complete to release its successor job. You can specify the text string 'Job canceled' as a success message in the job definition. When you cancel the job, the agent checks the job's spool file, finds a match for 'Job canceled' and marks the job as complete.
You can also check the output of a step (ABAP) to determine whether the step is a success or failure. You specify the text string in the SUCCESSMSG or FAILUREMSG statements after an ABAPNAME statement in the job definition.
For more flexibility, you can specify regular expressions instead of simple text strings within the success message and failure message statements. For example, you can use a regular expression to search for multiple strings at the same time. To compose a regular expression, follow the rules for Java class java.util.regex.Pattern. You can find these rules using a Google search for java pattern.
Note: To enable regular expression processing, the agent administrator must configure the agent for the following parameter: sap.useRegularExpressions=true.
Examples: Using Regular Expressions
.*TEST.*
.*(not found|started).*
.*Job\scanceled.*
|
Copyright © 2013 CA Technologies.
All rights reserved.
|
|