ISPF allows a generic high-level qualifier when using option 3.4
to print or display a list of data set names. A generic high-level
qualifier is one that contains a wildcard character. You can restrict
the search limits (and improve performance) by disabling the use of
wildcard characters in the first qualifier. You can do this in two
ways:
- Through the DISALLOW_WILDCARDS_IN_HLQ setting in the ISPF Configuration
table.
- By writing an exit that sets a return code to prevent the list
from being generated when it finds a wildcard character. This method
allows more flexibility, for example if you wish to allow a wildcard
character at the end of a high-level qualifier but not at the start.
For more information about using the
data set list filter exit, see
Data set list filter exit.
Figure 1 is an example of a data
set list exit that disables wildcards. A copy of this exit is included
in your SISPSAMP data set in member ISRNOGEN. Note that this example
as written is nonreentrant, so it should not be put in the LPA. If
nonreentrant exits are put in the LPA, abends can occur.
Figure 1. Sample exit to disable
generic high-level qualifiers (Part 1 of 2) TITLE ' ISRNOGEN: PROC (PARM1,PARM2,PARM3,PARM4);'
* This program is an example of a data set list exit. It checks
* for a generic high-level qualifier and sets the return code
* to prevent the list from being generated when there is a generic
* high-level qualifier.
ISRNOGEN CSECT ,
ISRNOGEN AMODE 31
ISRNOGEN RMODE ANY
@PROLOG STM @14,@12,12(@13)
BALR @12,0
@PSTART DS 0H
USING @PSTART,@12
MVC PARMADDR(16),0(@01)
* If the first parameter is one, check the data set name for
* a generic character (% or *)
CHECK1 L @04,PARMADDR
CLC PARM1(4,@04),ONE
BNE EXITRTN
* Check current Dsname
L @05,PARMADDR+4
LR @01,@05
XR @02,@02
* Translate and test for *, %, blank, or period
TRT DSNAME(44,@05),TABLE
SR @01,@05
AR @05,@01
* Check the character that stopped the translate and test for an
* asterisk or a percent sign. If either of these is the first
* character found, the high-level qualifier is generic.
CLC DSNAME(1,@05),ASTERISK
BE ERROR
CLC DSNAME(1,@05),PERCENT
BE ERROR
* If the high-level qualifier is not an asterisk or percent sign,
* set the return code to allow the list to be displayed.
NAMEOK SLR @06,@06
ST @06,EXITRC
EXITRTN DS 0H
L @15,EXITRC
L @14,12(,@13)
LM @00,@12,20(@13)
BR @14
* If the high-level qualifier is generic, set the return code to 8
* to prevent searching all catalogs.
ERROR MVC EXITRC(4),EIGHT
B EXITRTN
* Data for checkname /* */
@DATA DS 0H
DS 0F
PARMADDR DS 4F
DS 0F
ONE DC F'1'
TWO DC F'2'
FOUR DC F'4'
EIGHT DC F'8'
DS 0D
EXITRC DS F
ASTERISK DC C'*'
PERCENT DC C'%'
Figure 2. Sample exit to disable generic high-level
qualifiers (Part 2 of 2)* Translate and test table with blank, period, asterisk, and
* percent signs
TABLE DC 64X'00'
DC X'40'
DC 10X'00'
DC X'4B'
DC 16X'00'
DC X'5C'
DC 15X'00'
DC X'6C'
DC 147X'00'
@00 EQU 00 Equates for registers 0-15
@01 EQU 01
@02 EQU 02
@03 EQU 03
@04 EQU 04
@05 EQU 05
@06 EQU 06
@07 EQU 07
@08 EQU 08
@09 EQU 09
@10 EQU 10
@11 EQU 11
@12 EQU 12
@13 EQU 13
@14 EQU 14
@15 EQU 15
VOLUME EQU 0
DSNAME EQU 0
EXIT1 EQU 0
LEVEL EQU 0
PARM1 EQU 0
PARM2 EQU 0
PARM3 EQU 0
PARM4 EQU 0
DS 0D
@ENDDATA EQU *
END ISRNOGEN