Changes can be made to multiple views using the Sequel command DSPVIEWD along with Find and Replace in SEU. This method is used most often when the name of a data library is changed, and you want your views to use the new library.Steps

Follow these steps to perform a find and replace for multiple SEQUEL views.

  1. Enter the following to change the REPLACE default for the SEQUEL Create View command:
    CHGCMDDFT CMD(SEQUEL/CRTVIEW) NEWDFT(‘REPLACE(*YES)’)
     
  2. Use the Display View Description command to create a source file containing the view definitions for the views you want to change. This example will process all the views in the SEQUELEX library.

    DSPVIEWD VIEW(SEQUELEX/*ALL) TYPE(*SRC) OUTPUT(*OUTFILE) OUTFILE(QTEMP/QXLSRC) OUTMBR(ALLVIEWS)
     
  3. Enter the command below to start Source Edit Utility using the source file created in step 2.

    STRSEU SRCFILE(QTEMP/QXLSRC) SRCMBR(ALLVIEWS) OPTION(2)
     
  4. The source file will display in edit mode. Use F14 (Find/Change) to make changes in your source file. You can change a library name, a file name, and so on.
     
  5. Compile the program using CRTCLPGM or PDM.
     
  6. Run the program using the CALL command. All the views specified in the source file will be recre- ated along with any changes.
     
  7. Enter the command below to reset the CRTVIEW default values:

    CHGCMDDFT CMD(SEQUEL/CRTVIEW) NEWDFT(‘REPLACE(*NO)’)

 

 


Still have questions? We can help. Submit a case to Technical Support.

Last Modified On: April 21, 2017