Scanning the Entire Master File for a Specific String

Document ID : KB000027822
Last Modified Date : 14/02/2018
Show Technical Document Details

Issue:

Scanning the entire master file for a specific string.

 

Environment:

Librarian V4.4

 

Resolution:

Here is a sample job to scan a whole master file for a certain string. Replace the following:

  1. *search string* with the string you want to search for.
  2. your.libr.master with the name of your master file.
//LIB2         EXEC     PGM=AFOLIBR,PARM='DEPTH=25'
//MASTER       DD       DSN=your.libr.master,DISP=SHR
//OSJOB        DD       DUMMY
//LIST         DD       SYSOUT=*
//SYSPRINT     DD       SYSOUT=*
//SYSIN        DD       *
-OPT UTILITY
-SCAN *search string*
-END
 /*