Running queries that contain variables

Applications that use ISPF services can run queries that contain variables.

You can run these queries from an application that uses ISPF services in one of three ways:
  • Use ISPF file-tailoring services.

    With this technique, you represent the query by an ISPF file-tailoring skeleton. In that skeleton, the portions of the query that can change are displayed as ISPF dialog variables. After giving these variables the appropriate values, your program starts certain ISPF file-tailoring services. The result is a sequential file that contains the query.

    The program can then import the query into QMF™ temporary storage and have QMF run it. The required 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 that uses the ISPF dialog service.

  • Use the Program Development Facility (PDF) editor to create QMF objects

    You can use the PDF editor with PDF edit macros to design and control data entry to queries, procedures, forms, and profiles. You can use REXX to write PDF macros.

  • Create a query that uses an ISPF dialog.

    Your program can use ISPF display services to display a screen and create a file based on input from the user. This file, which then contains an SQL query, is then imported into QMF and run.