Created On:  15 May 2012

Problem:

How can I retrieve a list of dataset names from the catalog, using asterisk wildcards?

Resolution:

The utility program MVSGETCT can be used to scan the Enterprise Server catalog, using the Start and Get Next function codes.

Although there is no direct support within MVSGETCT for a browse function, or the use of wildcards, these features can be emulated by writing an interface layer between applications and MVSGETCT.

The attached zip file contains an example of how dataset names can be retrieved using trailing asterisk or double asterisk notation to specify the pattern matching criteria.

A single trailing asterisk retrieves all names that match the dataset prefix (the part of the name before the asterisk), but do not have any extra nodes in their name.

Double trailing asterisks retrieves all names that match the dataset prefix, regardless of any extra nodes that may be present in their name.

For example:-

MFSLV.TEST*   -> MFSLV.TEST1, MFSLV.TESTING2, but not MFSLV.TEST.THREE
MFSLV.TEST.*  -> MFSLV.TEST.DSN1, MFSLV.TEST.THREE, but not MFSLV.TEST.LEVEL.FOUR
MFSLV.TEST.** -> MFSLV.TEST.DSN1, MFSLV.TEST.LEVEL.FOUR.FIVE, but not MFSLV.TESTING2
MFSLV.TEST**  -> 
Any of the above 

Incident #2573569