Saturday, November 17, 2012

File-Aid: Scanning and Updating Datasets



Chapter 6. Scanning and Updating Datasets

The File-AID 3.6 Search/Update utility is a powerful utility for scanning and making changes to any MVS file, including CA-Panvalet and CA-Librarian libraries.
The M suboption (PDS Find/Change and Member List Processing) gives you an easy to use FIND command to isolate a list of members matching your criteria. For PDS datasets you may use the CHANGE command to perform changes across all or selected members.

6.1 Accessing the Search/Update Utility (Option 3.6)

The Search/Update utility is located on File-AID's Extended Utilities menu (Option 3) as utility number 6.
Step:
  1. From the File-AID Primary Option Menu (not shown here), select File-AID option 3.6 to access the Search/Update utility entry screen (Figure 6-1). Note: When viewing a list of datasets presented by the File-AID 3.4 Catalog utility or 3.7 VTOC utility, you can select a dataset for Search/Update processing by issuing the line command 6.

6.2 Defining Your Search/Update Request

The Search/Update entry screen (see Figure 6-1) captures your:
  • Main request option:
    • M for PDS Find/Change and Member List Processing
    • B for scanning any dataset
    • U for dataset global change preview and update (including PDS, Panvalet, and Librarian libraries)
  • Dataset name
  • Disposition (options M and U only: SHR or OLD)
  • Processing option: online or batch
  • Standard File-AID selection criteria usage (options M and B only):
    • N - No selection criteria - process all records
    • E - Use existing criteria member
    • M - Modify an existing criteria member
    • T - Create new temporary selection criteria
    • Q - Create new temporary unformatted selection criteria
Figure 6-1. Search/Update Utility Entry Screen
+-------------------------------------------------------------------------------
| File-AID ------------------  Search/Update Utility  ---------------------------|
| OPTION ===>                                                                    |
|                                                                                |
|  M  Member - PDS Find/Change and Member list processing                        |
|  B  Browse - Browse globally                                                   |
|  U  Update - Preview and Update globally                                       |
|                                                                                |
|  Specify Search/Update Dataset Information:                                    |
|     Dataset name   ===> FASAMP.JCL                                             |
|     Disposition    ===> SHR                  (OLD or SHR)                      |
|     Volume serial  ===>                      (If not cataloged)                |
|                                                                                |
|  Process online or batch       ===> O        (O = Online; B = Batch)           |
|                                                                                |
|  Specify Execution Information:              (Option U online)                 |
|     Create audit trail         ===> N        (Y = Yes; N = No)                 |
|     Preview and confirm update ===> Y        (Y = Yes; N = No)                 |
|     Maximum changes            ===> ALL      (All or number of changes)        |
|                                                                                |
|  Specify Selection Criteria Information:     (Options M and B)                 |
|     Selection criteria usage   ===> N        (Existing; Temp; Mod; Quick; None)|
|     Selection dataset name     ===>                                            |
|     Member name                ===>          (Blank or pattern for member list)|
|                                                                                |
+-------------------------------------------------------------------------------

When option U is requested, selection criteria usage is ignored. The Search/Update utility automatically provides temporary unformatted selection criteria for defining your change. For option M (PDS Find/Change) online, you may use selection criteria to limit the initial member list to only those members which contain matching records.
For all options, you may set the "Process online or batch" field to perform your Search/Update request online (O) at your terminal, or to generate JCL for File-AID/Batch execution as a background (B) job in MVS.
When running option U (Update) online, special processing options you may request include:
  • An audit trail report of changes applied
  • A preview of your changes (which you may optionally print after viewing)
  • A limit to the number of changes you wish to preview or apply.
Full support for updating Panvalet and Librarian libraries is available in the U (Update) option. When you select online processing, you may see a preview of the change statements. Updating is always performed in batch as a background job in MVS. File-AID automatically generates the correct JCL for the appropriate update utility. If you just wish to scan Panvalet or Librarian libraries, you may choose either the M option to work with a member list matching your FIND command entries, or the B option to generate a display or report summarizing the members matching your selection criteria.

6.3 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.
Figure 6-2. Search/Update Utility Entry Screen
+-------------------------------------------------------------------------------
| File-AID ------------------  Search/Update Utility  ---------------------------|
| OPTION ===> M                                                                  |
|                                                                                |
|  M  Member - PDS Find/Change and Member list processing                        |
|  B  Browse - Browse globally                                                   |
|  U  Update - Preview and Update globally                                       |
|                                                                                |
|  Specify Search/Update Dataset Information:                                    |
|     Dataset name   ===> FASAMP.JCL                                             |
|     Disposition    ===> SHR       (OLD or SHR)                                 |
|     Volume serial  ===>                      (If not cataloged)                |
|                                                                                |
|  Process online or batch       ===> O        (O = Online; B = Batch)           |
|                                                                                |
|  Specify Execution Information:              (Option U online)                 |
|     Create audit trail         ===> N        (Y = Yes; N = No)                 |
|     Preview and confirm update ===> Y        (Y = Yes; N = No)                 |
|     Maximum changes            ===> ALL      (All or number of changes)        |
|                                                                                |
|  Specify Selection Criteria Information:     (Options M and B)                 |
|     Selection criteria usage   ===> Q        (Existing; Temp; Mod; Quick; None)|
|     Selection dataset name     ===>                                            |
|     Member name                ===>          (Blank or pattern for member list)|
|                                                                                |
+-------------------------------------------------------------------------------

Steps:
  1. Type M in the OPTION field.
  2. Enter FASAMP.JCL in the Dataset name field.
  3. Enter the Disposition as SHR.
  4. Make sure processing option is O (online).
  5. Type Q in the selection criteria usage field. Q (Quick) requests temporary unformatted field selection criteria only.
  6. Press <Enter>.
More About the Search/Update Entry Screen
  • Standard File-AID dataset and member name entry is supported including using a wildcard character in either dataset name (for example, FASAMP.*) or member name (for example, FASAMP.JCL(CNV*)).
  • For option M only, the dataset 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.

6.3.1 Using PDS Member Selection Features

