Query/400 Tutorial: Record Selection, Report Layout and Output Files
Query/400, associated with IBM Query for i, supports defining and running queries over database files in its established interface. Follow source selection through conditions, calculated values and report formatting, then decide whether output is displayed, printed or written to a database file.
Here's a popular Query/400 video — watch it, then summarize it with one click. Or paste any other YouTube link below.
— or paste your own YouTube link —
Want to keep the key points from a YouTube video? Paste the link below to turn it into structured notes.
Why Use Query/400 Tutorial: Record Selection, Report Layout and Output Files
- Select IBM i source files and fields
- Define query record selection rules
- Choose sort and break structure
- Configure report display and output
- Reuse stored query definitions deliberately
Frequently Asked Questions
Is a saved Query/400 definition a copy of the source records?
A definition records the query choices rather than automatically duplicating every input record. Running it obtains data according to the selected sources and output configuration at that execution time.
Why distinguish a library from a source file name?
IBM i object resolution depends on the relevant library context and naming rules. Explicit source identification helps avoid running a familiar query against an equally named object in a different library.
What does record selection determine?
Selection conditions define which source records qualify for the query before its configured presentation and summaries. A report layout that looks correct can still represent the wrong population if those conditions are incomplete.
How can sort order support a report break?
Grouped report presentation depends on the defined ordering and break choices. Check them together so subtotals and repeated headings correspond to the intended grouping rather than merely the visible field arrangement.
Does Query/400 use the same authoring workflow as an SQL editor?
Query/400 provides its own definition and reporting interface on IBM i. Relational ideas overlap, but an SQL statement and a saved query object are not universally interchangeable artifacts or execution instructions.