vAmount

After you create and save the query, you run it as it exists and then change the query and run it again.

Query for iSeries query exercise: Creating a query

In this exercise, you create a query that lists on your display all the information in the file NAMEADDR in the order the information exists in the file.

This exercise asks you to save the query you create in a library. You will probably want to use your own library. If you do not have a library or do not know how to create one, see the person responsible for libraries on your system.

1.Go to the Work with Queries display by typing WRKQRY on any command line.

2.On the Work with Queries display type a 1 (Create) for the Option prompt, xxxQRY for the Query prompt (using your initials instead of xxx), and the name of your library for the Library prompt.

Work with Queries

Type choices, press Enter.

Option

1

Query

KJOQRY

Library

YOURLIB

1=Create, 2=Change, 3=Copy, 4=Delete 5=Display, 6=Print definition 8=Run in batch, 9=Run

Name, F4 for list

Name, *LIBL, F4 for list

F3=Exit

F4=Prompt

F5=Refresh

F12=Cancel

3. Press the Enter key. The Define the Query display is shown.

 

Define the Query

 

Query . . . . . . :

KJOQRY

Option . . . . . :

CREATE

Library . . . . . :

YOURLIB

CCSID . . . . . . :

37

Type options, press Enter. Press F21 to select all. 1=Select

Opt Query Definition Option

1Specify file selections

_ Define result fields

_ Select and sequence fields

_ Select records

_ Select sort fields

_ Select collating sequence

_ Specify report column formatting

_ Select report summary functions

_ Define report breaks

_ Select output type and output form

_ Specify processing options

F3=Exit

F5=Report

F12=Cancel

F13=Layout

F18=Files

F21=Select all

Appendix B. Practice exercise for Query for iSeries query 207

Page 219
Image 219
IBM SC41-5210-04 manual Query for iSeries query exercise Creating a query, Kjoqry, Yourlib