Generating a PDS find/change member list of selected members
This example lists all members of your sample JCL partitioned dataset (PDS) library (FASAMP.JCL) that contain a job step that executes program name FILEAID (for example, EXEC PGM=FILEAID). Then it shows you how to use the CHANGE command to update selected members.
You use option M (Member) - PDS Find/Change and Member list processing. Temporary unformatted selection criteria (usage code Q) is defined to determine the initial list of matching members.
Search/Update Utility Entry screen
Steps:
- Type M in the OPTION field.
- Enter FASAMP.JCL in the Dataset name field.
- Enter the Disposition as SHR.
- Make sure processing option is O (online).
Type Q in the selection criteria usage field.
Q (Quick) requests temporary unformatted field selection criteria only.
- Press Enter.
More about the search/update entry screen
- Standard File-AID data set and member name entry is supported including using a wildcard character in either data set name (for example, FASAMP.*) or member name (for example, FASAMP.JCL(CNV*)).
- For option M only, the data set specified must be a PDS, Panvalet, or Librarian library.
- For options B or U, all file types are valid including VSAM, BDAM, PDS, sequential, Panvalet and Librarian, File-AID considers PDS, Panvalet, and Librarian libraries as if they were one big sequential file, processing all members together.
- Multiple data set processing is only available for options B or U.
Using PDS member selection features
When your data set is a PDS, Panvalet, or Librarian file, special member processing is automatically provided to let you select all members or a subset of members based on:
- Member name
- Name mask (for example, A?B or AB*)
- Name range (for example, From AB through BC)
- ISPF statistics
- Last modified user ID range (PDS, Panvalet only)
- Date created range (PDS only)
- Date last modified range
- Manual selection or exclusion of individual members from a list of members matching your member criteria.
The default is to select all members.
Search/Update Utility - PDS Processing Options screen
You want all members (the default), just press Enter to continue to the next screen.
More About PDS Processing Options (PPO)
- In several File-AID functions, you may specify a range of PDS members to be processed by the current function. In addition to the 3.6 Search/Update utility, you may use the member selection features in the following:
- Browse (1)
- Edit (2)
- Copy (3.3)
- Print Data (5.1)
- Print XREF (5.2)
- Print Selection Criteria (5.3)
- Print Layouts (5.4)
- When selecting record layouts in any function and a blank or pattern member name is specified.
- If a member mask like FASAMP.JCL(CNV*) was specified on the entry screen, the mask, CNV*, would automatically be transferred to the "Member name mask" field, ready for selection.
- If you are scanning JCL members and your selection criteria is looking for multiple conditions within a logical JCL statement (for example, a DD statement containing both DISP=OLD and UNIT=TAPE), use "Process in JCL format" = Y.
- Use a member name of * (asterisk) on the entry screen to select all members and to bypass the PPO screen. For example, FASAMP.JCL(*).
- If your selected data sets included one or more Version 2 PDSEs for Search/Update utility option B, Browse, you can specify how many member generations to process with the Maximum number of generations to include in search prompt in the PDS Processing Option screen.
Specifying quick selection criteria
Because you specified selection criteria usage code Q (Quick), the next screen displayed is the Unformatted Selection Criteria screen as shown in the following figure. You use this screen to specify what data condition(s) you are looking for in a record in order for the member containing that record to be included on your member list.
In this example, you are looking for a JCL statement containing the string PGM=FILEAID.
You use the CO (Contains) relational operator (RO) to specify a scan of each statement starting at Position 1. No length is specified because File-AID defaults the length of a scan to: "end of the record".
Search/Update Utility - Unformatted Field Selection Criteria screen
Steps:
- On the first line type 1 in the Position column.
- Type CO in the RO column.
- Type PGM=FILEAID in the Data Value area.
- Use the END command or PF key (default PF3) to proceed with PDS scanning and member list generation.
More About Unformatted Selection Criteria
- Use the END command immediately on entry to select all members before specifying any conditions.
- In the AND/OR column, AND is used to define complex criteria conditions, OR starts a new set of selection criteria. If a record fails to meet the conditions of a set, the next set is examined.
- After using a CO (Contains) relational operator, you can specify a Position value as relative to the location of the matching string (for example, Position +5 means the fifth byte after the first byte of the matched string).
- Valid RO include: EQ, NE, LT, LE, GT, GE, BT (Between), NB (Not Between), CO (Contains), NC (Not Contains), NV (Not Valid), VA (Valid), NU (Not Valid Unsigned), and VU (Valid Unsigned).
- Data Value is assumed to be mixed case text (matches any case in data), as if data type T (Text) is specified.
- If data string contains special characters or embedded blanks, enclose the string in single (') or double quotes ("). If the special character is a comma, use double quotes.
- For exact case searches, enclose the string in quotes and use the C (Character) data type (for example, C'John Smith').
- You can use CO or EQ relational operators to look for multiple strings by separating the strings with commas (for example, ABC,DEF,GHI looks for ABC or DEF or GHI at the specified position).
- For BT or NB, use a colon (:) to delimit the endpoints of the range. BT includes the endpoints. NB excludes the endpoints. For example, BT C'A:C' means a value between A and C.
Valid Data Value types include:
T (text)
Any case
C (text)
Explicit case
P (packed decimal)
Numeric values (for example, P'1', P'-50', P'1,22,333')
X (hex)
Hex value (for example, X'F1F2' X'C1C2C3')
N (numeric)
Display format (for example, N'11' = X'F1F1')
B (binary)
Numeric value of binary field (for example, B'16' is equivalent to X’00000010’)
M (mask)
One byte of 8 bits or 2 hexadecimal digits (for example, M’11110000’ and M'F0' are equivalent).
Japanese Data: DBCS and single byte Katakana data is accepted as data values for C (Character) and T (Text) data types. File-AID removes leading or trailing shift characters from DBCS data unless the value is enclosed in double quotes.
When the KANA install option is specified for the Character Set Table in the Batch Product Option Variables, C (Character) and T (Text) identifiers are both treated as case-sensitive C (Character) data.
Viewing the initial PDS find/change member list
File-AID scans your PDS looking at members meeting your member selection criteria and looks at each record to see if it meets the conditions you specified in your Unformatted Selection Criteria.
A list of matching members is generated and presented with the PDS Find/Change member list screen as shown below in the following figure.
Search/Update Utility - PDS Find/Change Member List (M Option)
Steps:
- Use the E (Select for PDF/Edit) line command in the S column to the left of member COPY.
- Use the X (Exclude) line command to the left of the members: CVT6XMAP, CVT70SEL, and CVT70XRF.
- Press Enter.
Issuing commands on the PDS find/change screen
Use the primary commands FIND and CHANGE to specify scans and changes to the list of members. Both commands feature a prompt screen to help you specify parameters. The CONDENSE/NOCONDENSE option lets you compress the member list result to include only matching members. Both commands have a default preview to let you view a summary of results.
Use the S (or E) (Edit) line command to select a member for Edit processing (ISPF Edit). The B (Browse) line command selects a member for Browse processing. The X (Exclude) line command removes a member from the list.
The RESET primary command re-reads the file directory and generates a list of all members. PDS processing options and selection criteria are not used when the RESET command is issued.
More About the PDS Find/Change Member List
- The HITS column is displayed when selection criteria has been specified. The HITS value indicates the number of times the criteria was found in each member.
- Standard ISPF-like UP/DOWN scrolling is supported as is the use of the LOCATE mem and SELECT mem primary commands.
- You can sort the list using the SORT command with one of the following parameters: VV.MM, CREATED, CHANGED, SIZE, INIT, MOD, ID (for example, SORT CHANGED).
Editing or Browsing Selected Members
When you use the E (Select for Edit) line command, File-AID invokes an ISPF Edit session on the member as shown below in the following figure.
Use the END command to exit the Edit session and save your changes. Use the CANCEL command to exit the Edit session and discard any changes you have made to this member. In either case you are returned to the member list.
Steps:
- Notice the //JOBLIB DD and the DSN=????????.FA.VVRRMM.LOAD string. Later in this example you specify a CHANGE to this DSN.
- Use the END primary command (PF3) to return to the member list.
Search/Update Utility - Edit Session From Member List
More About Member Browsing or Editing
- PF keys remain set as you have them defined in File-AID. The ISPF PF keys are not re-established until you exit from File-AID.
- The COPY member in the example shows you the sample JCL and control cards needed for a typical File-AID/Batch execution.
- If you have selected multiple members from the member list, when you exit from one member, the next member is displayed in an Edit session rather than returning you to the member list.
- If the member is from a Panvalet or Librarian library, File-AID Edit is used to present the data and you are not permitted to save any changes you key in.
Specifying a CHANGE to all selected members
Upon return to the member list, notice that the excluded members (CVT6XMAP, CVT70SEL, CVT70XRF) are no longer listed. Once a member has been excluded (or compressed for not matching a FIND/CHANGE) it can only be redisplayed by using the RESET command or returning to the Search/Update entry screen.
Use the CHANGE command without parameters to access the CHANGE command prompt screen.
Search/Update Utility - Member List After Edit and Excludes
Steps:
- Type CHANGE in the command line
- Press Enter.
Using the CHANGE Command Prompt Screen
The CHANGE command prompt screen in the PDS Find/Change utility is similar to the File-AID Edit CHANGE command screen. Basically, you specify the "From string" and the "To string", set any other optional parameters you want and press Enter.
Usually you use the CO (Contains) relational operator and leave the "Start column" and "End column" fields blank to search from the beginning to the end of each record.
Search/Update Utility - Specify CHANGE Parameters
Steps:
- Type ????????.FA.VVRRMM.LOAD in the "From string"
- Type SYS9.FA.MXVJ170.SXVJLOAD in the "To string"
- Type CO in the "Relational operator" field
- Type Y in the "Confirm changes" field
- Type N in the "Condense member list" field
- Type Y in the "PDS Statistics" field
- Type ALL in the "Maximum changes" field
- Press Enter.
More About the CHANGE Command Prompt Screen
- Most of the entries you make on this screen are saved from session to session (From and To strings reset on exit from 3.6).
- The "Confirm changes" field gives you a chance to preview your changes before you apply them. You may optionally print the preview if you choose.
- The "Condense member list" field gives you a option to automatically exclude from the member list all those members which did not contain the "From string".
- The "Maximum changes" field lets you control the number of changes to preview (Confirm = yes) or apply (Confirm = no). When you confirm your preview of changes, you may specify a different value (ALL for example) for number of changes to apply.
- Advanced users can issue the CHANGE command on the PDS Find/Change Member List command line by using the correct syntax. A sample of the syntax is shown in the lower portion of the prompt screen. For example,
CHANGE ABC XYZ NOCONDENSE.
Viewing the Change Results Preview
File-AID scans all members listed, then copies matching records to a temporary work file where it applies your change. The temporary work file is then presented using ISPF Browse as shown in the following figure.
When you are done viewing the changes, use the END command to continue to the Confirm Update screen.
The results preview is not shown if you specify the NOCONFIRM parameter with the CHANGE command or set the "Preview changes" field to N on the CHANGE command prompt screen.
Search/Update Utility - CHANGE Results Preview
Use the END primary command (PF3) in the COMMAND field to continue to the Confirm Update screen.
Confirming Your Update
When you END from the preview of changes, the Confirm Update screen is presented as shown in the following figure. Press Enter to apply the changes and to return to the member list.
Optionally, you may request a report of your previewed changes or change the maximum number of changes to perform. If you request printing, a Print Options screen (not shown here) is displayed to capture your report destination (Sysout or data set).
Search/Update Utility - Confirm Update screen
Press Enter to perform the update and return to the member list.
More About Confirm Update
- If your initial data set disposition was SHR, a CAUTION message appears to warn you of the potential of another user simultaneously editing a member you are about to update. If this condition exists and a member you update is saved by another user, your change could be lost. If this is a concern, use the OLD disposition when performing changes.
- To print without updating, change the "Perform update" field to N and the "Print previewed changes" field to Y, then press Enter.
- To return to the member list without printing or performing your update, use the END command (PF3).
Returning to the Search/Update Entry Screen
The member list is redisplayed after performing your update as shown in the following figure. Note the confirmation message on line three of the screen:
XVJER042 ER042-Records-read=263 updated=9 with 9 changes.
Observe the HITS count indicating the number of times the change was performed in each member. Some members show a HITS count of 0 (zero). If you had requested the "Condense member list = Y" option, these members would not appear but would be excluded.
You may continue to work with your list of members, using the B (Browse) and S (Edit) line commands and the FIND and CHANGE primary commands.
The END command returns you to the Search/Update Utility screen.
Search/Update Utility - Member List After CHANGE
Use the END primary command (PF3) to return to the Search/Update entry screen.
Related topics