Query
Query/400 is a basic user oriented database report writer.
It is designed to allow non-technical users to create basic reports and online inquiries in a simple, menu driven way.
It is a tool that is pretty safe to put into the hands of users, so long as we know how to prevent them from creating an *OUTFILE that gets same name as a pre-existing real file in our data base.
See CLP/400 examples of CLP programs that give people access to Query stuff that can go on a Menu, so that they do not have Command Line Access which has some security concerns.
Contents
Query Tips and Techniques
Here are links to "how to" do various things in Query, in which Query is part of the name of the topic, so that other people can use the same name with SQL or RPG or some other 400 tool to get similar results.
- Absolute Value via Query
- CASE in Query
- Query BPCS = a separate "article" page of Query Tips of interest to BPCS users that might not be of interest to the larger 400 community
- Query Date Math
- Query Field Types
- Query Concatenation
- Query Substrings
Query vs. High Level Languages
Query Advantages vs. HLL
On short notice, we generally can get a new query/400 written and into operation faster than a new program, if all we have are native 400 editors.
From Command Line
- RUNQRY *N then name of some file
- this gets us a fast dump of the file contents, without needing a query definition
- use F4 instead of enter ... and we get at selection criteria and other options
HLL Advantages vs. Query
In terms of general 400 perromance, Query cannot hold a candle to High Level Languages like ROG and SQL. Query/400 is a resource hog.
Query is somewhat limited on numbers of files to join and inter-link.