You can specify one, several, or all of the options shown. To select all of them, press F21.

Moving through the Query for iSeries definition displays

For each option you select, Query shows you the definition displays for that step. (The words shown for each option on the Define the Query display match the title of the first display shown for that definition step.) After you specify your definition values on a display, press the Enter key to have them included in the query definition and to go to the next display in the sequence. Whenever you need to go backward in the sequence, press F10 (Process/previous) to keep what you have entered on a display and then show the previous display, or press F12 (Cancel) to ignore what you have entered on a display and then show the previous display.

After you go forward through all of the options that you need, press the Enter key to return to the Define the Query display. Then, you can select more options, change your selections, or end the definition of this query.

When you return to the Query for iSeries Define the Query display

When you return to this display, Query displays a > symbol beside all those definition steps that currently have definition values that are different from the system-supplied (default) values. This is also true if you are changing or displaying an existing definition.

Also, if you are creating or changing a definition, a message is shown to remind you to press F3 (Exit) to save the query changes and/or run the query at this time. When you press F3, the Exit this Query display is shown so you can specify both choices. (If you want to look at or change more definition steps first, you can type a 1 next to each option as before, and press the Enter key.)

If there are any definition errors in the options you used, they are highlighted in reverse image when you return to this display; you should correct the errors before you use the Exit key.

Considerations for creating Query for iSeries queries

The following are reminders, tips, and techniques for creating queries.

Selecting files, records, and fields for Query for iSeries

Query can use files created using IDDU, DDS, or the DB2 UDB for iSeries program. For a description of file organization, see the IDDU Use book.

When you create a query, if you do not select and sequence the fields to be reported by the query, Query selects the following:

vFor reports, the first 500 of the following:

Fields chosen as sort fields on the Select Sort Fields display, in the sequence they appear on that display

Result fields in the order they are defined on the Define Result Fields display

Fields that can be used by Query in the record format(s), in the sequence they appear in the record format(s) (those in the first file selection, followed by those from the second, and so on)

vFor database output:

All data in the record format

Result fields defined on the Define Result Fields display

For database output, maximum record length is limited to 32 766 bytes (32 740 bytes if variable-length or null-capable fields are part of the record). In some cases, the maximum record length will be less than these limits.

30Query for iSeries Use V5R2

Page 42
Image 42
IBM SC41-5210-04 manual Moving through the Query for iSeries definition displays