What Is the DMQUERY Utility?

The DMQUERY utility is a Query Processor command-line diagnostic tool you use to perform administrative operations such as opening and closing databases, and managing transactions. You can also use the SELECT, INSERT, UPDATE, or DELETE statements.

Query Processor transactions are started implicitly. If you have modified the database without ending the transaction, you must explicitly commit or roll back the transaction before terminating your DMQUERY utility session.

The DMQUERY utility has a DO file capability to process commands and SQL statements saved in a file. You can set the DEST option to cause output to be routed to a printer file or disk file rather than the remote file.

You can use the DEFINE command to define an identifier (with optional parameters) to be commands or SQL statements and use that identifier to invoke the command.

Using SQL Statements

You must open the database using the OPEN command. You can then use any of the following Query Processor statements:

  • SELECT

  • INSERT

  • UPDATE

  • DELETE