Previous Topic: ObjectsNext Topic: Combining Conditions


Conditions

You can use condition statements to qualify selections. The following formats are used:

ATTRIBUTE  OPERATOR  VALUE

and

OBJECT  RELATION  SELECTION

The following examples illustrate some of the most common conditions of the ATTRIBUTE-OPERATOR-VALUE type, using a variety of attributes. The implied object in all cases is FILE. See Keywords in this chapter for the list of EDL operators. Examples using the attribute FILE_NAME follow:

Objects

Examples

All Files with Name

To select all the files with the name "MYFILE.EXT," enter the following:

FILE_NAME = "MYFILE.EXT"

All Files with .XLS Extension

To select all the files with the extension .XLS, enter the following:

FILE_EXTENSION = “XLS”

All Files with .DOC or .WP Extension

To select all the files with the extension .DOC or .WP, enter the following:

FILE_EXTENSION = “DOC” or FILE_EXTENSION  = “WP” "

All Files Ending in R1 and .DT Extension

To select all the file names ending in "R1" and the extension .DT, enter the following:

FILE_NAME ~ "*R1.DT"

All Files Where Name Contains WIN

To select all the files with a name containing "WIN" (WIN.COM, WINWORD.EXE, and so on), enter the following:

FILE_NAME ~  “*WIN*”

All Files with .R Extension

To select all of the files with the extension .R? (? can be any character), enter the following:

FILE_NAME ~ "*.R?"

All Files, Except .MDB Extension

To select all the files except those with the extension .MDB, enter the following:

NOT FILE_EXTENSION = “MDB”

The following lists examples using the attribute TSM_NODE_NAME:

Objects

Examples

TSM Node with Name MYNODE

To select the TSM node with the name "MYNODE," enter the following:

TSM_NODE_NAME = "MYNODE"

TSM Nodes with Names Starting MIS

To select all the TSM nodes with names starting with MIS, enter the following:

TSM_NODE_NAME ~ "MIS*"

TSM Nodes with Names Starting MIS and ACC

To select all the TSM nodes with names starting with MIS and with ACC, enter the following:

TSM_NODE_NAME ~ "MIS*" OR TSM_NODE_NAME ~ "ACC*"

TSM Nodes with Names Ending R1

To select all the TSM nodes with names ending in "R1," enter the following:

TSM_NODE_NAME ~ "*R1"

TSM Nodes with Name Containing WIN

To select all the TSM nodes with a name containing "WIN," enter the following:

TSM_NODE_NAME ~ "*WIN*"

TSM Nodes with Name Starting A and Ending R

To select all of the TSM nodes with names starting with A and ending in R, enter the following:

TSM_Node_Name ~ "A*R"

TSM Nodes Except Names Starting AIX

To select all the TSM nodes except those whose names start with AIX, enter the following:

NOT (TSM_NODE_NAME ~ "AIX*")

In the following examples we replace FILE_NAME with USER_NAME. This is a valid substitution because a relationship exists between files and users. Although USER_NAME is not a file attribute, based on the OWNED_BY relationship between files and users, EDL interprets these statements to mean, "files owned by users whose name is..." The following examples contain the full EDL statement showing both object and condition. They use the attribute USER_NAME:

Objects

Examples

All Files Belonging to User BSMITH

To select all the files that belong to the user BSMITH, enter the following:

FILE WHERE FILE_OWNER_NAME = "BSMITH"

All Files Belonging to Users Beginning ADMIN

To select all the files that belong to users whose names begin with "ADMIN," enter the following:

FILE WHERE FILE_OWNER_NAME ~ "ADMIN*"

All Files Belonging to User in List

To select all the files that belong to one of the users in the list, enter the following:

FILE WHERE FILE_OWNER_NAME IN ["JPOST","BMAC","VHALL"]

In the following examples we replace TSM_NODE_NAME with TSM_SERVER_NAME. This is a valid substitution because a relationship exists between TSM nodes and servers. Although TSM_SERVER_NAME is not a node attribute, based on the IS_REGISTERED_ON relationship between TSM nodes and servers, EDL interprets these statements to mean, "TSM nodes registered on the TSM servers ..." For clarity, the following examples contain the full EDL statement, showing both object and condition. They use the attribute TSM_SERVER_NAME:

Objects

Examples

Nodes Belonging to TSM Server ATALANTA

To select all the nodes that belong to the TSM server ATLANTA, enter the following:

TSM_NODE WHERE TSM_SERVER_NAME = "ATLANTA"

Nodes Belonging to TSM Servers and Names Beginning AIX

To select all the nodes that belong to TSM servers the names of which begin with AIX, enter the following:

TSM_NODE WHERE TSM_SERVER_NAME ~ "AIX*"

Nodes Belonging to TSM Server in List

To select all the nodes that belong to one of the TSM servers in the list, enter the following:

TSM_NODE WHERE TSM_SERVER_NAME IN ["JPOST","BMAC","VHALL"]

The following list shows examples using the attribute FILE_SIZE:

Objects

Examples

Files Larger Than 10 MB

To select all the files larger than 10 MB, enter the following:

FILE_SIZE > 10 MB

Files Larger than 1 MB and Smaller than 2 MB

To select all the files larger than 1 MB but smaller than 2 MB, enter the following:

FILE_SIZE > 1 MB AND FILE_SIZE < 2 MB

Files Larger Than or Equal to 1 MB

To select all the files larger than or equal to 1 MB, enter the following:

FILE_SIZE >= 1 MB

Files More Than 10 Percent of Volume

To select all the files that are bigger than 10 percent of the volume on which they reside, enter the following:

FILE_SIZE > (0.1 * VOLUME_SIZE)

The following list shows examples using the attribute VOLUME_SIZE:

Objects

Examples

Volumes Larger Than 10 GB

To select all the volumes larger than 10 GB, enter the following:

VOLUME_SIZE > 10 GB

Volumes Larger 1 GB and Smaller 2 GB

To select all the volumes larger than 1 GB but smaller than 2 GB, enter the following:

VOLUME_SIZE > 1 GB AND VOLUME_SIZE < 2 GB

Volumes Larger Than or Equal to 1 GB

To select all the volumes larger than or equal to 1 GB, enter the following:

VOLUME_SIZE >= 1 GB

Volumes More Than 10 Percent of Computer

To select all the volumes that constitute more than 10 percent of the size of the computer on which they reside, enter the following:

VOLUME_SIZE > (0.1 * COMPUTER_SIZE)

The following list shows examples using date attributes (supported date formats are: MM/DD/YY; MM/DD/YYYY; MMM DD,YY; MMM DD,YYYY):

Objects

Examples

Files Created Before 29 February 2003

To select all the files created before 29 February 2003, enter the following:

FILE_CREATION_DATE < 2/29/2003

Files Accessed on or After 29 February 2003

To select all the files accessed on or after 2/29/2003, enter the following:

FILE_LAST_ACCESS_DATE >= 2/29/2003

Files Modified Today

To select all the files that were modified today, enter the following:

FILE_LAST_MODIFIED_DATE = TODAY

Files Modified Previous Two Weeks

To select all the files that were modified in the previous two weeks, enter the following:

FILE_LAST_MODIFIED_DATE > TODAY - 2 WEEKS

Files Modified Previous 12 Hours

To select all the files that were modified in the previous 12 hours, enter the following:

FILE_LAST_MODIFIED_DATE >= NOW - 12 HOURS

Files Created Previous Year

To select all the files created in the previous year, enter the following:

FILE_CREATION_DATE >= TODAY - 365 DAYS

Nodes Accessed Before 29 February 2003

To select all the nodes last accessed before 29 February 2003, enter the following:

TSM_NODE_LAST_ACCESS_TIME < 2/29/2003

Nodes Accessed on or After 29 February 2003

To select all the nodes last accessed on or after 29 February 2003, enter the following:

TSM_NODE_LAST_ACCESS_TIME >= 2/29/2003

Sessions Started Today

To select all the sessions started in the past 24 hours, enter the following:

TSM_SESSION_START_TIME = NOW - 24 HOURS

Sessions Started Previous Two Weeks

To select all the sessions that were started in the previous two weeks, enter the following:

TSM_SESSION_START_TIME > TODAY - 2 WEEKS

The following examples illustrate the syntax of conditions of the type
OBJECT-RELATION-SELECTION:

Objects

Examples

Files Belonging to BSMITH

To select all the files that belong to the user "BSMITH," enter the following:

FILE IS_OWNED_BY USER "BSMITH"

Files in SYS Directory

To select all the files in the SYS directory on all computers, enter the following:

FILE IS_IN DIRECTORY "\\*\SYS\*.*"

Sessions Belonging to TSM Server ATLANTA

To select all the sessions that belong to the TSM server ATLANTA, enter the following:

TSM_SESSION BELONGS_TO TSM_SERVER “ATLANTA”

TSM Users Defined on ASDM Nodes Started on UNIX

To select all the TSM users that are defined on the ASDM nodes starting with UNIX on all servers, enter the following:

TSM_USER IS_DEFINED_ON TSM_NODE "//*/UNIX/"