Option 3: Changing One Value to Another

How to:

Some commands or syntax may have been eliminated or replaced with new syntax in a more recent release. Sometimes data source names or field names need to be replaced. Using option 3, you can replace a string.

When specifying a replacement string, you must include any leading and trailing blanks needed within the line. You must also be aware of the line length, as your replacement string may cause the line to be truncated if it extends the line too far.

This option is meant for single-word replacements, not complicated changes. For example, if you upgrade to a new release, you may want to replace the old high-level qualifier with a new high-level qualifier in your CLISTs or jobs.

You should run this option with the results going to the screen initially, to view the results and make sure the needed spaces are included and line lengths are respected. When you are satisfied with the results, you can re-run the utility to make the changes in the files.

Procedure: How to Change One Value to Another

  1. To find and replace a specific value in a file, start a FOCUS session for the new release and select Option 3, as shown in the following image.


  2. Press Enter.

    The FOCUS Scanning Utility - Find/change Value screen opens, as shown in the following image.



  3. Enter the search string, up to 70 characters.
  4. Enter the replacement string, up to 70 characters.

    The strings will automatically be placed within quotation marks, so you do not need to type the quotation marks as part of the strings. Note that initial spaces that are entered in the search string or replacement string are captured and affect the results.

    For example, in the following image, the search string COUNTRY and the replacement string CAR (with an initial space) have been entered:



  5. Press Enter.

    The FOCUS Scanning Utility - Target Files screen opens, as shown in the following image.



  6. Enter search criteria for the members to be scanned and the options for saving the results to a new PDS.
    1. Enter the Logical Record Length (LRECL) of the PDS to be scanned. The default value is 80.

      Currently, an LRECL of 80 and 160 are supported. If the value is different, contact Information Builders Customer Support Services for a Master File to use to read the scanned file.

    2. Enter the fully-qualified name of the PDS to be scanned.

      If your allocations concatenate multiple PDSs, you must search these one at a time.

    3. Enter search criteria for the members to be scanned. The string will automatically be placed within quotation marks, so you do not need to type the quotation marks as part of the search string. Note that initial spaces that are entered in the search string are captured. The search string can consist of one of the following:
      • A single member name.
      • An asterisk (*), to scan all members.
      • A mask containing the wildcard characters $ and $*. The dollar sign indicates that any character in that position is acceptable. The $* is shorthand for writing a sequence of dollar signs to fill the end of the mask without specifying a length. This combination can only be used at the end of the mask. For example, the mask B$* scans all members whose name begins with the letter B. The search is case insensitive. The following sample screen searches the PDS USER1.FOCEXEC.DATA for all member names that start with the letters AB:
      • Indicate whether to write the members to a new PDS.

        It is recommended that you enter N (No) for this option initially, so you can see if the results are as expected.

      • If you entered Y for WRITE CHANGES TO NEW PDS, enter the fully qualified name of an existing PDS for the members after replacement.

    The following screen scans all members in USER1.FOCEXEC.DATA that start with the letters AS and does not write the results to a PDS:



  7. Press Enter.

    A report is issued for each member that was selected. When all selected members have been searched, a FINISHED message is displayed For example:

    FINISHED

Information Builders