Defining a synonym for the print function key in VM

Here is a customization technique that allows a user to print an object without exiting QMF. The first two steps of this technique show how to define a command synonym for printing; the final step shows how to customize your Print function key. This technique can be used to invoke a local print utility when the Print function key is pressed.

  1. Create a REXX exec that locally prints the current object. Here is a sample, called PRTQMF, using the QMF callable interface:
    /* PRTQMF REXX EXEC for local print utility called MPRINT */
    CALL DSQCI "PRINT PROC (PRINTER=MYPIRNT1"
    mprint MYPRINT1 ADMLIST A

    This example assumes you have a MYPRINT1 nickname defined and that it creates a file with a file type of ADMLIST.

    Some QMF users prefer to bypass the PRINT command and simply export the object for local printing. In this case your exec looks something like:

    /* PRTQMF REXX EXEC for local DSPRINT *?
    CALL DSQCIX "EXPORT PROC TO MYPROC"
    mprint MYPROC PROC A
  2. Create a QMF command synonym for printing. Here is a sample query that creates a command synonym PRTQMF to execute the PRTQMF exec.
    INSERT INTO COMMAND_SYNONYMS (VERB, SYNONYM_DEFINITION, REMARKS)
    VALUES('PRTQMF', 'CMS PRTQMF', 'Print QMF Proc')
  3. You can now customize a function key on the procedure panel to use this command synonym. You need to customize a key for each panel. a query to customize function key 4 on the procedure panel would look like this:
    INSERT INTO PFKY_TABLE (PANEL,ENTRY_TYPE,NUMBER,PF-SETTING)
    VALUES('PROC','K' 4, 'PRTQMF')

    This example assumes that the user's profile has the PFKEYS column value set to PFKY_TABLE, the name of the function key customization table. (After running the query, QMF must be restarted to implement the function key change.)

[ Previous Page | Next Page | Contents | Index ]