Previous Topic: Pattern Names and Date FormatsNext Topic: CADisk Date Formats


Pattern Names

A pattern name consists of the usual alphanumeric and national characters allowed in a data set name but you can also use the following:

*

The asterisk (*) is used to represent a complete or partial variable index level.

The following are examples of using the asterisk (*):

DSN=*

Selects all single level names.

DSN=*.*

Selects all double level names.

DSN=A.*.SOURCE

Selects all triple level names with a first level of "A" and a third level of "SOURCE."

DSN=A.*.SOURCE

Selects all double level names with a first level beginning with "A" followed by any other characters, and a second level of "SOURCE."

?

The question mark (?) is used to represent any single character within an index level. Multiple question marks in the same level are permitted.

The following are examples of using the question mark (?):

DSN=?

Selects all single character names.

DSN=A.TEST??

Selects all double level names with a first level of "A and a second level of six characters, the first four of which are "TEST."

/

The slash (/) is used to represent any variable character(s) from that position to the end.

The following are examples of using the slash (/):

DSN=A/

Selects all names beginning with "A".

DSN=A.TEST/

Selects all names beginning with character string "A.TEST" followed by any other characters.

!

The exclamation point (!) is used to represent any variable character up to the character string following the exclamation point; i.e., the exclamation point defines the beginning of a character string (terminated by the next pattern character or the end of the data) that may be found anywhere within the name.

The following are examples of using the exclamation point (!):

DSN=!TEST

Selects all data sets that contain "TEST" somewhere in the name.

DSN=!TEST!LOADLIB

Selects all data sets that contain "TEST" somewhere in the name and "LOADLIB" somewhere following "TEST".

Pattern representations can be combined into a single request.

Examples of combining patterns into a single request

DSN=A?.!DEPT21

Selects all data sets that have a two-character first-level index that starts with an "A" and contain "DEPT21" somewhere in the remainder of the name.

DSN=A.*.C?./

Selects all names with a first level of "A" followed by any second level, followed by a two-character third level starting with a "C" and followed by any other characters.