IBM SC41-5210-04 Server User Manual


 
v The states, and the customers listed for each state, should appear alphabetically.
In order to obtain the order you want, your first sort field is credit limit (CRLIMIT), in descending order (from
highest to lowest); your second sort field is state (STATE); your third sort field is last name (LASTNAME); and
your last sort field is first name (INIT).
You would complete the Select Sort Fields display as follows:
Select Sort Fields
Type sort priority (0-999) and A (Ascending) or D (Descending) for the
names of up to 32 fields, press Enter.
Sort
Prty A/D Field Text Len Dec
___ _ ACCTNUMBER Account number 6
40 _ INIT Customer first and middle initial 2
30 _ LASTNAME Customer last name 20
___ _ STREETADDR Street address 20
___ _ CITY City 15
20 _ STATE State abbreviation 2
___ _ ZIPCODE Zip code 5
10 D CRLIMIT Credit limit amount 7 2
Bottom
F3=Exit F5=Report F11=Display names only F12=Cancel
F13=Layout F18=Files F20=Renumber F24=More keys
Notice that a D has been typed in the A/D column for the CRLIMIT field. The STATE, LASTNAME, and INIT
fields will all be sorted in ascending order (which is the order you want).
Also notice that this display shows additional information including the text, length, and decimal positions
for each field. While you are selecting sort fields you can press F11 to alternate between showing only the
names of the fields and showing both the names and additional information about the fields. For more
information about using F11, see Using F11 to display additional information about Query for iSeries
querieson page 15.
After pressing the Enter key, the Select Sort Fields display appears again, but this time the fields given
priority are listed first in the order specified and the fields not used as sort fields are moved to the bottom
of the list:
Chapter 8. Selecting sort fields in Query for iSeries 107