The following procedure assumes that you use an editor that can be called by a CLIST operating under ISPF. The EDIT TABLE command calls the Table Editor, and does not require a text editor.
To make an editor available for the EDIT command:
XYZEDIT 'USERA.XYZDATA.TEXT'
EDIT yyyy (EDITOR=xxxx)where yyyy is either PROC or QUERY, and xxxx is the name of the CLIST created to call the editor. For more on the EDIT command, see QMF Reference.
If you specify the program development facility (PDF) editor to edit an SQL query or QMF procedure, QMF executes the PDF editor in the QMF application ID DSQE, or DSQn where n is the NLF character. In addition, QMF sets the function keys and location of the command line to fit the QMF product.
If you need to use a different set of function keys or have existing PDF macros or specialized PDF editor screens, you can use them by executing the PDF editor in an application ID other than DSQ*. To do this, execute two small REXX programs or CLISTs. The first program simply routes execution to the second program, which then invokes the editor running in the desired ISPF application ID with the desired function key or other special setup requirements such as an edit invocation macro or a unique edit panel.
The REXX program example in Figure 110 shows how to edit the SQL query or QMF procedure using the edit transfer data set, as defined by DDNAME(DSQEDIT), when QMF is started. The PDF application ID ISP is used in this example.
Edit Program 1 (MYEDIT) /* REXX QMF Edit program 1 */ /* Transfer to ISP application ID */ Address ISPEXEC "SELECT CMD(MYEDIT2) NEWAPPL(ISP)" Exit 0 Edit Program 2 (MYEDIT2) /* REXX QMF Edit program 2 */ /* Invoke PDF Editor using DDNAME */ Address ISPEXEC "LMINIT DATAID(EDT) DDNAME(DSQEDIT)" Address ISPEXEC "EDIT DATAID("EDT")" Address ISPEXEC "LMFREE DATAID("EDT")" Exit 0
The REXX programs must be allocated to a valid concatenation of either SYSPROC or SYSEXEC before execution. To execute from QMF, enter the following QMF EDIT command on the QMF command line:
EDIT QUERY (E=MYEDIT)
Important: If you edit a procedure or query, and the resulting object is too large to fit in QMF's work area, QMF truncates the object and displays an error message. QMF saves the entire object, however, in a file associated with the ddname QMFEDIT. To bring the object into QMF, the user needs to issue a RESET DATA command. This information, including the file name of the saved object, is provided in the message help for the error message associated with this condition.
[ Previous Page | Next Page | Contents | Index ]