Query Manager (STRQM)
is the SQL based green screen replacement for Query/400. Manuals can be found here: Query Manager Use and Query Management Programming
Queries can be created via a Query/400 like "prompted mode" or simply by entering SQL directly.
Once a QM query has been defined, the Start Query Management Query (STRQMQRY)
command can be used in CL to run it and includes an OUTPUT
parameter that can be *
(to display), *PRINT
, or *OUTFILE
.
Another Option
The QSHELL Db2 utility
STRQSH CMD('db2 ''select table_name, table_owner from qsys2.systables limit 1''')
Make sure that the environment variable QIBM_QSH_CMD_OUTPUT doesn't exist with a value of NONE
and you'll get a Press ENTER to end terminal session.
message at the bottom of your results.