Execute DB2 Query

QMF lets you write, and run DB2 queries without needing complex programming. This topic walks you through the steps of writing and executing a DB2 query in QMF. The SQL query is typed on the Query panel in QMF

Scenario: - Steps to execute the SQL query using QMF.

STEP-1: - Press PF6 or type SHOW QUERY to open the Query Editor from QMF Main menu screen.

QMF Navigation

STEP-2: - Once the query editor screen appears, Press the HOME key to advance your cursor to the first query input position.

STEP-3: - Enter the desired SQL statements in the empty area between SQL QUERY and *** END ***.

Execute Query

STEP-4: - Press TAB to toggle your cursor between the "Command" prompt and the top of the panel.

STEP-5: - When you have finished entering the query, Execute the Query Press PF2.

STEP-6: - Viewing the Results of a Query: The Report Panel Results appear in a tabular format:

Execute Query

STEP-6: - Use PF (Program Function) Keys: PF8 = Scroll down (Next Page), and PF7 = Scroll up (Previous Page).

STEP-7: - Press PF6 = Query to go back to Query editor.

Execute Query

STEP-8: - Press PF3 = Exit (Go back to QMF menu) to navigate back to QMF Main Menu.


Previous Page
undefined