When your dataset 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 thru 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.
Figure 6-3. Search/Update Utility - PDS Processing Options Screen
+-------------------------------------------------------------------------------
| File-AID ----------------- PDS Processing Options -----------------------------|
| COMMAND ===>                                                                   |
|                                                                                |
| Dataset: USERID9.FASAMP.JCL                                                    |
|                                                                                |
|                                                                                |
|     Process in JCL format         ===> N        (Y = Yes; N = No)              |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
| Specify Member Selection Options (Blank for All Members)                       |
|     Member name mask              ===>                                         |
|     Member name range             ===>          to ===>                        |
|     Last modified userid          ===>          to ===>                        |
|     Creation date                 ===>          to ===>          (YY/MM/DD)    |
|     Modification date             ===>          to ===>          (YY/MM/DD)    |
|                                                                                |
|                                                                                |
|                                                                                |
| Use ENTER to continue, END to return to dataset specification screen           |
|                                                                                |
|                                                                                |
+-------------------------------------------------------------------------------

Step:
  1. 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(*).

6.3.2 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 Figure 6-4. 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".
Figure 6-4. Search/Update Utility - Unformatted Field Selection Criteria Screen
+-------------------------------------------------------------------------------
| File-AID -------------  Unformatted Selection Criteria  ---  ROW 1 TO 16 OF 25 |
| COMMAND ===> END                                              SCROLL ===> CSR  |
|                                                                                |
| Use END command to continue, use CANCEL command to return to main screen.      |
|                                                                                |
|     AND                                                                        |
| Cmd /OR Position Length RO                      Data Value                     |
| --- --- -------- ------ -- ----------------------------------------------------|
| ___      1____   _____  CO PGM=FILEAID_________________________________________|
| ___ AND  _____   _____  EQ ____________________________________________________|
| ___ AND  _____   _____  EQ ____________________________________________________|
| ___ AND  _____   _____  EQ ____________________________________________________|
| ___ AND  _____   _____  EQ ____________________________________________________|
| ___ AND  _____   _____  EQ ____________________________________________________|
| ___ AND  _____   _____  EQ ____________________________________________________|
| ___ AND  _____   _____  EQ ____________________________________________________|
| ___ AND  _____   _____  EQ ____________________________________________________|
| ___ AND  _____   _____  EQ ____________________________________________________|
| ___ AND  _____   _____  EQ ____________________________________________________|
| ___ AND  _____   _____  EQ ____________________________________________________|
| ___ AND  _____   _____  EQ ____________________________________________________|
| ___ AND  _____   _____  EQ ____________________________________________________|
| ___ AND  _____   _____  EQ ____________________________________________________|
| ___ AND  _____   _____  EQ ____________________________________________________|
|                                                                                |
+-------------------------------------------------------------------------------

Steps:
  1. On the first line type 1 in the Position column.
  2. Type CO in the RO column.
  3. Type PGM=FILEAID in the Data Value area.
  4. 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 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), and VA (Valid).
  • 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).

6.3.3 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 Figure 6-5.
Figure 6-5. Search/Update Utility - PDS Find/Change Member List (M Option)
+-------------------------------------------------------------------------------
| File-AID - PDS Find/Change - USERID9.FASAMP.JCL -----------  ROW 1 TO 15 OF 15 |
| COMMAND ===>                                                  SCROLL ===> PAGE |
|  Use FIND or CHANGE command to process across the following members.           |
|  (Omit FIND/CHANGE operands for a prompt panel.)                               |
|  Use RESET command to get a full member list.                                  |
|  Use E, S, B or X line commands to Edit, Browse or eXclude members.            |
|--------------------------------------------------------------------------------|
|  S  NAME        HITS VV.MM  CREATED     CHANGED      SIZE  INIT   MOD   ID     |
|    BATVTOC         1 01.00 95/02/06 95/02/06 11:08     23    23     0 USERID9  |
|  S COPY            1 01.00 95/02/06 95/02/06 11:08     22    22     0 USERID9  |
|  X CVT6XMAP        1 01.00 95/02/06 95/02/06 11:08     37    37     0 USERID9  |
|  X CVT70SEL        1 01.00 95/02/06 95/02/06 11:08     22    22     0 USERID9  |
|  X CVT70XRF        1 01.00 95/02/06 95/02/06 11:08     21    21     0 USERID9  |
|    DROP            1 01.00 95/02/06 95/02/06 11:08     20    20     0 USERID9  |
|    DUMP            1 01.00 95/02/06 95/02/06 11:08     18    18     0 USERID9  |
|    JCLCNVRT        1 01.00 95/02/06 95/02/06 11:08     23    23     0 USERID9  |
|    LIST            1 01.00 95/02/06 95/02/06 11:08     17    17     0 USERID9  |
|    PRINT           1 01.00 95/02/06 95/02/06 11:08     18    18     0 USERID9  |
|    SKELETON        1 01.00 95/02/06 95/02/06 11:08     23    23     0 USERID9  |
|    SPACE           1 01.00 95/02/06 95/02/06 11:08     20    20     0 USERID9  |
|    TALLY           1 01.00 95/02/06 95/02/06 11:08     21    21     0 USERID9  |
|    UPDATE          1 01.00 95/02/06 95/02/06 11:08     27    27     0 USERID9  |
|    USER            1 01.00 95/02/06 95/02/06 11:08     31    31     0 USERID9  |
| ******************************* BOTTOM OF DATA ********************************|
|                                                                                |
|                                                                                |
|                                                                                |
+-------------------------------------------------------------------------------

Steps:
  1. Use the S (Select for PDF/Edit) line command in the S column to the left of member COPY.
  2. Use the X (Exclude) line command to the left of the members: CVT6XMAP, CVT70SEL, and CVT70XRF.
  3. Press <Enter>.

6.3.4 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 S or E (Select for Edit) line command, File-AID invokes an ISPF Edit session on the member as shown below in Figure 6-6.
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:
  1. Notice the //JOBLIB DD and the DSN=????????.FA.VVRRMM.LOAD string. Later in this example you specify a CHANGE to this DSN.
  2. Use the END primary command (PF3) to return to the member list.
