You would be better served by generating a file containing an index list against the CA-Librarian master file and then using CLIST / REXX to process the file contents. JCL to generate an index list:
//STEP1 EXEC LIBRIAN,PARM='NRJS,NJTA,IEX=LIBX' <== these options may vary by site
//MASTER DD DISP=SHR,DSN=<your.librarian.master.file>
//LIST DD DISP=SHR,DSN=<your.output.file.name>
//SYSPRINT DD SYSOUT=*,DCB=BLKSIZE=3059
//OSJOB DD DUMMY
//SYSIN DD *
You may need a STEPLIB as well, depending upon how CA-Librarian is installed at your site.