How to search for a hex-character string in Librarian master file members
search cancel

How to search for a hex-character string in Librarian master file members

book

Article ID: 51462

calendar_today

Updated On:

Products

Librarian

Issue/Introduction

Is it possible to search for a hex-character like x'00' in members of a Librarian Master file?

Environment

Release 4.4 

Resolution

The FAIRSCAN user contributed routine can do such a search.  FAIRSCAN can perform hex-value searches as well as character string searches.

The FAIRSCAN routine must first be installed.  For more information on how to install and use FAIRSCAN, see :

 

Here a template to run the FAIRSCAN program searching for a X'00' in any members of the Masterfile.
In order to change the search value in front of the scan #$# delimiter string, use the ISPF HEX ON editor command. 

...
    //SCAN EXEC PGM=FAIRSCAN,PARM='NRJS,NJTA'
    //STEPLIB DD DISP=SHR,DSN=<your.LIBR.CSIQLINK>
    //MASTER DD DISP=SHR,DSN=<your.master.file>
    //PRINTOUT DD SYSOUT=*
    //SYSOUT DD SYSOUT=*
    //CARDIN DD *
    -SCAN .#$#
    -COLM 001 072
    ...

Data for the control cards starts at column 11, the SCAN literal MUST be terminated by #$#.

The -SCAN line above looks in hex like:

-SCAN      #$# 
6ECCD444440757444444444444444444444444444444444444444444444444444444444444444 02315000000BBB000000000000000000000000000000000000000000000000000000000000000

 

 

At the bottom of the listing, the following information was seen:

WHEX00   KFML COB           *** ACCEPTED FOR SEARCH *** 
                          000020   HEX VALUE 00 >> '..'    

                            *** JOB STATISTICS ***        
              00136         MODULE PROCESSED              
              00000         MODULES DROPPED -LANG         
              00136         MODULES SEARCHED              
              00001         MODULES FOUND