Scan a Librarian Master File for a string of data in a range of members or all members
search cancel

Scan a Librarian Master File for a string of data in a range of members or all members

book

Article ID: 19518

calendar_today

Updated On:

Products

Librarian

Issue/Introduction

Use the CA Librarian -SCAN Utility control statement to scan the entire Master file for occurrences of a character string and the -SCANR Utility control statement to scan a specific range of modules in the Master file.

Environment

Release: LIB-AM00200-4.4-CA-Librarian-Access Method

Resolution

This first example will scan all members for character string (XYZ) in the default column range of 1-72:

//STEP1        EXEC   PGM=AFOLIBR
//MASTER       DD     DSN=YOUR.LIBRARIAN.MASTFILE,DISP=SHR
//OSJOB        DD     DUMMY
//LIST         DD     SYSOUT=*
//SYSPRINT     DD     SYSOUT=*
//SYSIN        DD     *
-OPT UTILITY
-SEL NAME=,
-SCAN *XYZ*
-END
//

This second example will scan a range of members for character string (12345) between columns 1 - 80:

//STEP1        EXEC   PGM=AFOLIBR
//MASTER       DD     DSN=YOUR.LIBRARIAN.MASTFILE,DISP=SHR
//OSJOB        DD     DUMMY
//LIST         DD     SYSOUT=*
//SYSPRINT     DD     SYSOUT=*
//SYSIN        DD     *
-OPT UTILITY
-SCANR TEST,TEST3
-SCAN *12345*,STR=01,END=80
-END
//

Additional Information

See the Librarian Batch Command Reference Guide for more information about the -SCAN and -SCANR Utility control statements.