Previous Topic: FILESYSTEM Statement—Verify File Space Required to Start a JobNext Topic: FILTER Statement—Specify a Filter Using Regular Expression Logic (SNMP Jobs)


FILTER Statement—Specify a Filter Using Regular Expression Logic (Application Services/Web Service Jobs)

The FILTER statement specifies a regular expression to use as a filter in a job.

Supported Job Types

This statement is optional for the following job types:

Syntax

This statement has the following format:

FILTER filter
filter

Specifies a regular expression to use as a filter. In a JMS Subscribe job, the filter is used to filter messages from the topic or queue. In a JMX-MBean Attribute or Operation job, the filter is used to check against the job's output. If the output matches the success pattern, the job completes; otherwise, it fails. In an HTTP job, the filter is used to filter the output of the invoked servlet. In a Web Service job, the filter is used to determine if the return value is successful.

Limits: Up to 1024 characters; case-sensitive

Example: <StockQuotes><Stock><Symbol>CA.*

Notes:

Example: Monitor a Queue on a WebLogic Application Server for a Message Matching Filter Criteria

This example continuously monitors the queue named Queue (residing on WebLogic) for messages matching the filter criteria. The consumed messages from the queue are stored in the file /export/home/user1/outputfile1. The service provider's URL is t3://172.24.0.0:7001, where 172.24.0.0 is the IP address of the WebLogic Application server and 7001 is the ORB port.

AGENT APPAGENT
INITIAL_CONTEXT weblogic.jndi.WLInitialContextFactory
LOCATION t3://172.24.0.0:7001
CONNECTION_FACTORY ConnectionFactory
DESTNAME Queue CONTINUOUS(a13)
FILTER abc\s...\s[a-zA-Z]+\sFilter![\sa-z0-9]+
TOPIC N
DESTINATION /export/home/user1/outputfile1
JNDIUSER cyberuser

In this example, the regular expression used as the filter criteria can be defined as follows:

abc\s...\s[a-zA-Z]+\sFilter![\sa-z0-9]+
abc\s

Specifies the text abc, followed by white space.

...\s

Specifies any three characters, followed by white space.

[a-zA-Z]+\s

Specifies at least one letter, followed by white space.

Filter![\sa-z0-9]+

Specifies the text Filter!, followed by at least one of the following: white space or digit or lower case letter.

Example: abc vvv B Filter! 95