The EDIT command on OS/390

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:

  1. Write a CLIST to call the editor and pass the name of the data set to be edited as a positional parameter. For example, with the following command, QMF calls the CLIST, XYZEDIT, to edit the data set, USERA.XYZDATA.TEXT:
    XYZEDIT 'USERA.XYZDATA.TEXT'
  2. Place the CLIST in a command library allocated to everyone with access to the editor. Place it in a library that is part of the concatenation for the data set SYSPROC. One possible choice is the QMF library, QMF720.SDSQCLTE, which must be available to all QMF users.
  3. For individual users, allocate and catalog a data set for objects to be edited. This data set is refilled every time the user calls the editor with the EDIT command. Give the data set the following characteristics:
  4. In the JCL for each user, allocate the data set cataloged for that user in step 3. Allocate it with the ddname DSQEDIT. Write DISP=OLD for the disposition of the data set.
  5. Advise users how to specify the EDIT command. The command has the following format:
    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.
  6. You can edit your QMF SQL query or QMF procedure in a different ISPF application ID by using an exec or CLIST as the editor name on the QMF EDIT command.

    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.

    Figure 110. Editing using the edit transfer data set
    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 ]