Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2004
    Posts
    11

    Unanswered: Passing Parameters to a Report in QMF

    How do I pass parameters to a Report in QMF (Query Management Facility) at runtime? I.e If I needed an adhoc report for a certain month of a certain year, I would pass in 2004 and July at runtime.

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    You can use variables, which are designated by a word beginning with ampersand (&).

    First create the query with variables:

    SELECT &COLUMN
    FROM Q.STAFF
    WHERE NAME=&NAME

    Then to run the query:

    RUN QUERY (&COLUMN=SALARY, &NAME='SMITH'

    If the variable is not supplied in the run command, the user will prompted for the value (unless run in TSO batch mode).
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •