File-AID can select a member for processing based on its name using either the MBRNAME, MEMBER or MEMBERS parameters.
The MEMBER parameter selects a specific member within a PDS for processing when coded as follows:
MEMBER=name
The value for name can be up to eight characters. You can specify more than one member per control card by separating each member name with a comma and enclosing the names in parentheses. If you specify only one member name, it is recommended that you do not enclose it in parentheses. Examples 1 and 2 show coding for single- and multiple-member selection.
Example 1
This example copies only member MEM1 to the output file labeled DD01O.
Example 2
$$DD01 COPY MEMBER=(MEM1,MEM2,MEM3)
This example copies members MEM1, MEM2, and MEM3 to the output file labeled DD01O.
The MEMBERS parameter can be used to select groups of members from a PDS. A mask field is used to search the PDS directory for any member names that contain the characters in the mask. The mask field can contain up to eight characters. Any insignificant character in the string is ignored by coding a hyphen ( - ) in the appropriate location. The MEMBERS parameter is coded:
MEMBERS=mask-field
The following examples show the use of the MEMBERS parameter for member selection.
Example 3
This example lists any member in the input PDS with a name that begins with the characters ZA.
Example 4
$$DD01 PRINT MEMBERS=TEST---P
This example prints any member in the input PDS with a name that begins with the characters TEST and contains a letter P in location 8. All other characters in the name are ignored.
The following example shows the use of the MBRNAME parameter for selecting a group of members based on a name range. (For more information, see MBRNAME (MBR).)
Example 7
$$DD01 LIST MBRNAME=(ABC,DEF)
This example lists any member in the input PDS with a member name that begins with the characters ABC through DEF.