Running a Query for iSeries query

Running a query consists of telling Query for iSeries to use the query definition to acquire the data you want from selected files, to organize the data into a report format, and then to either display the report, print it, or store it in a database file.

To run a query, you can:

vPress F5 (Report) while creating, displaying, or changing your query. This runs the query and displays the report.

vChoose option 2 (Run an existing query) on the Query menu.

vType a 1 (Run interactively) or a 2 (Run in batch) in the Run option prompt on the Exit This Query display.

vType an 8 (Run in batch) or a 9 (Run) in the Option prompt on the Work with Queries display.

vUse the Run Query (RUNQRY) command.

Using function key F5 when running a Query for iSeries query

If dependent values are not used in record selection tests, you can run a query at any time by pressing F5 (Report) while you are creating, changing, or displaying it. Your query runs immediately, the report is displayed, and you can see what the report looks like and how any changes you make affect it.

Running a Query for iSeries query from the Query for iSeries menu

You can run an existing query by selecting option 2 (Run an existing query) on the Query menu. This causes the RUNQRY (Run Query) command help display to appear. For more information on using the RUNQRY command, see the CL Reference information in the iSeries Information Center and “Running a Query for iSeries query using the RUNQRY command” on page 171 of this book.

Running a Query for iSeries query from the Exit This Query display

When you finish creating or changing a query, the Exit This Query display is shown.

 

 

Exit This Query

Type choices, press Enter.

 

 

Save definition . . .

Y

Y=Yes, N=No

Run option

1

1=Run interactively

 

 

 

2=Run in batch

 

 

 

3=Do not run

For a saved definition:

 

 

Query

__________

Name

Library

QGPL

Name, F4 for list

Text

. . . . . . .

_______________________________________

Authority

*LIBCRTAUT

*LIBCRTAUT, *CHANGE, *ALL

 

 

 

*EXCLUDE, *USE

 

 

 

authorization list name

F4=Prompt

F5=Report

F12=Cancel

F13=Layout

F14=Define the query

 

 

Query assumes that you want to save your query, so it usually supplies a Y (Yes) in response to the Save definition prompt. Run option is a profile option, and whatever you selected the last time you exited a

query is the default until you select a different value. However, Query supplies a 3 (Do not run) for the Run option prompt when your query has an error.

Chapter 15. Exiting and running a Query for iSeries query 169

Page 181
Image 181
IBM SC41-5210-04 manual Running a Query for iSeries query, Libcrtaut