UDM - IBM i Wild Cards


IBM i Wild Cards

In source file specifications in the LIB file system for the delete command and for the copy command and file specifications for the forfiles statement, wildcards can appear in the library, file, and/or member portions.

An asterisk ( * ) represents a match of zero or more characters. A question mark ( ? ) represents a match of exactly one character,

Wildcards only apply to the library, file or member portion of the fully qualified file name in which they appear.


For example, in the statement:

The wildcard only applies to the file portion of the name and an error will result because the user did not provide a member name.


To copy all of the files that begin with DEF, along with all of their members from library ABC, use the format:


Likewise, to copy all of the files and their members in libraries that begin with ABC, use the format:


In destination file specifications, wild cards are not allowed.

Examples

Copies all files beginning with DEF from all libraries beginning with ABC.


Copies all the members in the physical file DEF in the library ABC.
 


Deletes all files in the library MYLIB starting with MYFILE and containing one additional character.


Lists all members in all files in all libraries.