You can let users start QMF using ISPF services. You can add JCL to the ISPF environment that defines QMF resources:
You can use any of the previous methods to start the other methods. For example, you can run an initial dialog from a CLIST.
If you use JCL that points to the QMF program location, the JCL must always be in an initial dialog.
To run QMF under ISPF, you must start the QMF program dialog using the ISPF SELECT service. When a TSO call or a TSO command is used, the results can be unpredictable.
Restrictions:
ISPEXEC SELECT CMD(DSQQMFE) NEWAPPL(DSQE) ISPSTART CMD(DSQQMFE) NEWAPPL(DSQE)
If you choose to set up a menu option to start QMF, the menu must point to QMF. Figure 41 shows a sample definition for the ISPF master application menu and shows how to add an option to the menu. In this definition, Option 2 was added for reaching QMF through a CLIST.
)BODY %--------------------- MASTER APPLICATION MENU ----------------- %SELECT APPLICATION ===>_OPT + % +USERID - % +TIME - % 1 +SPF - SPF PROGRAM DEVELOPMENT FACILITY +TERMINAL - % 2 +QMF - RUN QMF UNDER THE ABC SUBSYSTEM +PF KEYS - % % % % % % % % % % P +PARMS - SPECIFY TERMINAL PARAMETERS AND LIST/LOG DEFAULTS % X +EXIT - TERMINATE USING LIST/LOG DEFAULTS % +PRESS%END KEY+TO TERMINATE + % )INIT )PROC &SEL = TRANS( TRUNC (&OPT,'.') 1,'PANEL(ISP0PRIM) NEWAPPL' 2,'PGM(DSQQMFE) NEWAPPL(DSQE) PASSLIB PARM(DSQSSUBS=ABC)' /* */ /* ADD Other APPLICATIONS HERE */ /* */ P,'PANEL(ISPOPT)' X,'EXIT' ' ',' ' *,'?' ) )END
The direct menu approach to starting QMF can be faster than the CLIST approach. If you allocate all user resources through TSO logon procedures, then the CLIST that you create for the menu option has no resources to allocate. The CLIST is left with a single function, starting QMF, which can be run without a CLIST.
You can add more than one option to your menu. Suppose, for example, that ABC is an experimental DB2 subsystem and DSN is the production subsystem. You can now add two options to your menu: one for each subsystem. You might have each option call a different CLIST, or you might create one CLIST with a positional parameter for the subsystem. The added lines in the menu's PROC section might look like this:
2,'PGM(DSQQMFE) NEWAPPL(DSQE) PASSLIB PARM(DSQSSUBS=DB2SSFDX)' 3,'PGM(DSQQMFE) NEWAPPL(DSQE) PASSLIB PARM(DSQSSUBS=DB2SSFDY)'
You may optionally use the ISPF LIBDEF statements to allocate QMF libraries during an ISPF session.
Allocate the program libraries to a unique QMF DD NAME of DSQLLIB to use the ISPF LIBDEF service for QMF and DB2 programs. Then specify DD NAME DSQLLIB as the ID value in the LIBRARY option on the ISPF LIBDEF statement.
For example, to allocate QMF and DB2 product libraries, write a TSO ALLOCATE and ISPF LIBDEF statement:
ALLOC FI(DSQLLIB) DA('QMF720.SDSQEXIT,'QMF720.SDSQLOAD', 'DSN710.SDSNEXIT','DSN710.SDSNLOAD') SHR REUSE LIBDEF ISPLLIB LIBRARY ID(DSQLLIB)
To allocate program libraries using the ISPF LIBDEF service, write a CLIST similar to Figure 42. The preceding CLIST assumes that ISPF is already running and has other ISPF resources already allocated:
/****************************************************/ /* Allocate QMF and DB2 Programs to DSQLLIB */ /****************************************************/ ALLOC FI(DSQLLIB) SHR REUSE + DA('QMF720.SDSQEXIT', + 'QMF720.SDSLOAD', + 'DSN;720.SDSNEXIT', + 'DSN;720.SDSNLOAD') /****************************************************/ /* Allocate QMF libraries used for GDDM */ /****************************************************/ ALLOC FI(ADMGGMAP) DA('QMF720.DSQMAPE') SHR REUSE ALLOC FI(ADMCFORM) DA('QMF720.DSQCFORM') SHR REUSE ALLOC FI(DSQUCFRM) DA('QMF720.DSQUCFRM') SHR REUSE ALLOC FI(ADMGDF) DA('QMF72.CHARTLIB') SHR REUSE /****************************************************/ /* Allocate QMF product datasets */ /****************************************************/ ALLOC FI(DSQPRINT) SYSOUT(Z) LRECL(133) RECFM(F B A ) BLKSIZE(1330) ALLOC FI(DSQPNLE) DA('QMF720.DSQPNLE') SHR REUSE ALLOC FI(DSQDEBUG) SYSOUT(Z) LRECL(121) RECFM(F B A) BLKSIZE(1210) ALLOC FI(DSQUDUMP) SYSOUT(Z) LRECL(125) RECFM(V B A) BLKSIZE(1632) ALLOC FI(DSQSPILL) NEW UNIT(SYSDA) SPACE(1,1) CYLINDERS ALLOC FI(DSQEDIT) NEW UNIT(SYSDA) /******************************************************/ /* Issue ISPF LIBDEF for QMF libraries used for ISPF */ /******************************************************/ ISPEXEC LIBDEF ISPLLIB LIBRARY ID(DSQLLIB) ISPFEXE LIBDEF ISPPLIB DATASET ID('QMF720.SDSQPLBE') ISPFEXE LIBDEF ISPSLIB DATASET ID('QMF720.SDSQSLBE') ISPFEXE LIBDEF ISPMLIB DATASET ID('QMF720.SDSQMLBE') /*****************************************************/ /* Start QMF dialog using PASSLIB */ /*****************************************************/ ISPEXEC SELECT PGM(DSQQMFE) NEWAPPL(DSQE) PASSLIB /*****************************************************/ /* Free ISPF LIBDEF for QMF libraries used for ISPF */ /*****************************************************/ ISPEXEC LIBDEF ISPLLIB LIBRARY ID( ) ISPEXEC LIBDEF ISPPLIB LIBRARY ID( ) ISPEXEC LIBDEF ISPSLIB LIBRARY ID( ) ISPEXEC LIBDEF ISPMLIB LIBRARY ID( ) FREE FI(DSQLLIB) /*****************************************************/ /* Free QMF product datasets */ /*****************************************************/ FREE FI(DSQPRINT) FREE FI(DSQPNLE) FREE FI(DSQDEBUG) FREE FI(DSQUDUMP) FREE FI(DSQSPILL) FREE FI(DSQEDIT) /****************************************************/ /* Free QMF libraries used for GDDM */ /****************************************************/ FREE FI(ADMGGMAP) FREE FI(ADMCFORM) FREE FI(DSQUCFRM) FREE FI(ADMGDF)
You can start QMF in batch mode to potentially save resources and time.
You can start QMF using ISPF with or without using a CLIST on OS/390. Place either of the following statements in the SYSTSIN data set of your JCL:
ISPSTART PGM(DSQQMFE) NEWAPPL(DSQE) PARM(...DSQSMODE=B,DSQRUN=aa.bbb)
ISPSTART CMD(clist_name) NEWAPPL
where clist_name is the name of the CLIST that starts QMF
PARM establishes the appropriate operating mode (DSQSMODE=B), identifies the procedure to be run (DSQSRUN=aaa.bb), and can include variables for that procedure.
The ellipsis after PARM represents optional parameter values that the user might want to include in addition to the required values for the DSQSMODE and DSQSRUN parameters. The name of the procedure, as shown in Figure 47, must contain the authorization ID of the owner. For example, assume that a procedure was named PROCA and owned by the user authorization ID, JONES.
ISPSTART PGM(DSQQMFE) NEWAPPL(DSQE) PARM(DSQSMODE=B,DSQSRUN=JONES.PROCA)
After the procedure runs, QMF ends and returns control to ISPF. ISPF can then continue with another procedure or command. On OS/390 when ISPF stops, TSO runs the next TSO command in SYSTSIN. When all commands in SYSTSIN have been run, the job step ends.
The following examples show how to start and pass parameters to QMF under ISPF:
ISPSTART PGM(DSQQMFE) NEWAPPL(DSQE) PARM(DSQSIROW=150,DSQSRSTG=0)
This statement passes a value of 150 for DSQSIROW (number of rows fetched before first display of report), and passes a value of 0 for DSQSRTG (amount of reserved storage).
ISPEXEC SELECT PGM(DSQQMFE) NEWAPPL(DSQE) PARM(DSQSSUBS=DB2SSFDX)
This statement passes the name DB2SSFDX for the DB2 subsystem.
)PROC &SEL = TRANS( TRUNC (&OPT,'.') 1,'PGM(DSQQMFE) NEWAPPL(DSQE) PARM(DSQSPILL=NO)' . . .
This code passes NO for DSQSPILL.
ISPSTART PGM(DSQQMFE) NEWAPPL(DSQE) PARM(DSQSRUN=Q.IPROC(&&&&TABLE=Q.STAFF))
This statement uses the DSQSRUN parameter:
The DSQSRUN parameter as specified in this example results in the following QMF command:
RUN Q.IPROC(&TABLE=Q.STAFF