Writing a program that uses the command interface: An example

Suppose you want to use the command interface to display an ISPF panel that prompts a user to specify a query name, runs the query, and displays a report.

For this scenario, you do the following:

  1. Write your command interface REXX program. Your program does the following:
    1. Displays the ISPF panel QRYNAME using the DISPLAY services:
      ADDRESS ISPEXEC "DISPLAY PANEL(QRYNAME)"
    2. Runs a QMF query based on user input from the previous DISPLAY service. Here, the ISPF variable QNAME contains the name of the QMF query:
      ADDRESS ISPEXEC "SELECT PGM(DSQCCI) PARM(RUN QUERY" QNAME ")"
    3. Lets the user view the result of the query, using the following command:
      ADDRESS ISPEXEC "SELECT PGM(DSQCCI) PARM(INTERACT)"
  2. Start ISPF.
  3. Start QMF.
  4. Call your program using the CMS or TSO command from the QMF command line. For example, if your program is named GETINFO, your command looks like one of the following depending on your system:
    CMS GETINFO
    TSO GETINFO
[ Previous Page | Next Page | Contents | Index ]