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:
- Starts a QMF session
CALL DSQCIX "START"
- Connects to the remote DB2 database (DALLAS)
CALL DSQCIX "CONNECT TO DALLAS"
- 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.
- Ends the QMF session
CALL DSQCIX "EXIT"
When you write this program, be aware of the following:
- Your application program must reside on your local (SANJOSE) VM system.
- The QMF session starts on your local (SANJOSE) VM system.
- Your procedure must reside on the remote database (DALLAS); DALLAS is
the current location when the application runs the procedure in step 3.
- Any QMF objects (in this case, the query and the form) used in the application
or the procedure after the CONNECT command in step 2 must
reside on the remote database (DALLAS).
- The SQL query EARNQ run by the procedure in step 3 runs
against the DB2 database in DALLAS.
- The PRINT command in the procedure EARNINGS prints the report on the printer
named by the profile at the current location (DALLAS). For this example, assume
that the profile at the current location (DALLAS) defines the printer to be
at the local VM system (SANJOSE).
For more information about connecting to a remote location with the QMF
CONNECT command, see online help.
[ Previous Page | Next Page | Contents | Index ]