Generic object names can be used when referring to multiple objects with similar names.
A generic object name may refer to more than one object. That is, a generic name contains one or more characters that are the first group of characters in the names of several objects; the system then searches for all the objects that have those characters at the beginning of their names and are in the libraries named in the library list. A generic name is identified by an asterisk (*) as the last character in the name.
A quoted generic name consists of a generic name enclosed in quotation marks. Unlike quoted names, if there are no special characters between the quotation marks, the quotation marks are not removed. The generic name "ABC*" would cause the system to search for objects whose name begins with "ABC.
A generic name can also be qualified by a library name. If the generic name is qualified, the system will search only the specified library for objects whose names begin with that generic name.
When you specify a generic name, the system performs the required function on all objects whose names begin with the specified series of characters. You must have the authority required to perform that function on every object the generic name identifies. If you do not have the required authority for an object, the function is not performed and a diagnostic message is issued for each instance that the attempted generic function failed. A completion message is issued for each object the generic function operates on successfully. You must view the online low-level messages to see the completion messages. Once the entire generic function is completed, a completion message is issued that states that all objects were operated on successfully. If one or more objects could not be successfully operated on an escape message is issued. If an override is in effect for a specific device file, the single object name specified on the override, rather than the generic name, is used to perform the operation.
You may not be able to use a generic name for delete, move, or rename commands if the library containing the objects is already locked. A search for generic object names requires a more restrictive lock on the library containing the objects than a search for full object names. The more restrictive lock is necessary to prevent another user from creating an object with the same name as the generic search string in the library while the delete, move, or rename command is running. You can circumvent this problem by using the full name of the objects instead of a generic name. Or you can end the job or subsystem that has a lock on the library.
For some commands, a library qualifier can be specified with the generic name to limit the scope of the operation. For example, a Change Print File (CHGPRTF) command with FILE(LIB1/PRT*) performs the desired operation on printer files beginning with PRT in library LIB1 only; printer files in other libraries are not affected.
The limitations associated with the various library qualifiers are as follows:
Name Type | Name Syntax | Example |
---|---|---|
Simple generic name | generic-name* | OBJ* |
Qualified generic name | library-name/generic-name* | LIB1/OBJ* |
Quoted generic name | "generic-name*" | "ABC*" |