Syntax used for search criteria


The Metadata Analyzer can search based on a wide variety of criteria. Refer to the table below for the syntax to enter into the Search Criteria bar, Filter field, etc. for the type of search you want to perform.

To search based on this:

Use this syntax:

An entity's name

name=

An entity's type

type=

A property of an entity (such as length)

<property><operator><value>

For example:

syntaxFORMAT.jpg

For <property>, use the wording shown in the Search view's Property drop-down list or the Property view's Property column.

Valid operators are:

< (less than)

<= (less than or equal to)

= (equal to)

<> (not equal to)

> (greater than)

>= (greater than or equal to)

A related entity's name

relatedentity.name=

A related entity's type

relatedentity.type=


A property of a related entity (such as length)

relatedentity.<property><operator><value>

For example:

syntaxFORMAT.jpg

For <property> use the wording shown in the Search view's Property drop-down list or the Property view's Property column.

Valid operators are:

  • < for less than
  • <= for less than or equal to
  • = for equal to
  • <> for not equal to
  • > for greater than
  • >= for greater than or equal to

relationship=

Valid values are:

  • Action
  • Alias
  • Application defined
  • Contains
  • Foreign key
  • User defined
  • Uses

Direction of a relationship

direction=to

direction=from

For example, to find the programs that have a "related to" relationship, enter:

Type=program,relationship.direction=to

Date-related properties

The date format to use varies by the locale of the machine. To determine the date format to use, follow the format shown in the Properties view. If you use the wrong format, the Metadata Analyzer will not find the entities you are searching for. In the English (United States) locale, the following are examples of valid formats when searching by date:

Jan 30, 2003 2:00:00 PM
 1/30/03 2:00 PM
 1/30/03

learn status =

Valid values are:

  • Pending
  • Not Learnable
  • Complete
  • Failed

You can search on just one criterion or any combination of criteria. These are all valid types of searches:

Name=CUST*
Type=Program
Language=COBOL
Name=CUST*,Type=Program
Name=CUST*,Type=Program,Language=COBOL
Name=CUST*,Language=COBOL
Also, a search can contain multiple <property>

Also, a search can contain multiple <property><operator><value> statements, separated by commas. These statements work together, as in the following example where the search would find entities with a length between 5 and 10:

Length>5,Length<10

Conversely, a search can have statements that are unrelated to each other as in this example:

Language=COBOL,userlabel=CICS

Commas vs. semicolons

Commas and semicolons mean different things within the search criteria syntax.

  • A comma between portions of the syntax means that you want to search for entities that match all of the search criteria.

Therefore, this search

Name=CUST*,Type=DataItem,Length>5,Length<10;

would mean to search for data items that have a name of CUST* and have a length between 5 and 10.

  • A semicolon separates one search from another. It means that you want to search for entities that match any one of the parameter/value pairs.

Therefore, this search

Name=CUST*;Name=ACCT*

would search for entities that have a name of CUST* or a name of ACCT*.

To set up multiple searches

You can enter multiple searches on the Search Criteria bar, just be sure to end each search with a semicolon since this signals the end of a single search's criteria. The following would search for all programs beginning with ACCT* that are either COBOL or Assembler:

Name=ACCT*,Type=Program,Language=COBOL;Name=ACCT*,Type=Program,Language=Assembler

Use the tables below to help set up your search:

To locate entities by partial name . . .

An asterisk can be used anywhere in name

Beginning with a certain character

NUM*

Ending with certain characters

*NUM

Containing certain characters

*NUM* or N*M*

Excluding certain characters

<> *NUM*


To locate entities by relationship . . .

Set the search criteria to . . .

To determine whether includes are actually used in a program

Type=Data Item,Include=name of include,Relationship=Action

To determine where a specific data item is explicitly referenced in a program

Name=Data Item name,Type=Data Item,Relationship=Action


To locate data items . . .

Set the search criteria to type=data item, plus

By character

Picture = X*

By numeric

Picture = *9*

Used (directly referenced) in a program by another data item

Name = dataitemname,Type=Data Item,Related Entity.Type=Data Item

All data items defined in a specific program

Owner = programname

Used in an include (copybook)

Owner = *includename

or
 Include = include name

By layout offset

Offset = offset

(optionally, add:
 Length = physical length of data item)

That are literals

Literal = Yes

That are not literals

Level > 0

That are packed data

Logical length = logical length of data item

or
 Native Data Type = COMP, COMP-3, etc.

That are tables

Occurs = number of occurs

or, to locate all tables:
 Occurs = >0


To locate DDs . . .

Set the search criteria to type=DD, plus:

By job and step

Owner = Jobname.stepname

By job

Owner = Jobname.*

By step

Owner = *.Stepname


To locate steps . . .

Set the search criteria to type=step, plus:

By job

Owner = Jobname


To locate programs . . .

Set the search criteria to type=program, plus:

By language

Language = language
 (for example, COBOL or Assembler)

By dialect

Dialect = language version
 (for example, LE370)

By source library

Source Library = dataset name


To locate transactions . . .

Set the search criteria to type=transaction, plus:

By region

Owner = region ID

By group

CICS Group = group name


To locate queues . . .

Set the search criteria to type=queue, plus:

By type

Queue Type = type
 (for example, temporary storage queue or MQ)


To locate datasets . . .

Set the search criteria to type=dataset, plus:

That are temporary

Temporary = Yes

That are "DUMMY"

Name = DUMMY


 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*