Scan or list history statements in Librarian
search cancel

Scan or list history statements in Librarian

book

Article ID: 44588

calendar_today

Updated On:

Products

Librarian

Issue/Introduction

Is there a way to scan for history statements in librarian? 

Environment

 All supported Releases 

Resolution

The SCAN and SCANR commands scan members from the librarian master files but will not scan the history record.
The LISTH  in a -OPT, -ADD, or -SEL control statement used in the Group Processing Option (GPO) utility allow to list all history records.   

Here is a JCL example :  

//STEP01   EXEC PGM=AFOLIBR,PARM='NRJS,NJTA' 
//STEPLIB  DD DISP=SHR,DSN=HLQ.LIBRARIAN.CALJLINK
//SYSPRINT DD SYSOUT=* 
//MASTER   DD DISP=SHR,DSN=HLQ.LIBRARIAN.MASTERFILE
//OSJOB    DD DSN=&&TEMP,DISP=(,CATLG),UNIT=SYSDA, 
//         SPACE=(TRK,(3,1)),DCB=(RECFM=FB,LRECL=80,BLKSIZE=8000), 
//         VOL=SER=XXXXXX 
//SYSIN    DD * 
 -OPT GPO 
 -OPT INDEX 
 -OPT LISTH 
 -SEL NAME= ,EXEC 
 -END 
/*
//*
//STEP2    EXEC PGM=AFOLIBR,PARM='NJTA,NRJS' 
//SYSPRINT DD SYSOUT=* 
//MASTER   DD DSN=HLQ.LIBRARIAN.MASTERFILE,DISP=SHR
//OSJOB    DD DUMMY 
//SYSIN    DD DSN=&&TEMP,DISP=OLD 
//INDEX    DD SYSOUT=* 
//LIST     DD SYSOUT=* 

Note: 
If needed, change the LIST DD sysout statement in STEP2 to route to a dataset.  

For further detail, see Librarian Batch commands