Your applications can run queries that contain variables. You can run these queries from an application that uses ISPF services in one of three ways:
With this technique, you represent the query by an ISPF file tailoring skeleton. In that skeleton, the portions of the query that can change appear as ISPF dialog variables. After giving these variables the proper values, your program starts certain ISPF file-tailoring services. The result is a sequential file containing the query.
The program can then import the query into QMF temporary storage and have QMF run it. The requisite IMPORT and RUN commands can be run through the callable interface or command interface.
To use this technique, you must know how to define ISPF dialog variables in your program using the ISPF VDEFINE service. See ISPF: Dialog Management Guide and Reference
You can use the PDF editor with PDF edit macros to design and control data entry to queries, procedures, forms, and profiles. You can write PDF macros using REXX programs.
To create a file that contains an SQL query, your program can use ISPF display services to display a screen and create a file based on input from the user. This file can then be imported into QMF and run.