An example

You are logged on to your local VM system (SANJOSE) running CMS. You want to write a REXX callable interface program that does the following:

  1. Starts a QMF session
    CALL DSQCIX "START"
  2. Connects to the remote DB2 database (DALLAS)
    CALL DSQCIX "CONNECT TO DALLAS"
  3. Runs a procedure with logic(EARNINGS) that queries the remote database for data, formats the data, and prints the report
    CALL DSQCIX "RUN PROC EARNINGS"

    The procedure EARNINGS contains the following logic:


    ·
    ·
    ·
    "RUN QUERY EARNQ (FORM=EARNF" "PRINT REPORT"
    ·
    ·
    ·

    This procedure does not contain another CONNECT command.

  4. Ends the QMF session
    CALL DSQCIX "EXIT"

When you write this program, be aware of the following:

For more information about connecting to a remote location with the QMF CONNECT command, see online help.

[ Previous Page | Next Page | Contents | Index ]