SQL queries

QMF for TSO and CICS®, QMF for Workstation, and QMF for WebSphere® provide ways for experienced users to issue SQL statements directly to the database.

If you do not know the exact syntax of the SQL statement you need or you just want to save time, you can have QMF for TSO and CICS as well as QMF for Workstation draw a sample SELECT, INSERT, or UPDATE query for the table you are working with, and then change this sample query as necessary.

QMF for Workstation offers additional help in creating syntactically correct SQL queries with a colorized SQL editor that includes Content Assist and Parameter Hint features. The Content Assist feature supplies lists of all the elements (such as keywords, separators, clauses, current table and column names, and other elements) that can occur in a specific place in your SQL statement based on what you have already specified. The Parameter Hint feature supplies information about the parameters required by the current function in your SQL statement.

SQL queries can include multiple SQL statements, allowing you to accomplish many different database tasks with a single query. The text of the query is limited only by the length of SQL statement that the database to which the query is directed is capable of running. In the TSO and CICS environments, CALL and CREATE PROCEDURE statements must be used alone in a SQL query.