Using ISPF commands from a procedure with logic

Whenever you start QMF under ISPF, QMF is started as an ISPF program. Therefore, to run any ISPF commands from a QMF procedure with logic running under ISPF, you must transfer from the QMF program dialog to an ISPF command dialog. To do this, you must issue an ISPF SELECT CMD from your QMF procedure.

To set the correct ISPF environment and run a REXX program containing your ISPF commands, use the following ISPF SELECT command with the CMD keyword:

ADDRESS ISPEXEC "SELECT CMD(userprogram)"

userprogram is a REXX program that contains your ISPF commands.

For example, if the REXX program that contains your ISPF commands is called DIALOG, include the following command in your procedure with logic:

ADDRESS ISPEXEC "SELECT CMD(DIALOG)"

For more information on ISPF, see ISPF: Dialog Management Guide and Reference

You also can use a QMF CMS or TSO command to run your REXX program containing ISPF commands, for example CMS DIALOG or TSO DIALOG. QMF issues the ISPF SELECT CMD statement for you.

If you are running QMF under ISPF and your procedure with logic starts a program requiring ISPF services, your procedure must start this program using the ISPF SELECT CMD environment as described in the preceding examples. For example, suppose you are running QMF under ISPF and your procedure with logic starts DB2's DSN command. Because the DSN command uses ISPF services, you should use one of the following commands to issue the DSN command:

ADDRESS ISPEXEC "SELECT CMD(DSN)"

or

ADDRESS ISPEXEC "SELECT CMD(DSNEXEC)"

where DSNEXEC contains the ADDRESS TSO DSN statement.

[ Previous Page | Next Page | Contents | Index ]