The RUNQRY command allows you to run a pre-defined Query, or simply display all records in a file if no query is specified and a file is specified.
See also Query.