Figure 6-6. Search/Update Utility - Edit Session From Member List
+-------------------------------------------------------------------------------
| EDIT ---- USERID9.FASAMP.JCL(COPY) - 01.00 ------------------- COLUMNS 001 072 |
| COMMAND ===> END                                              SCROLL ===> PAGE |
| ****** ***************************** TOP OF DATA ******************************|
| 000001 //??????A  JOB (####,CCCC),'YOUR USERNAME',                             |
| 000002 //             CLASS=A,TIME=2,MSGCLASS=A,NOTIFY=??????                  |
| 000003 //*                                                                     |
| 000004 //* THIS IS A SAMPLE JOB TO COPY AN INPUT DATASET TO AN OUTPUT DATASET. |
| 000005 //* ONLY THOSE RECORDS WHICH MEET THE FOLLOWING CRITERIA WILL BE COPIED |
| 000006 //* AND PRINTED.                                                        |
| 000007 //* - IF POSITION 1 IS EQUAL TO '3'                                     |
| 000008 //* - IF POSITION 56 IS EQUAL TO 'A' OR 'B'                             |
| 000009 //*                                                                     |
| 000010 //JOBLIB   DD  DSN=????????.FA.VVRRMM.LOAD,DISP=SHR                     |
| 000011 //STEP1    EXEC PGM=FILEAID                                             |
| 000012 //SYSPRINT DD  SYSOUT=*                                                 |
| 000013 //SYSLIST  DD  SYSOUT=*                                                 |
| 000014 //SYSTOTAL DD  SYSOUT=*                                                 |
| 000015 //SYSUDUMP DD  SYSOUT=*                                                 |
| 000016 //DD01     DD  DSN=??????.FASAMP.INVFILE,DISP=SHR                       |
| 000017 //DD01O    DD  DSN=??????.FASAMP.INVCOPY,DISP=(NEW,CATLG,DELETE),       |
| 000018 //             UNIT=####,SPACE=(TRK,(1,1))                              |
| 000019 //SYSIN    DD  *                                                        |
| 000020 $$DD01 COPY RDW=3,IF=(1,EQ,C'3'),IF=(56,EQ,C'A,B'),PRINT=0              |
| 000021 /*                                                                      |
+-------------------------------------------------------------------------------

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.

6.3.5 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.
Figure 6-7. Search/Update Utility - Member List After Edit and Excludes
+-------------------------------------------------------------------------------
| File-AID - PDS Find/Change - USERID9.FASAMP.JCL -----------  ROW 1 TO 12 OF 12 |
| COMMAND ===> CHANGE                                           SCROLL ===> PAGE |
|  Use FIND or CHANGE command to process across the following members.           |
|  (Omit FIND/CHANGE operands for a prompt panel.)                               |
|  Use RESET command to get a full member list.                                  |
|  Use E, S, B or X line commands to Edit, Browse or eXclude members.            |
|--------------------------------------------------------------------------------|
|  S  NAME        HITS VV.MM  CREATED     CHANGED      SIZE  INIT   MOD   ID     |
|    BATVTOC         1 01.00 95/02/06 95/02/06 11:08     23    23     0 USERID9  |
|    COPY            1 01.00 95/02/06 95/02/06 11:08     22    22     0 USERID9  |
|    DROP            1 01.00 95/02/06 95/02/06 11:08     20    20     0 USERID9  |
|    DUMP            1 01.00 95/02/06 95/02/06 11:08     18    18     0 USERID9  |
|    JCLCNVRT        1 01.00 95/02/06 95/02/06 11:08     23    23     0 USERID9  |
|    LIST            1 01.00 95/02/06 95/02/06 11:08     17    17     0 USERID9  |
|    PRINT           1 01.00 95/02/06 95/02/06 11:08     18    18     0 USERID9  |
|    SKELETON        1 01.00 95/02/06 95/02/06 11:08     23    23     0 USERID9  |
|    SPACE           1 01.00 95/02/06 95/02/06 11:08     20    20     0 USERID9  |
|    TALLY           1 01.00 95/02/06 95/02/06 11:08     21    21     0 USERID9  |
|    UPDATE          1 01.00 95/02/06 95/02/06 11:08     27    27     0 USERID9  |
|    USER            1 01.00 95/02/06 95/02/06 11:08     31    31     0 USERID9  |
| ******************************* BOTTOM OF DATA ********************************|
|                                                                                |
|                                                                                |
|                                                                                |
+-------------------------------------------------------------------------------

Steps:
  1. Type CHANGE in the command line
  2. 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.
Figure 6-8. Search/Update Utility - Specify CHANGE Parameters
+-------------------------------------------------------------------------------
| File-AID -------------------  PDS Change Command  -----------------------------|
|                                                                                |
| COMMAND ===>                                                                   |
|                                                                                |
|  From string          ===> ????????.FA.VVRRMM.LOAD                             |
|  To string            ===> SYS9.FA.V8R0M0.LOAD                                 |
|                                                                                |
|  Start column         ===>        End column ===>                              |
|                                                                                |
|  Relational operator  ===> CO     (CO, EQ, NE, LT, LE, GE, GT)                 |
|                                                                                |
|  Confirm changes      ===> Y      (Y = Yes; N = No)                            |
|  Condense member list ===> N      (Y = Yes; N = No)                            |
|  PDS statistics       ===> Y      (Y = Yes; N = No; A = Add)                   |
|                                                                                |
|  Maximum changes      ===> ALL    (ALL or number of changes)                   |
|                                                                                |
| You may bypass this screen by entering the CHANGE command with operands:       |
|                                                                                |
| C(HANGE) string-1 string-2 ((NO)CONFirm) ((NO)CONDense) (col-1 (col-2)) Max(n) |
|                                                                                |
| EXAMPLES:  c abc xyz         change abc (upper or lower case) to XYZ           |
|            c c'Abc' c'xyz'   change Abc (exactly as entered) to xyz            |
|            c a,b,c xyz       change a or b or c (upper or lower case) to XYZ   |
|            c "a,b,c" xyz     change a,b,c (upper or lower case) to XYZ         |
+-------------------------------------------------------------------------------

Steps:
  1. Type ????????.FA.VVRRMM.LOAD in the "From string"
  2. Type SYS9.FA.V8R0M0.LOAD in the "To string"
  3. Type CO in the "Relational operator" field
  4. Type Y in the "Confirm changes" field
  5. Type N in the "Condense member list" field
  6. Type Y in the "PDS Statistics" field
  7. Type ALL in the "Maximum changes" field
  8. 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 Figure 6-9.
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.
Figure 6-9. Search/Update Utility - CHANGE Results Preview
+-------------------------------------------------------------------------------
| BROWSE -- USERID9.D95089.T120922.FILEAID ----------- LINE 00000000 COL 001 080 |
| COMMAND ===> END                                              SCROLL ===> CSR  |
| ER041-Records-read=263 listed=9 with 9 changes                                 |
|==>USERID9.FASAMP.JCL OPENED AS PO,RECFM=FB,LRECL=80,BLKSIZE=3120,VOL=PRD912    |
|********************************MEMBER  BATVTOC ********************************|
|//JOBLIB   DD  DSN=SYS9.FA.V8R0M0.LOAD,DISP=SHR                                 |
|********************************MEMBER  COPY    ********************************|
|//JOBLIB   DD  DSN=SYS9.FA.V8R0M0.LOAD,DISP=SHR                                 |
|********************************MEMBER  DROP    ********************************|
|//JOBLIB   DD  DSN=SYS9.FA.V8R0M0.LOAD,DISP=SHR                                 |
|********************************MEMBER  DUMP    ********************************|
|//JOBLIB   DD  DSN=SYS9.FA.V8R0M0.LOAD,DISP=SHR                                 |
|********************************MEMBER  PRINT   ********************************|
|//JOBLIB   DD  DSN=SYS9.FA.V8R0M0.LOAD,DISP=SHR                                 |
|********************************MEMBER  SPACE   ********************************|
|//JOBLIB   DD  DSN=SYS9.FA.V8R0M0.LOAD,DISP=SHR                                 |
|********************************MEMBER  TALLY   ********************************|
|//JOBLIB   DD  DSN=SYS9.FA.V8R0M0.LOAD,DISP=SHR                                 |
|********************************MEMBER  UPDATE  ********************************|
|//JOBLIB   DD  DSN=SYS9.FA.V8R0M0.LOAD,DISP=SHR                                 |
|********************************MEMBER  USER    ********************************|
|//JOBLIB   DD  DSN=SYS9.FA.V8R0M0.LOAD,DISP=SHR                                 |
|******************************** BOTTOM OF DATA ********************************|
+-------------------------------------------------------------------------------

Step:
  1. 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 Figure 6-10. 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 dataset).
Figure 6-10. Search/Update Utility - Confirm Update Screen
+-------------------------------------------------------------------------------
| File-AID --------------  Search/Update Confirm Update  ------------------------|
| COMMAND ===>                                                                   |
| ER041-Records-read=263 listed=9 with 9 changes                                 |
|                                                                                |
|                                                                                |
|  Ready to perform update                                                       |
|                                                                                |
|  Perform update           ===> Y       (Y = Yes; N = No)                       |
|  Print previewed changes  ===> N       (Y = Yes; N = No)                       |
|  Maximum changes          ===> ALL     (All or number of changes to perform)   |
|                                                                                |
|  Instructions:                                                                 |
|                                                                                |
|  Use ENTER to perform above actions and return to the initial screen           |
|  Use END to exit without UPDATE or PRINT                                       |
|                                                                                |
|                                                                                |
|  CAUTION:  DISP=SHR was specified.  Other users may be editing this            |
|            file and some of your changes may be lost.                          |
|                                                                                |
|                                                                                |
|                                                                                |
+-------------------------------------------------------------------------------

Step:
  1. Press <Enter> to perform the update and return to the member list.
More About Confirm Update
  • If your initial dataset 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 Figure 6-11. Note the confirmation message on line three of the screen: 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.
Figure 6-11. Search/Update Utility - Member List After CHANGE
+-------------------------------------------------------------------------------
| File-AID - PDS Find/Change - USERID9.FASAMP.JCL -----------  ROW 1 TO 12 OF 12 |
| COMMAND ===> END                                           SCROLL ===> PAGE    |
| ER042-Records-read=263 updated=9 with 9 changes                                |
|  (Omit FIND/CHANGE operands for a prompt panel.)                               |
|  Use RESET command to get a full member list.                                  |
|  Use E, S, B or X line commands to Edit, Browse or eXclude members.            |
|--------------------------------------------------------------------------------|
|  S  NAME        HITS VV.MM  CREATED     CHANGED      SIZE  INIT   MOD   ID     |
|    BATVTOC         1 01.00 95/02/06 95/02/06 11:08     23    23     0 USERID9  |
|    COPY            1 01.00 95/02/06 95/02/06 11:08     22    22     0 USERID9  |
|    DROP            1 01.00 95/02/06 95/02/06 11:08     20    20     0 USERID9  |
|    DUMP            1 01.00 95/02/06 95/02/06 11:08     18    18     0 USERID9  |
|    JCLCNVRT        0 01.00 95/02/06 95/02/06 11:08     23    23     0 USERID9  |
|    LIST            0 01.00 95/02/06 95/02/06 11:08     17    17     0 USERID9  |
|    PRINT           1 01.00 95/02/06 95/02/06 11:08     18    18     0 USERID9  |
|    SKELETON        0 01.00 95/02/06 95/02/06 11:08     23    23     0 USERID9  |
|    SPACE           1 01.00 95/02/06 95/02/06 11:08     20    20     0 USERID9  |
|    TALLY           1 01.00 95/02/06 95/02/06 11:08     21    21     0 USERID9  |
|    UPDATE          1 01.00 95/02/06 95/02/06 11:08     27    27     0 USERID9  |
|    USER            1 01.00 95/02/06 95/02/06 11:08     31    31     0 USERID9  |
| ******************************* BOTTOM OF DATA ********************************|
|                                                                                |
|                                                                                |
+-------------------------------------------------------------------------------

Step
  1. Use the END primary command (PF3) to return to the Search/Update entry screen.

6.4 Scanning Datasets for Specific Records (Option B)

The Search/Update B (Browse) option lets you scan any type of file. When scanning a PDS, File-AID treats the PDS as one big sequential file and shows all records matching your search criteria in the browse result file.
The name of each PDS member containing your record(s) is shown as an information line in the result file.
In this example, you use the optional manual member selection list processing feature of the PDS Processing Options (PPO) screen.
You view all records containing PGM=FILEAID.
Figure 6-12. Search/Update Utility - Browse PDS (Option B)
+-------------------------------------------------------------------------------
| File-AID ------------------  Search/Update Utility  ------- FUNCTION COMPLETED |
| OPTION ===> B                                                                  |
|                                                                                |
|  M  Member - PDS Find/Change and Member list processing                        |
|  B  Browse - Browse globally                                                   |
|  U  Update - Preview and Update globally                                       |
|                                                                                |
|  Specify Search/Update Dataset Information:                                    |
|     Dataset name   ===> FASAMP.JCL                                             |
|     Disposition    ===> SHR                  (OLD or SHR)                      |
|     Volume serial  ===>                      (If not cataloged)                |
|                                                                                |
|  Process online or batch       ===> O        (O = Online; B = Batch)           |
|                                                                                |
|  Specify Execution Information:              (Option U online)                 |
|     Create audit trail         ===> N        (Y = Yes; N = No)                 |
|     Preview and confirm update ===> Y        (Y = Yes; N = No)                 |
|     Maximum changes            ===> ALL      (All or number of changes)        |
|                                                                                |
|  Specify Selection Criteria Information:     (Options M and B)                 |
|     Selection criteria usage   ===> Q        (Existing; Temp; Mod; Quick; None)|
|     Selection dataset name     ===>                                            |
|     Member name                ===>          (Blank or pattern for member list)|
|                                                                                |
+-------------------------------------------------------------------------------

Steps:
  1. Type a B in the OPTION field.
  2. Press <Enter>.

6.4.1 Requesting PDS Member Selection Processing

Since you are scanning a PDS, the PDS Processing Options (PPO) screen is displayed to let you specify processing options and member selection.
You select members whose names fall in the range D through U and request a display of the Member Selection List.
Figure 6-13. Search/Update Utility Option B - PDS Processing Options
+-------------------------------------------------------------------------------
|  File-AID ----------------- PDS Processing Options ----------------------------|
|  COMMAND ===>                                                                  |
|                                                                                |
|  Dataset: USERID9.FASAMP.JCL                                                   |
|                                                                                |
|      Include record information    ===> N        (Y = Yes; N = No)             |
|      Process in JCL format         ===> N        (Y = Yes; N = No)             |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|  Specify Member Selection Options (Blank for All Members)                      |
|      Member name mask              ===>                                        |
|      Member name range             ===> D        to ===> U                     |
|      Last modified userid          ===>          to ===>                       |
|      Creation date                 ===>          to ===>          (YY/MM/DD)   |
|      Modification date             ===>          to ===>          (YY/MM/DD)   |
|                                                                                |
|      Display member selection list ===> Y        (Y = Yes; N = No)             |
|                                                                                |
|  Use ENTER to continue, END to return to dataset specification screen          |
|                                                                                |
+-------------------------------------------------------------------------------

Steps:
  1. Type a D in the "Member name" range (from) and U in the corresponding "to" field.
  2. Type a Y in the "Display member selection list" field. The "Display member selection list" field displays only for Search/Update options B (Browse) and U (Update) and in the Copy utility (3.3) and Print functions (5.x). You may set a default (Y/N) for this field in the 0.4 Processing Parameters function.
  3. Press <Enter>.
Using the Manual Member S/X Selection List
When you specify a Y in the "Display member selection list" field, File-AID displays a list of members that match the specified PPO ranges.
You must either:
  • Select one or more members using the S or SS (block) line command; or,
  • Exclude one or more members using the X or XX (block) line command.
Only those members that you select are examined to see if they have any records matching any selection criteria you specify.
After using the S or X line commands to indicate which of your member(s) are to be selected or excluded, use the END command or PF key (default PF3) to continue processing your scan.
Figure 6-14. Search/Update Utility - Member S/X List Processing
+-------------------------------------------------------------------------------
| File-AID Member S/X - USERID9.FASAMP.JCL ------------------  ROW 1 TO 12 OF 12 |
| COMMAND ===> END                                              SCROLL ===> PAGE |
|S/X  NAME             VV.MM  CREATED     CHANGED      SIZE  INIT   MOD   ID     |
|    DROP              01.01 95/02/06 95/03/30 12:16     20    20     0 USERID9  |
|    DUMP              01.01 95/02/06 95/03/30 12:16     18    18     0 USERID9  |
|    JCLCNVRT          01.00 95/02/06 95/02/06 11:08     23    23     0 USERID9  |
|    LIST              01.00 95/02/06 95/02/06 11:08     17    17     0 USERID9  |
|    PRINT             01.01 95/02/06 95/03/30 12:16     18    18     0 USERID9  |
| XX SAMPLE01          01.00 95/02/06 95/02/06 11:08     14    14     0 USERID9  |
|    SAMPLE02          01.00 95/02/06 95/02/06 11:08     17    17     0 USERID9  |
| XX SKELETON          01.00 95/02/06 95/02/06 11:08     23    23     0 USERID9  |
|    SPACE             01.01 95/02/06 95/03/30 12:16     20    20     0 USERID9  |
|    TALLY             01.01 95/02/06 95/03/30 12:16     21    21     0 USERID9  |
|    UPDATE            01.01 95/02/06 95/03/30 12:16     27    27     0 USERID9  |
|    USER              01.01 95/02/06 95/03/30 12:16     31    31     0 USERID9  |
| ******************************* BOTTOM OF DATA ********************************|
|                                                                                |
|                                                                                |
+-------------------------------------------------------------------------------

Steps:
  1. Type XX line commands to the left of the SAMPLE01 and SKELETON members.
  2. Use the END command or PF key (PF3) to continue processing.
More About the Manual Member Selection List
  • You may use S (or SS) to select members; any members not selected are excluded.
  • You may use X (or XX) to exclude members; any members not excluded are selected.
  • You cannot mix the S and X line commands.
  • If you press <Enter> after marking one or more members (S or X), each member marked is indicated with the word SELECTED or EXCLUDED.
  • At least one member must be marked (S or X).
Specify Selection Criteria
Because you requested selection criteria usage Q (Quick), the next screen displayed is the Unformatted Selection Criteria screen (see Figure 6-15). Temporary criteria last used remains in memory until you exit the current utility so that you can re-use the values.
You leave the criteria the same as before to see the difference in the browse results when using the B option instead of the M option.
Figure 6-15. Search/Update Utility - Quick Unformatted Selection Criteria
+-------------------------------------------------------------------------------
| File-AID -------------  Unformatted Selection Criteria  -----  ROW 1 TO 1 OF 1 |
| COMMAND ===> END                                              SCROLL ===> CSR  |
|                                                                                |
| Use END command to continue, use CANCEL command to return to main screen.      |
|                                                                                |
|     AND                                                                        |
| Cmd /OR Position Length RO                      Data Value                     |
| --- --- -------- ------ -- ----------------------------------------------------|
| ___      1              CO T'PGM=FILEAID'                                      |
| ************************** END OF SELECTION CRITERIA **************************|
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
+-------------------------------------------------------------------------------

Step:
  1. Use the END command (PF3) to continue processing.
More About Selection Criteria
  • The selection shown above scans records from position 1 to the end of the record to see if the record contains (CO) the text string PGM=FILEAID (any case).
  • Line commands (Cmd) you may use include:
    D(n) Delete (n) lines (for example, D, D2, D99)
    I(n) Insert (n) lines (for example, I, I2, I99)
    R(n) Repeat this line (n) times (for example, R, R2)
    C(n) Copy (n) lines to destination marker (A (After) or B (Before)
    M(n) Move (n) lines to destination marker (A (After) or B (Before).
  • Use the CANCEL command to stop Browse processing and return to the Search/Update Utility screen. Note: The CANCEL command clears all temporary criteria entries.
Browsing Scan Results
The selected members are scanned for matching records and the results are written to a temporary work file. You are then placed into an ISPF Browse session on the work file.
All standard browse commands are valid, including the scroll commands, FIND, HEX, and COLS.
Each PDS member is identified with a record containing a line of asterisks and the PDS member name.
A message is displayed near the top of the screen to indicate the number of records read and matched (selected) in the selected members. A dataset OPENED information line is also included in the results to show the attributes of the dataset that was scanned.
Figure 6-16. Search/Update Utility. Scanning Results in Work File (Option B)
+-------------------------------------------------------------------------------
| BROWSE -- USERID9.D94136.T105329.FILEAID ----------- LINE 00000000 COL 001 080 |
| COMMAND ===> END                                              SCROLL ===> PAGE |
|FA223- Records read = 58, selected = 9, error records skipped = 0               |
|==>USERID9.FASAMP.JCL OPENED AS PO,RECFM=FB,LRECL=80,BLKSIZE=3120,VOL=PRD904    |
|********************************MEMBER  DROP    ********************************|
|//STEP1    EXEC PGM=FILEAID                                                     |
|********************************MEMBER  DUMP    ********************************|
|//STEP1    EXEC PGM=FILEAID                                                     |
|********************************MEMBER  JCLCNVRT********************************|
|//STEP1    EXEC PGM=FILEAID                                                     |
|********************************MEMBER  LIST    ********************************|
|//STEP1    EXEC PGM=FILEAID                                                     |
|********************************MEMBER  PRINT   ********************************|
|//STEP1    EXEC PGM=FILEAID                                                     |
|********************************MEMBER  SPACE   ********************************|
|//STEP1    EXEC PGM=FILEAID                                                     |
|********************************MEMBER  TALLY   ********************************|
|//STEP1    EXEC PGM=FILEAID                                                     |
|********************************MEMBER  UPDATE  ********************************|
|//STEP1    EXEC PGM=FILEAID                                                     |
|********************************MEMBER  USER    ********************************|
|//STEP1    EXEC PGM=FILEAID                                                     |
|******************************** BOTTOM OF DATA ********************************|
|                                                                                |
|                                                                                |
+-------------------------------------------------------------------------------

Step:
  1. Use the END command (PF3) to return to the Search/Update Utility screen.

6.5 Specifying Global Changes - (Option U)

The Search/Update option U (update) lets you specify, preview, and apply global changes to any type of file. Support is provided for updating Panvalet and Librarian libraries as well as any type of standard MVS file including: VSAM-KSDS, VSAM-RRDS, VSAM-ESDS, ISAM, BDAM, IAM, sequential and PDS. Updating of VSAM-LINEAR is not currently supported.
Options provided for Update processing let you select online or batch processing. For online processing, you may select to preview (and print) your changes before you update the file. You may also request an optional audit trail of your changes.
In this example, you set up a simple change to the program name. You change program name FILEAID to FILEAID8. Since your dataset is a PDS, you use a member name of asterisk (*) to select all members for processing and to bypass the PPO screens.
Figure 6-17. Search/Update Utility. Updating All Members of a PDS (Option U).
+-------------------------------------------------------------------------------
| File-AID ------------------  Search/Update Utility  ---------------------------|
| OPTION ===> U                                                                  |
|                                                                                |
|  M  Member - PDS Find/Change and Member list processing                        |
|  B  Browse - Browse globally                                                   |
|  U  Update - Preview and Update globally                                       |
|                                                                                |
|  Specify Search/Update Dataset Information:                                    |
|     Dataset name   ===> FASAMP.JCL(*)                                          |
|     Disposition    ===> SHR                  (OLD or SHR)                      |
|     Volume serial  ===>                      (If not cataloged)                |
|                                                                                |
|  Process online or batch       ===> O        (O = Online; B = Batch)           |
|                                                                                |
|  Specify Execution Information:              (Option U online)                 |
|     Create audit trail         ===> N        (Y = Yes; N = No)                 |
|     Preview and confirm update ===> Y        (Y = Yes; N = No)                 |
|     Maximum changes            ===> ALL      (All or number of changes)        |
|                                                                                |
|  Specify Selection Criteria Information:     (Options M and B)                 |
|     Selection criteria usage   ===> N        (Existing; Temp; Mod; Quick; None)|
|     Selection dataset name     ===>                                            |
|     Member name                ===>          (Blank or pattern for member list)|
|                                                                                |
+-------------------------------------------------------------------------------

Steps:
  1. Type a U in the OPTION field.
  2. Type (*) at the end of the Dataset name to indicate processing of all members and to bypass the presentation of the PPO screen.
  3. Verify that the Process online or batch option is O.
  4. Verify that the Create Audit Trail option is N.
  5. Verify that the Preview and Confirm update option is Y.
  6. Verify that the Maximum changes value is ALL.
  7. Type an N in the selection criteria usage field. Press <Enter>. Selection criteria usage is ignored when using option U. Option U automatically provides temporary change criteria screens.

6.5.1 Specifying Change Criteria

Standard selection criteria is not used. Instead, changes are defined using the Search/Update Change Criteria screen, which is nearly identical to the Unformatted Selection Criteria screen. Changes are identified by using special relational operator (RO) "replacement" codes:
R (replace) Put data at specified position, overlaying data in the record at that point.
E (edit) Changes found data to new data. Shifts data when lengths of found data and new data are different. Must be preceded by a conditional test.
RA (replace all) Puts new data in record at all found data points within each record. Overlays existing data. Must be preceded by a conditional test.
EA (edit all) Changes all found data in a record to new data. Shifts data when lengths of found data and new data are different. Must be preceded by a conditional test.
The selection and change criteria you define remains in memory until you exit from the Search/Update utility. As you see in Figure 6-18, the selection from the Browse example is still in memory.
You must define a change when using the U (update) option. You use the I (Insert) line command to insert a new criteria line so that you can specify your change.
Figure 6-18. Search/Update Utility - Change Criteria Screen
+-------------------------------------------------------------------------------
| File-AID -------------  Search/Update Change Criteria  ------  ROW 1 TO 1 OF 1 |
| COMMAND ===>                                                  SCROLL ===> PAGE |
|                                                                                |
| Use END to continue, CANCEL to return to main screen.                          |
|                                                                                |
| Relational Operator R (Replace) overlays existing data.  E (Edit) shifts       |
| existing data.  When preceded by CO (Contains), R or E changes first occurrence|
| of search value in each record, RA or EA changes all occurrences.              |
|                                                                                |
|     AND                                                                        |
| Cmd /OR Position Length RO             Search Value / Update Value             |
| --- --- -------- ------ -- ----------------------------------------------------|
| I        1              CO T'PGM=FILEAID'                                      |
| ************************** END OF SELECTION CRITERIA **************************|
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
+-------------------------------------------------------------------------------

Steps:
  1. Use the I line command to insert a new criteria line.
  2. Press <Enter>.
Entering the Change
To specify a change, you must use one of the special relational operator replacement codes (R, E, RA, or EA).
You use E (Edit) and type in a new value of PGM=FILEAID8 to change the value of PGM=FILEAID in all records and members.
Figure 6-19. Search/Update Utility - E Edit - New Value Entry
+-------------------------------------------------------------------------------
| File-AID -------------  Search/Update Change Criteria  ------  ROW 1 TO 2 OF 2 |
| COMMAND ===> END                                              SCROLL ===> PAGE |
|                                                                                |
| Use END to continue, CANCEL to return to main screen.                          |
|                                                                                |
| Relational Operator R (Replace) overlays existing data.  E (Edit) shifts       |
| existing data.  When preceded by CO (Contains), R or E changes first occurrence|
| of search value in each record, RA or EA changes all occurrences.              |
|                                                                                |
|     AND                                                                        |
| Cmd /OR Position Length RO             Search Value / Update Value             |
| --- --- -------- ------ -- ----------------------------------------------------|
| ___      1              CO T'PGM=FILEAID'                                      |
| ___     ______   _____  E  PGM=FILEAID8                                        |
| ************************** END OF SELECTION CRITERIA **************************|
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
+-------------------------------------------------------------------------------

Steps:
  1. On line 2, specify E in the RO column and PGM=FILEAID8 in the Search Value / Update Value area.
  2. Use the END command (PF3) to continue processing.
More About Change Criteria
  • When you use the EA or RA operators, you must precede them with a CO to identify the "from" data to be changed.
  • Only the R (replace) operator may be specified without a preceding condition.
  • When you enter replacement text without an explicit data type, File-AID treats your value as uppercase. Use the C data type to specify exact case replacement data (for example, C'McDonald').
  • Specifying an OR in the AND/OR column starts a new change criteria set. The new set must contain at least one replacement operator (R, RA, E, EA). Note: File-AID always processes all sets for the current record. If the first set is applied, the next set is still checked and processed for the current record.

6.5.2 Preview Changes

Since you requested a preview of your changes (Preview and Confirm Update = Y), File-AID scans all (or selected) members of your PDS looking for matching records. All matching records are then copied to a temporary work file where they are updated based on your change criteria.
You are then placed into an ISPF Browse session on the work file to preview the results of your changes. If the work file is too small to hold all previewed records, use option 0.1 System Parameters to increase the size of your File-AID work file.
Your file is not updated until you "Confirm Update" your changes after viewing the preview.
After reviewing the preview of your changes, use the END command to access the Confirm Update screen (see Figure 6-21).
Figure 6-20. Search/Update Utility - Preview Changes Screen
+-------------------------------------------------------------------------------
| BROWSE -- USERID9.D94132.T092156.FILEAID ----------- LINE 00000000 COL 001 080 |
| COMMAND ===> END                                              SCROLL ===> PAGE |
| ER041-Records-read=374 listed=15 with 15 changes                               |
|==>USERID9.FASAMP.JCL OPENED AS PO,RECFM=FB,LRECL=80,BLKSIZE=3120,VOL=PRD912    |
|********************************MEMBER  BATVTOC ********************************|
|//STEP1    EXEC PGM=FILEAID8                                                    |
|********************************MEMBER  COPY    ********************************|
|//STEP1    EXEC PGM=FILEAID8                                                    |
|********************************MEMBER  CVT6XMAP********************************|
|//STEP1    EXEC PGM=FILEAID8,REGION=3M                                          |
|********************************MEMBER  CVT70SEL********************************|
|//STEP1    EXEC PGM=FILEAID8,REGION=4M                                          |
|********************************MEMBER  CVT70XRF********************************|
|//STEP1    EXEC PGM=FILEAID8,REGION=4M                                          |
|********************************MEMBER  DROP    ********************************|
|//STEP1    EXEC PGM=FILEAID8                                                    |
|********************************MEMBER  DUMP    ********************************|
|//STEP1    EXEC PGM=FILEAID8                                                    |
|********************************MEMBER  JCLCNVRT********************************|
|//STEP1    EXEC PGM=FILEAID8                                                    |
|********************************MEMBER  LIST    ********************************|
|//STEP1    EXEC PGM=FILEAID8                                                    |
|********************************MEMBER  PRINT   ********************************|
|//STEP1    EXEC PGM=FILEAID8                                                    |
+-------------------------------------------------------------------------------

Steps:
  1. Review the preview of your changes.
  2. Use the END command (PF3) to see the Confirm Update screen.

6.5.3 Apply Changes (Confirm Update)

After viewing a preview of your changes, the Confirm Update screen is presented as shown in Figure 6-21.
There are two options on this screen that control saving and printing the changes you made to the dataset. The default values of these fields enable you to press <Enter> to proceed with updating your file to commit your changes:
  • Perform Update (Y/N) (default Y)
  • Print previewed changes (Y/N) (default N)
You may accept the default settings or change them as you want. For example, you might want to print your previewed changes, but not commit your update at this time.
You can use the END command to return to the Search/Update Utility screen without updating or printing. The END command overrides the Confirm/Update screen default values.
Figure 6-21. Search/Update Confirm Update Screen
+-------------------------------------------------------------------------------
| File-AID --------------  Search/Update Confirm Update  ------------------------|
| COMMAND ===> END                                                               |
| ER041-Records-read=374 listed=15 with 15 changes                               |
|                                                                                |
|                                                                                |
|  Ready to perform update                                                       |
|                                                                                |
|  Perform update           ===> Y       (Y = Yes; N = No)                       |
|  Print previewed changes  ===> N       (Y = Yes; N = No)                       |
|  Maximum changes          ===> ALL     (All or number of changes to perform)   |
|                                                                                |
|  Instructions:                                                                 |
|                                                                                |
|  Use ENTER to perform above actions and return to the initial screen           |
|  Use END to exit without UPDATE or PRINT                                       |
|                                                                                |
|                                                                                |
|  CAUTION:  DISP=SHR was specified.  Other users may be editing this            |
|            file and some of your changes may be lost.                          |
|                                                                                |
|                                                                                |
|                                                                                |
+-------------------------------------------------------------------------------

Steps:
  1. Use the END command (PF3) to cancel the change and to return to the Search/Update Utility screen. Note the message, UPDATE CANCELLED, in the top right corner of the screen as shown in Figure 6-22.
More About the Confirm Update Screen
  • When you apply changes, all records are examined and the number of changes you specify here in the "Maximum changes" field are performed. The preview may only show you a limited number of changes (if you specified a numerical value in the "Maximum Changes" field on the Search/Update utility screen).
  • If you request printing, a print prompt screen is displayed where you specify your print routing request.
  • For Panvalet and Librarian updates, this screen is not shown. Instead, File-AID generates JCL to perform the update in batch and displays the SEARCH - JCL Specification screen (see Figure 6-24).

6.5.4 Processing Your Update In Batch

If the dataset you are changing is large, you may set up JCL to run the change as a background batch job.
Figure 6-22. Search/Update Utility - Batch Processing Request
+-------------------------------------------------------------------------------
| File-AID ------------------  Search/Update Utility  ---------- UPDATE CANCELLED|
| OPTION ===> U                                                                  |
|                                                                                |
|  M  Member - PDS Find/Change and Member list processing                        |
|  B  Browse - Browse globally                                                   |
|  U  Update - Preview and Update globally                                       |
|                                                                                |
|  Specify Search/Update Dataset Information:                                    |
|     Dataset name   ===> FASAMP.JCL(*)                                          |
|     Disposition    ===> SHR                  (OLD or SHR)                      |
|     Volume serial  ===>                      (If not cataloged)                |
|                                                                                |
|  Process online or batch       ===> B        (O = Online; B = Batch)           |
|                                                                                |
|  Specify Execution Information:              (Option U online)                 |
|     Create audit trail         ===> N        (Y = Yes; N = No)                 |
|     Preview and confirm update ===> Y        (Y = Yes; N = No)                 |
|     Maximum changes            ===> ALL      (All or number of changes)        |
|                                                                                |
|  Specify Selection Criteria Information:     (Options M and B)                 |
|     Selection criteria usage   ===> N        (Existing; Temp; Mod; Quick; None)|
|     Selection dataset name     ===>                                            |
|     Member name                ===>          (Blank or pattern for member list)|
|                                                                                |
+-------------------------------------------------------------------------------

Steps:
  1. Change the Process online or batch option to B.
  2. Press <Enter>.

6.5.5 Reviewing Change Criteria

When the Change Criteria screen is displayed as shown below in Figure 6-23, it still contains the values you specified when you previewed your change. Just use the END command to continue.
Figure 6-23. Search/Update utility - Change Criteria To Be Applied
+-------------------------------------------------------------------------------
| File-AID -------------  Search/Update Change Criteria  ------  ROW 1 TO 2 OF 2 |
| COMMAND ===> END                                              SCROLL ===> CSR  |
|                                                                                |
| Use END command to continue, use CANCEL command to return to main screen.      |
|                                                                                |
| Relational Operator R (Replace) overlays existing data.  E (Edit) shifts       |
| existing data.  When preceded by CO (Contains), R or E changes first occurrence|
| of search value in each record, RA or EA changes all occurrences.              |
|                                                                                |
|     AND                                                                        |
| Cmd /OR Position Length RO             Search Value / Update Value             |
| --- --- -------- ------ -- ----------------------------------------------------|
| ___      1              CO T'PGM=FILEAID'                                      |
| ___                   EA C'PGM=FILEAID8'                                     |
| ************************** END OF SELECTION CRITERIA **************************|
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
+-------------------------------------------------------------------------------

Step:
  1. Use the END command (PF3) to continue.

6.5.6 Submit Batch JCL

The SEARCH - JCL Specification screen is similar to many batch JCL screens in File-AID. The JOB statement is saved from screen to screen and session to session. You have several options:
  • Enter the SUBMIT command to generate the JCL and submit the job.
  • Enter the JCL command to generate the JCL and place it in a temporary work file that you are editing. From the Edit session, you can use the CREATE or REPLACE primary command with the C999 line command to save the JCL to a PDS, and/or use the SUBMIT command to submit the JCL.
  • Enter the END command to exit without JCL generation or submission.
Figure 6-24. Search/Update Utility - SEARCH - JCL Specification Screen
+-------------------------------------------------------------------------------
| File-AID ---------------- - SEARCH - JCL Specification  -----------------------|
| COMMAND ===> JCL                                                               |
|                                                                                |
| JCL Information for Batch Processing:                                          |
|                                                                                |
|  Sysout class    ===> *                                                        |
|                                                                                |
| JOB Statement Information:                                                     |
|  ===> //USERID9 JOB (0100,PMGT),'your name',CLASS=A,                           |
|  ===> //    MSGCLASS=R,NOTIFY=USERID9                                          |
|  ===>                                                                          |
|  ===>                                                                          |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
| Use JCL command to edit generated JCL                                          |
| Use SUBMIT command to submit batch job                                         |
| Use END to return to main - SEARCH panel without submitting job                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
+-------------------------------------------------------------------------------

Steps:
  1. Type JCL on the command line to view the generated JCL. Note: If you intend to save this JCL, be sure to change the //DD01SC DD statement. Change DISP=(OLD,DELETE) to DISP=SHR to ensure that your temporary change criteria is not deleted when you submit the job.
  2. Press <Enter>.
  3. After viewing the generated JCL, use the END command repeatedly until the File-AID Primary Option Menu screen is displayed.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.