Running the Analyzer in batch mode

If you want to automate report generation, you can run the Analyzer in batch mode.

Here is a sample for running the job in a Db2 subsystem.

HZASANLB in JCLLIB contains sample JCL.

//HZASANLB JOB ,'ZAO Analyz-Batch',REGION=0M,     
// CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1),NOTIFY=&SYSUID 
/*JOBPARM SYSAFF=OMU2                               
//*MAIN   SYSTEM=(OMU2)                             
//*Running in Environment DBTYPE=DB2                
//*                    
//*********************************************************************
//* New in V8.2:                                                     **
//*  SET OUTFMT=XML   <= was previously "XLS"                        ** 
//*  @headers         <= new optional parameter (see example below)  ** 
//*   @headers = full  <= displays report title, timestamp, list     ** 
//*                         of parameters, and column headings       **
//*   @headers = title <= displays report title, timestamp and       ** 
//*                         column headings                          **
//*   @headers = none  <= displays column headings only              ** 
//*                                                                  **
//* ZAO Analyzer batch mode job:                                     **
//* a. Parameters are case sensitive                                 **
//* b. All parameters must start in column 1.                        **
//* c. In OUTDSN, increase the size according to report output.      **
//* d. In WORK0, increase the size according to report output.       **
//*    WORK0 can be changed to a permanent dataset, if required.     **
//* e. In //TPARAM, setting TRACE = Y will force an Analyzer trace.  **
//*                                                                  **      
//* Records are fetched and stored in the WORK0 file.                **
//* Once the fetch is complete, records are then physically written  **
//* to the OUTDSN dataset, in 8K blocks.                             **
//*                                                                  **
//*********************************************************************
//   JCLLIB  ORDER=(USERID.ZAO82.DC2.TF12V8C2.JCLLIB)                
//*                                                                    
//   SET OUTFMT=TXT                                                    
//*  SET OUTFMT=XML                                                    
//*  SET OUTFMT=CSV                                                    
//*  SET OUTFMT=HTM                                                    
//*                                                                    
//   SET OUTDSN=&SYSUID..ZAOALZ.&OUTFMT  Output dsn                  
//*                                                                    
//**DELOLD   EXEC PGM=IEFBR14                                          
//**OUTDSN   DD DSN=&OUTDSN,                                           
//**         DISP=(MOD,DELETE),UNIT=SYSALLDA,SPACE=(TRK,(0,0))  
//*                                                             
//ALLOC    EXEC PGM=IEFBR14                                     
//OUTDSN   DD DISP=(MOD,CATLG),DSN=&OUTDSN,                     
//            UNIT=SYSALLDA,SPACE=(CYL,(200,100),RLSE)          
/*                                                              
//**************************************************************
//ANALYZER EXEC PGM=HZACANLZ,REGION=0M,TIME=NOLIMIT             
//STEPLIB  DD DISP=SHR,DSN=DB2VC10.DEC2.SDSNEXIT                
//         DD DISP=SHR,DSN=DB2.VC10.SDSNLOAD                    
//         DD DISP=SHR,DSN=hlq.SHZAMOD1       
//         DD DISP=SHR,DSN=CEE.SCEERUN                          
//         DD DISP=SHR,DSN=CBC.SCLBDLL                          
//SYSPRINT DD SYSOUT=*,LRECL=500                                
//HZAANL1  DD DISP=SHR,DSN=hlq.SHZAANL1       
//HZAANL2  DD DISP=SHR,DSN=hlq.SHZAANL2       
//HZACUST  DD DISP=SHR,                                         
//       DSN= USERID.hlq.DC2.TF12V8C2.PARMLIB(HZASANCQ)         
//*HZANLS  DD DISP=SHR,DSN=hlq.SHZAANL1(HZANLSJP)
//DSNAOINI DD DISP=SHR,                                            
//       DSN=USERID.hlq.DC2.TF12V8C2.PARMLIB(HZASCLI)          
//WORK0    DD DSN=&WORK0,DISP=(NEW,DELETE),                        
//            UNIT=SYSALLDA,SPACE=(CYL,(200,100),RLSE)             
//TPARAM   DD DUMMY                                                
//OUTPUT1  DD  DISP=OLD,DSN=&OUTDSN,LRECL=2000                     
//APPSTATS DD SYSOUT=*,LRECL=1000                                  
//APPTRACE DD SYSOUT=*                                             
//SYSIN    DD  *                                                   
/asset/audit_trail                                                 
vendor      = IBM                                                  
showfeature = on                                                   
multirep    = REPZ8                                             
@headers    = full                                                 
/*           

The report name and parameters are specified in the SYSIN DD and the output goes to the OUTPUT1 DD.

The simplest way to know what report name and parameters to specify is to run the report first using Analyzer in online mode. At the end of every report, the report name and parameters are listed in the syntax needed for batch mode. You can copy and paste this syntax into the batch SYSIN DD.

Alternatively, you can directly type in the parameters. Wildcard filters have been enabled to assist in this case.