Modifying the batch application
You can modify the batch application by making changes to its components or creating new components for the customized application. Create new components so that you do not risk losing your changes when maintenance is performed.
Applicable QMF components
- The CLISTs DSQABB11 and DSQABB12 in the QMF1310.SDSQCLTE
library
When users call the batch application with the BATCH command, they actually call DSQABB11. The purpose of this CLIST is to call DSQABB12 through the ISPF SELECT service as a new application. Most of the logic in the application is in DSQABB12.
- ISPF message definitions in members DSQBE00, DSQBE01, and DSQBE02
of the QMF1310.SDSQMLBE
library
These messages appear on the user's screen after the application ends. The application generates these messages using the QMF MESSAGE command.
- Various ISPF panel definitions in the QMF1310.SDSQPLBE
library, which serve a variety of purposes:
- DXYEABMP is the application's prompt panel.
- DXYEABM1, DXYEABM2, and DXYEABM3 are the help panels for the prompt panel.
- DXYEAB12, DXYEAB13, DXYEAB14, and DXYEAB15 furnish message help for the application's error messages.
- Certain file customization examples in the QMF1310.SDSQSLBE
library:
- DSQABB1J provides sample JCL for the batch job. It is a sample procedure that runs a query in batch mode.
- DSQABB1P and DSQABB1S are sample QMF procedures. They provide an example of a procedure that submits the JCL for the job.
Possible changes to the application
- Allow users to choose the Db2® subsystem.
Within the DSQABB1J sample file is the ISPSTART statement to call batch-mode QMF. This statement does not provide a value for the DSQSSUBS parameter of QMF. As a result, the Db2 subsystem under which QMF is to run is assumed to have the default name DSN. If you want QMF to run in a Db2 subsystem with a different name, add DSQSSUBS=ssid to the PARM operand of the ISPSTART command (where ssid is the appropriate subsystem name).
- Allow the user to specify a GDDM nickname for the printed report.
- Add extra logic to enforce your site's rules.
For example, you might offer the user a list of acceptable volumes when the user creates a new data set for the report output.
- Change the JCL produced by the application to conform to your
site's needs.You can do either of the following:
- Add accounting information to the JOB statement.
- Change the name of QMF application plan in the ISPSTART statement of the SYSTSIN data set. The default QMF plan name for Version 13.1 is QMF1310.
Example of modifying the application
The following example shows one way you can modify the BATCH application.
This example modifies the batch application so that all users have the same PROFILE PREFIX statement, and assumes that all users have unique user IDs. Add the user IDs to the data set names using &SYSUID and &ZUSER.
You must make three modifications to the DSQABB1S SKELETON file as shown here. The old lines are commented out. The new replacement lines follow them.
)CM -------------------------------------------------------------------
)CM FILE: DSQABB1S
)CM DESCRIPTION: THIS SKELETON CREATES DSQABB1S, THE PROC WHICH
)CM SAVES THE CURRENT FORM (IF SPECIFIED)
)CM IMPORTS AND SAVES THE PROC WHICH RUNS THE QUERY
)CM SENDS THE QMF INVOCATION JOB TO z/OS BATCH
)CM RESETS THE PROC ITEM
)CM FREES ISPFILE USED FOR FILE TAILORING
)CM DISPLAYS THE QUERY PANEL
)CM -------------------------------------------------------------------
)SEL &FAN = &YES
&SAVE &FORM &AS &FNAME (&SHARE=&YES, &CONFIRM=&NO
)ENDSEL
)CM &IMPORT &PROC &FROM '&ZPREFIX..DSQ1EBFT.&PROC.' (&MEMBER = DSQABB1P
&IMPORT &PROC &FROM '&ZPREFIX..&ZUSER..DSQ1EBFT.&PROC.' (&MEMBER = DSQABB1P
&SAVE &PROC &AS &PNAME (&CONFIRM=&NO
)CM TSO SUBMIT '&ZPREFIX..DSQ1EBFT.&PROC.(DSQABB1J)'
TSO SUBMIT '&ZPREFIX..&ZUSER..DSQ1EBFT.&PROC.(DSQABB1J)'
TSO FREE FILE(ISPFILE) DELETE
&RESET &PROC
)CM &IMPORT &PROC &FROM DSQABB
&IMPORT &PROC &FROM &ZUSER..DSQABB
)SEL &ITM = &QUERY
&DISPLAY &QUERY
)ENDSEL
Make the five modifications to DSQABB12 CLIST as commented here.
/****************************************************************/ 00088000
/* ALLOCATE USERID.DSQ1EBFT.PROC TO BE USED FOR ISPF */ 00089000
/* FILE TAILORING OUTPUT. */ 00090000
/****************************************************************/ 00091000
FREE FILE(ISPFILE) 00092000
/* ALLOC DDNAME(ISPFILE) DSNAME(DSQ1EBFT.&PROC) OLD 00093000
ALLOC DDNAME(ISPFILE) DSNAME(&SYSUID..DSQ1EBFT.&PROC) OLD 00093000
IF &LASTCC ¬= 0 THEN + 00094000
DO 00095000
FREE ATTRLIST(ATTRPDS) 00096000
ATTR ATTRPDS LRECL(80) RECFM(F B) BLKSIZE(800) DSORG(PO) 00097000
/* ALLOC DDNAME(ISPFILE) DSNAME(DSQ1EBFT.&PROC) NEW SPACE(5,2) + 00098000
/* TRACKS DIR(10) USING(ATTRPDS) CATALOG 00099000
ALLOC DDNAME(ISPFILE) DSNAME(&SYSUID..DSQ1EBFT.&PROC) NEW + 00098000
SPACE(5,2) TRACKS DIR(10) USING(ATTRPDS) CATALOG 00099000
END 00100000
IF &RC = 8 THEN + 00101000
DO 00102000
⋮
/************************************************************/ 00203000
/* EXPORT CURRENT CONTENTS OF PROC PANEL */ 00204000
/************************************************************/ 00205000
ISPEXEC SELECT PGM(DSQCCI) + 00206000
/* PARM( &EXPORT &PROC &TO DSQABB (&CONFIRM = &NO ) 00207000
PARM( &EXPORT &PROC &TO &SYSUID..DSQABB (&CONFIRM = &NO ) 00207000
IF &LASTCC ¬= 0 THEN DO 00208000
ISPEXEC SELECT PGM(DSQCCI) + 00209000
PARM(SET GLOBAL (DSQEC_NLFCMD_LANG = &LOCLANG )) 00210000
SET &MSG = &DSQB.023 00211000
ISPEXEC SELECT PGM(DSQCCI) PARM( &MESSAGE &MSG ) 00212000
SET &RCDE = 8 00213000
GOTO CLEANUP 00214000
END 00215000
⋮
/************************************************************/ 00244000
/* IMPORT AND RUN FILE TAILORED SKELETON */ 00245000
/************************************************************/ 00246000
ISPEXEC SELECT PGM(DSQCCI) + 00247000
/* PARM( &IMPORT &PROC &FROM DSQ1EBFT (&MEMBER = DSQABB1S ) 00248000
PARM( &IMPORT &PROC &FROM &SYSUID..DSQ1EBFT (&MEMBER = DSQABB1S ) 00248000
IF &LASTCC ¬= 0 THEN + 00249000
⋮
CLEANUP: FREE FILE(ISPFILE) DELETE 00274000
DONE: SET &ZPLACE = &SAVEPLC 00275000
SET &ZPFCTL = &SAVEPFC 00276000
SET &ZPF01 = &STR(&SAVEPF01) 00277000
SET &ZPF13 = &STR(&SAVEPF13) 00278000
SET &ZPF03 = &STR(&SAVEPF03) 00279000
SET &ZPF15 = &STR(&SAVEPF15) 00280000
SET &ZPF10 = &STR(&SAVEPF10) 00281000
SET &ZPF22 = &STR(&SAVEPF22) 00282000
SET &ZPF11 = &STR(&SAVEPF11) 00283000
SET &ZPF23 = &STR(&SAVEPF23) 00284000
ISPEXEC VPUT (ZPLACE ZPFCTL ZPF01 ZPF13) PROFILE 00285000
ISPEXEC VPUT (ZPF03 ZPF15 ZPF10 ZPF22 ZPF11 ZPF23) PROFILE 00286000
/* DELETE DSQABB.&PROC 00287000
DELETE &SYSUID..DSQABB.&PROC 00287000
EXIT CODE(&RCDE) 00288000