Previous Topic: Step 2: Choose a Table to ReadNext Topic: Step 4: Define Data Selection Conditions


Step 3: Narrow the Search

DQH60

  =>   Press <PF4> if you do not wish to specify further selection conditions  --------------------------------------------------------------------------DQH60  DATAQUERY: SELECTION CRITERIA: DESIGNATE COLUMNS QUERY NAME: USER-SAMPLE  -------------------------------------------------------------------------------  Specify columns that will be evaluated for row selection by placing  any character next to the desired names.  -------------------------------------------------------------------------------  SELECT| KEY(*) AND COLUMN NAMES |             DESCRIPTION  -------------------------------------------------------------------------------        | CAI-DETAIL-TBL                     |    _   | * ITM-ID-KEY                       | DETAILS ITEM-ID SECONDAY KEY    _   | * ITM-ID                           |    _   | * ITMID-ORDID-KEY                  | ITMID & ORDID SECONDARY KEY    _   | * ITM-ID                           |    _   | * ORDID-ITMID-KEY                  | DETAIL ORDID & ITMID KEY    _   | * ORD-ID                           |    _   | * ORDID-KEY                        | ORDER ID KEY    _   | * ORD-ID                           |    _   |   CUST-ID                          |    _   |   SHIP-QTY                         |  -------------------------------------------------------------------------------  <PF1> HELP          <PF2> RETURN        <PF3> NOT USED <PF4> CONTINUE  <PF5> EXTEND COLUMN <PF6> DISPLAY QUERY <PF7> BACKWARD <PF8> FORWARD

Purpose

The optional SELECTION CRITERIA: DESIGNATE COLUMNS panel allows you to narrow the search for data. You can select up to 15 columns that contain data you can search for specifically, by stating that you want to see a range of data, an exact match, and so forth. You use this panel to tell CA Dataquery to read only rows that contain data you specify. For instance, you can indicate that you only want rows that contain specific values in a particular column, like CITY = DALLAS.

Concepts

These are the major concepts related to this panel:

Selection Criteria
It is a good idea to limit the search for data as much as possible, especially with large tables. You can conserve system resources that way. You can also make your reports very specific.

Selection Criteria Key/Column
You should have some idea about what kind of data is found in the keys or columns you select. You can use the CA Dataquery online aid PF keys to get CA Datacom Datadictionary information about the keys/columns. To know what kind of data you are likely to find, obtain a report from your CA Dataquery Administrator or create a simple query that lists the data in the columns you want to know about. Your CA Dataquery Administrator can also help you when you need to know more about the structure of a key or column. It is always better to use a key than a column, where possible, to speed query processing.

Panel Operation

On this panel, you use the Tab key to move the cursor from one blank field to another. Locate the cursor next to the column you want to select and enter a character. Press <PF4> CONTINUE (or Enter) to display the next panel.

Completed Example

The following completed panel shows a completed SELECTION CRITERIA: DESIGNATE COLUMNS panel for the sample report.

 =>   Press <PF4> if you do not wish to specify further selection conditions  --------------------------------------------------------------------------DQH60  DATAQUERY: SELECTION CRITERIA: DESIGNATE COLUMNS QUERY NAME: USER-SAMPLE  -------------------------------------------------------------------------------  Specify columns that will be evaluated for row selection by placing  any character next to the desired names.  -------------------------------------------------------------------------------  SELECT| KEY(*) AND COLUMN NAMES |             DESCRIPTION  -------------------------------------------------------------------------------        | CAI-DETAIL-TBL                     |    _   | * ITM-ID-KEY                       | DETAILS ITEM-ID SECONDAY KEY    _   | * ITM-ID                           |    _   | * ITMID-ORDID-KEY                  | ITMID & ORDID SECONDARY KEY    _   | * ITM-ID                           |    _   | * ORDID-ITMID-KEY                  | DETAIL ORDID & ITMID KEY    _   | * ORD-ID                           |    _   |   CUST-ID                          |    X   |   SHIP-QTY                         |  -------------------------------------------------------------------------------  <PF1> HELP          <PF2> RETURN        <PF3> NOT USED <PF4> CONTINUE  <PF5> EXTEND COLUMN <PF6> DISPLAY QUERY <PF7> BACKWARD <PF8> FORWARD

This chart explains each entry/selection.

Field or Item

Sample Entry

Reason

SHIP-QTY

X

The query should search the rows for orders that have been shipped. If this column contains a zero, no orders have been shipped to this customer. The marketing material is to go only to active customers.

Options

You could select up to 15 columns to narrow the search for qualifying rows. This example, with completion of the next step, limits the search to rows with a ship quantity greater than zero. The search could be more complex by selecting multiple columns here and further qualifying the search in the next step.

To Go to the Next Step

Pressing <PF4> CONTINUE (or Enter) displays the next panel, SELECTION CRITERIA: DEFINE CONDITION. That panel defines the condition to search for in the column named SHIP-QTY.