Comparison fields in query for iseries – IBM ISERIES SC41-5210-04 User Manual

Page 104

Advertising
background image

Select Records

Type comparisons, press Enter. Specify OR to start each new group.

Tests: EQ, NE, LE, GE, LT, GT, RANGE, LIST, LIKE, IS, ISNOT...

AND/OR Field

Test

Value (Field, Number, or ’Characters’)

______________

_____ ______________________________

____

______________

_____ ______________________________

____

______________

_____ ______________________________

____

______________

_____ ______________________________

____

______________

_____ ______________________________

____

______________

_____ ______________________________

Bottom

________________________________________________________________________

Field

Field

Field

Field

ACCTNUMBER

STREETADDR

CRLIMIT

YEAR

COMPANY

CITY

BALDUE

MONTH

FIRSTNAME

STATE

PASTDUE

MIDDLEINIT

ZIPCODE

DATEPAID

LASTNAME

TELENUMBER

CURRENTDAT

Bottom

F3=Exit

F5=Report

F9=Insert

F11=Display text

F12=Cancel

F13=Layout

F20=Reorganize

F24=More keys

Note: The value is not limited to the length of the line on the input display. If you need more space,

continue on to the next line. You must separate all values with blanks. If one value ends at the end
of the line and you continue on to the next line, you must include a blank space before the value on
the next line. You can split DBCS character constants by placing a DBCS shift-in character in the
last position of the first line and a DBCS shift-out character in the first position of the next line.

A comparison has all of the following:
v A field to be compared
v A test
v One or more values to compare the field with

You can specify up to a maximum of 100 comparisons. Each comparison can use as many lines (up to 30
characters per line) as needed, up to a maximum of 100 lines total for all comparisons.

The Select Records display provides six input lines at a time for you to enter comparisons. If you need
more than this, press the Page Down key to get more blank input lines. If the cursor is positioned on any
of the input lines (whether you have typed a comparison on it or not), you can use the page keys to view
all of the comparisons that you have entered.

Comparison fields in Query for iSeries

In order to be tested, the field must be one of the following:
v A field that exists in your selected file(s). This can be any field, including a field that you have not

chosen to include in your output.

v A result field defined for this query.

When you specify a field in a comparison, you must put the file identifier followed by a period in front of
any field name that appears in more than one selected file in the list. For example, if the field

ACCTNUMBER

exists in two of your selected files that have file IDs

T01 and T02, you would have to specify

T01.ACCTNUMBER or T02.ACCTNUMBER. If you did not include the file identifier, Query would not know from
which file to get the account number needed for the comparison test. You can press F18 (Files) to see a
list of the files that you selected and the file ID associated with each file.

92

Query for iSeries Use V5R2

Advertising