Back to Courses

Query – Creating a Simple Query


5 hours


The Query – Creating a Simple Query course begins by describing how database files are joined, enabling IBM Query for i to more easily reference data. This is followed by the identification of data that will be required by IBM Query for i and the subsequent coding required to extract that information. Details on options used to save the query and print, or display, the resulting report are also covered.


Personnel requiring knowledge about creating reports with the IBM Query for i facility..


Completion of the Datatrain Database Basics and the Need for Query course, or equivalent


After completing this course the student should be able to:

  • Describe the importance of joining files when creating a query
  • Identify the steps used to create a simple query
  • Define output options for print and spool queries
  • Display query reports that reside on spool

Course Content

Joining Files

Handling Multiple Database Files
Linking Related Information
Join Operation Process
Primary and Secondary Files

Database Concepts

Physical and Logical Files
Record Fields
Field Types
Primary Keys

Query Creation Basics

Signing On and Accessing Query/400
Query Utilities Menu
Creating a New Query
Specifying Database Files to be Used
Specifying Report Column Formatting

Output Options and Saving Your Query

Query Output Options
Detailed and Summary Formats
Line Wrapping
Formatting Reports for the Printer and Spool
Cover Page, Headers, and Footers
Saving and Running your Query

Viewing a Query from a Spool File

Invoking the WRKSPLF Command
Work With All Spool Files Screen
Displaying Spool File Content

Query – Creating a Simple Query Mastery Test