Default language.

Creating Selection Criteria


This tool is used to create selection criteria for use with Related Extract, specifically when setting selection criteria. Users specify options and conditions for selecting data records or rows for processing, thus creating a subset of data with which to work. These selection criteria are specified using a data definition as a template and can then be stored in a repository for later reuse.

Important

This Selection Criteria is only for use with Related Extract. ComparePro, ConverterPro, and Related Loader have alternative methods for specifying selection criteria.

To create Selection Criteria

  1. Do one of the following:
    1. In Data Explorer, navigate to the desired repository, right-click Selection Criteria, and select New.
    2. From the File menu, select New > Other. The Select a Wizard dialog box appears.
  2. Select BMC > DevX 

     > Selection Criteria and click Next.
    The New Selection Criteria dialog box appears.

  3. In the Name field, enter a name for the selection criteria being created.
  4. Optionally, in the Description field, enter a description for the selection criteria being created.
  5. Optionally, from the Repository list, select a different repository in which to store the selection criteria.
  6. In the Table Name section, either enter a name in the field (in <schema.table> format) or click Browse. The Table selection dialog box appears to allow the user to locate the desired table.
  7. Select one of the following:
    1. Select the Database radio button to create selection criteria that can be used for a 

      Some content is unavailable due to permissions.

      extract specification.
    2. Select the Db2 for z/OS radio button to create selection criteria that can be used for a 

      Some content is unavailable due to permissions.

      extract specification.
  8. To select the host, do either of the following:
    1. In the Host field, select the host connection from the list.
    2. Click Configure to add a new host connection. The Host Connections page of the Preferences dialog box appears. Complete this dialog box according to the instructions in the Host Explorer Connections topic in the Host Explorer User Guide.
  9. If the Db2 for z/OS radio button was selected, from the SSID list, select the DB2 subsystem that contains the desired schema and tables.
  10. In the Schemas box's Name field, enter a schema name and click List. A list of matching schemas appears. Refer to the Filters topic in the Host Explorer User Guide for information about filtering schema names.
  11. From the resulting list, select the appropriate schema, and then use the Tables box to select or search for the desired table. The search is case-sensitive.

    Important

    The Login dialog box appears if you are not yet logged in. For information about this dialog box, refer to the Login Dialog Box topic in the Host Explorer User Guide.

    Important

    Click OK. The selected host and table are added to the Table Name field on the New Selection Criteria dialog box.

  12. Click Finish. The Selection Criteria - Overview tab appears with the above information populated.
  13. Important

    The Owner field shows the owner who is creating the specification. The Created field is the date the specification is being created. These two fields are blank until the specification is saved.

  14. Click the Condition tab. The Selection Criteria - Condition page allows users to build conditions for selecting records. Conditions consist of a field name, condition type, and values. The first condition created is the top-level group condition. While individual conditions can be added to this group condition, there can only be one top-level group condition.
  15. Optionally, add an AND or OR condition to the selection criteria by doing one of the following:
      • To add an AND condition, with All of these conditions must be true appearing in the Field Name field, clickimage2022-11-10_17-29-55.png.
      • To add an OR condition, click All of these conditions must be true and then, from the drop-down list, select One or more of these conditions must be true. Then clickimage2022-11-10_17-29-55.png.
  16. Click <select field> and, from the drop-down list that appears, select a field from the list of fields available for the selected table (for example CompanyName).
  17. Press Tab. The <condition> field appears in the Condition Type column.
  18. Click <condition> and, from the drop-down list, select an operator (for example is equal to). Operators, which vary by field type, include the following:

      • is equal to
      • is not equal to
      • is greater than
      • is less than
      • is greater than or equal to
      • is less than or equal to
      • is null
      • is not null
      • is between
      • is not between
      • is in list
      • is not in list
      • is like
      • is not like
      • Selecting IS NULL does not allow for a valu
      • When using the operator LIKE and looking for a string imbedded in another string, include the wildcard % in the condition statement before and after the operato For example: The condition statement would find JAPAN imbedded in another string.
  19. Press Tab. If, based on the operator selected, one or more values are needed to complete the condition, <enter values> appears. Otherwise, a SQL statement is generated (for example CompanyName = "BMC") and is added to the SQL box at the bottom of the wizard page.
  20. If <enter values> appears, click <enter values>, then click image2022-11-10_17-31-8.png. A popup appropriate to the value type appears. Enter in the field(s) the appropriate value(s) to complete the condition (for example BMC), then click OK. A SQL statement is generated (for example CompanyName = "BMC") and is added to the SQL box at the bottom of the wizard page.

    Important

    The SQL statement cannot be directly edited.

    Important

    The Case sensitivity drop-down list allows the user to specify whether to use the default case-sensitivity defined in the database or to ignore case.

  21. Repeat the process for any additional conditions by doing any of the following:

      • Select the first condition you created and clickimage2022-11-10_17-29-55.pngto begin adding another condition. A new condition line appears.
      • Select the first condition you created and clickimage2022-11-10_17-30-16.pngto begin adding a new group condition below the selected condition. A new condition line appears.
      • Select a condition and click image2022-11-10_17-29-11.png to indent the condition, making it a subgroup of the item above it. A group condition can only be indented under another group condition. Only the last item in a group condition can be indented or outdented.
      • Select a condition and click image2022-11-10_17-28-50.png to move the condition out from under another group condition. Only the last item in a group condition can be indented or outdented. OutdentArrow.jpg cannot be used to move a group condition to the root position.
      • Select a condition and click image2022-11-10_17-28-34.png to move the condition up one row. If a group condition is selected, its child conditions will be moved with it. A group condition will be removed if its only condition is moved. Conditions cannot be moved above the top-level group condition.
      • Select a condition and click image2022-11-10_17-28-16.png to move the condition down one row. If a group condition is selected, its child conditions will be moved with it. A group condition will be removed if its only condition is moved. Conditions cannot be moved above the top-level group condition.
      • Select a condition and clickimage2022-11-10_17-27-48.pngto delete the condition.

    Important

    Alternatively, conditions and group conditions can be dragged and dropped into new positions.

  22. When all conditions have been entered and positioned correctly, click image2022-11-10_17-27-23.png to validate the information entered and save it to the repository.
  23. For a

    Some content is unavailable due to permissions.

    selection criteria only, select the Options tab. The Options Page appears. This page is used to specify the options for selecting records or rows from the entire source file or table: where to begin, how to continue, and when to stop.
  24. Under Starting record (row), select one of the following to indicate where to begin selection processing:
      • Select First to begin processing with the first record in the table or file. This is the default.
      • Select Record number and enter the record number to begin processing at a specific record in the table or file. This option is only applicable to non-keyed files or tables.
  25. Under From the specified starting record (row), select one of the following to indicate the intervals in which records should continue to be selected:
      • Select Select every record (row) to select every record or row in the source file or table. This is the default.
      • Select Select every <value> to select records at regular intervals, such as every 10th record. Enter the value in the field. Valid values are any number from 0 through 2,147,483,647. Selection criteria are applied after the record has been retrieved.
      • Select Select every <value> then skip every <value> to select records at regular intervals but skip others (for example, entering 2 and 12 selects two records and then skips 12 records). Enter the values in the fields. Valid values are 0 through 2,147,483,647. Selection criteria are applied after the record has been retrieved.
  26. Select or clear the Limit number of records to search check box to indicate whether to stop searching records. When searching large files, limiting the search can help prevent excessive I/O processing. If the check box is selected, enter in the field a number indicating the maximum number of records that match the specified conditions for the wizard to search. For example, entering 1000 would result in a search of the first 1000 records that match the specified conditions, while entering 0 (zero) would result in all records that match the specified conditions being searched. Valid values 0 through 2,147,483,647.
  27. Select or clear the Limit number of records to select check box to indicate whether to stop selecting records. When searching large files, limiting the selection can help prevent excessive I/O processing. If the check box is selected, enter in the field a number indicating the maximum number of records that match the specified conditions for the wizard to select. For example, entering 1000 would result in the selection of the first 1000 records that match the specified conditions, while entering 0 (zero) would result in all records that match the specified conditions being selected. Valid values are 0 through 2,147,483,647.
  28. Click image2022-11-10_17-27-11.png to validate the information entered and save it to the repository. If information is missing, a popup dialog box appears showing any error messages.

Important

A copy of a specification can be saved to the same or a different repository.


Important

The Selection Criteria pages need not be completed sequentially; users can navigate back and forth between them as needed. Further, image2022-11-10_17-27-0.png can be clicked on any page to validate the information entered up to that point.

 

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