[Editor’s Note:] Like all good commercial ISPF software, MVS/QuickRef® can also be run in batch. And not in the TSO-in-batch mode where PGM=IKJEFT01 (or one of its entry points) is needed. No, you use PGM=QWIKREF1. Consider this informative article by one of the developers of MVS/QuickRef® to see if you can use this feature.
When QuickRef® is executed as a batch job under z/OS, you can specify that any of the following QuickRef® commands be executed:
Command | Resulting Information Display in Batch |
QINFO | same information as QINFO command in ISPF environment |
SORT | DASD free space information sorted as requested |
GETNEXT | next item in “content” sequence |
GETPREV | previous item in “content” sequence |
HELP | item selection list showing items belonging to the MVS/QuickRef help product |
SEARCH | item selection list showing items containing the specified character string |
QPRINT | immediate printing of the information currently available (based on either the fast-path string specified or other commands which may have been specified) |
Below is an example of the JCL used to execute MVS/QuickRef® in batch along with one or more batch commands:
//JS10 EXEC PGM=QWIKREF1, // REGION=0K,
// PARM=’fast-path-string’ <– optional fast-path string
//STEPLIB DD DSN=quickref.linklib.dsn, <– MVS/QuickRef linklib
// DISP=SHR
//QWPRINT DD SYSOUT=*, <– optional printed output file
// DCB=(RECFM=VBA,LRECL=133,BLKSIZE=6000)
//QWREFDD DD DSN=quickref.database.dsn, <– MVS/QuickRef main data base
// DISP=SHR
//QWREFDDU DD DSN=quickref.user.database.dsn, <– optional user database
// DISP=SHR
//QWPARMS DD DSN=quickref.override.parmdsn, <– optional overrides data set
// DISP=SHR
//SYSHELP DD DSN=SYS1.HELP, <– optional TSO SYSHELP data set
// DISP=SHR
//QWCMDSDD DD * <– batch commands DD statement
batch command 1
batch command 2
As shown above, one or more batch commands can be specified (one per in-stream record) via the QWCMDSDD DD statement. Each command and any required parameters should be formatted just as they would be if the command were being entered on the ISPF command line.
When a single command is specified, the information returned is the information relating to that specific command. When multiple commands are specified, the information returned is the information relating to the last specified command. The only exception to this rule is the QPRINT command; it causes immediate printing of the “currently available” information.
As an example of using batch commands, suppose you want to retrieve DASD free space information for all online DASD volumes and you want three different listings of the information sorted three different ways as indicated by the following three SORT commands:
· SORT 4 D (sorted by free DASD extent count, descending)
· SORT 4 A (sorted by free DASD extent count, ascending)
· SORT 5 A (sorted by free track count, ascending)
Here is an example of the JCL required to accomplish this:
//JS10 EXEC PGM=QWIKREF1,
// REGION=0K,
// PARM=’S=*’ <– fast-path string requesting all DASD volumes
//STEPLIB DD DSN=quickref.linklib.dsn, <– MVS/QuickRef linklib
// DISP=SHR
//QWPRINT DD SYSOUT=*, <– printed output file
// DCB=(RECFM=VBA,LRECL=133,BLKSIZE=6000)
//QWREFDD DD DSN=quickref.database.dsn, <– MVS/QuickRef main data base
// DISP=SHR
//QWCMDSDD DD *
SORT 4 D
QPRINT
SORT 4 A
QPRINT
SORT 5 A
In this case, the first QPRINT command would print the listing resulting from the first SORT command. The second QPRINT command would print the listing resulting from the second SORT command. There is no need for a third QPRINT command because, as a default, batch processing always outputs the results of the last batch command in the QWCMDSDD file.
For more information on batch commands, see the section on “Batch Commands” in Chapter Three of the MVS/QuickRef® User’s Guide.
Robert Norris is one of the developers of MVS/QuickRef® and has over 35 years of programming and system design experience.