Connecting to a remote location from a procedure
The QMF CONNECT command lets you connect to a remote database.
You can use this command within a linear procedure or a procedure with logic, except when the procedure has been passed as a parameter on a CALL statement that starts QMF as a stored procedure.
- Connects to a remote location (DALLAS)
- Issues a series of QMF commands
- Prints a report
- Reconnects to the originating location (MIAMI)
Make sure that you store the procedure at the remote location in the same database to which you are connected when you issue the RUN PROC command. When you connect to a new location, QMF re-initializes your profile, except for the value of TRACE. It also re-initializes command synonyms and function keys to the values at the new (remote) location.
- If you are connected to a remote database and issue a RUN PROC command, that procedure and all the objects used in that procedure must be stored at the remote database.
- All QMF commands in the procedure run in QMF temporary storage at the system where QMF is running (the local system). However, all objects used by these QMF commands (such as queries, procedures, or forms) must be defined in the database at the remote location.
- All commands that affect the database (for example, SQL statements, QMF queries, or EDIT TABLE updates) run at the remote location.
- If the procedure contains system-specific commands (CICS® or TSO),
these commands run at the system where QMF is
running (the local system).
If your procedures contain system-specific commands that cannot run on the system where QMF runs, your procedure will not run successfully.
- Any files, data sets, or data queues that are used in a system-specific command must exist on the system where QMF is running (the local system).
- If your site uses TSO and takes advantage of RACF® support for mixed-case passwords, ensure that the CASE option of your QMF profile is set to MIXED. Otherwise, QMF converts all input to upper case, causing the CONNECT command to fail. In this situation, ensure that you enter all input in upper case, because QMF only recognizes commands in upper case.