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’)

 

BALDUE

RANGE

900 1000

AND

STATE

EQ

’RI’

AND

YEAR

LIST

86 87

____

______________

_____

______________________________

____

______________

_____

______________________________

 

 

 

Bottom

Written out, the example would look like this:

(BALDUE RANGE 900,1000 AND STATE EQ ’RI’ AND YEAR LIST 86,87)

Note: CCSIDs can affect how records are selected. See “CCSID and record selection tests in Query for iSeries” on page 253 for information on CCSIDs and how they affect record selections.

Adding and removing comparisons in Query for iSeries

The prompt part of the Select Records display only has room to show six comparisons at a time. You can press the Page Down key to get blank input lines after the last line you typed. When you have specified more than six comparisons, you can press the Page Up key to see the previous ones.

If you want to add another comparison between two comparisons that you have already typed, you can press F9 to insert a blank line where you need it so that you do not have to retype everything. The new line is added after the line on which the cursor is positioned when you press F9. You can also press F9 instead of the Page Down key to add lines as you type in comparisons.

If you change your mind about a comparison and want to remove it from the group, just use the spacebar or Field Exit to blank it out. If you change your mind and want to remove all of your comparisons, press F12 (Cancel). Anything that you entered on the Select Records display is then ignored.

If you have blanked out a line or two and are at the last available blank line and need more lines, you can press F20 to reorganize the space. Query moves the blank lines to the end of the comparisons. You see the first six comparison lines on your display and must press the Page Down key to get to the blank lines or to the place where you want to insert a line. If you run out of space but have no blank lines to move, you have to redesign your comparisons so that they fit into the 100-line limit.

Chapter 7. Selecting records in Query for iSeries 103

Page 115
Image 115
IBM SC41-5210-04 manual Adding and removing comparisons in Query for iSeries, Year List