blueshantung

BatchXV | z/OS Mainframe

This program (known as Batch Extended VTOC) builds a list of DASD devices based on the parameters passed. This data is used to compare the previous day's data to report on any changes. The program will also report on PPRC errors.

Download

History

1.0.0
(15/05/2013) - Initial release.
1.0.0
(29/05/2013) - Updated to tidy display, add ERROR report for PPRC, invalid tracks and SUSPEND/PENDING counts.
1.0.0
(05/06/2013) - Storage group added.
1.0.1
(07/06/2013) - Filters on Model Type and can exclude VOLSER.
1.0.2
(06/01/2015) - Added DD:EMAILS to allow email addresses to be specified for REPORTPPRCERROR.
2.0.0
(21/12/2021) - Converted to relative addressing and new opcodes. Updated to re-entrant.
 
(04/01/2022) - Moved email constants to literals at start of code.
 
(10/01/2022) - Program allocates storage for UCBs instead of parsing as we searched. Data is build first. Dropped DD:SYSLIST.
 
(11/01/2022) - Dropped Location and PPRC Mirror UCB - company specific.
 
(18/01/2022) - Now uses PQMAP2 for detailed PPRC information. Displays updated for STANDARD and PPRC and added Secondary Path descriptions.
 
(24/01/2022) - Updated to get the LRECL of DD:SYSOUT before writing so we can now write to SYSOUT=* or a dataset.
 
(03/02/2022) - Fixed S0C4-04 abend when run from APF dataset - caused by using non-reentrant DCB for DD:EMAILS. .

Planned Changes

  1. None

Screenshots / Output

Description & Parameters

This program was written to solve a problem with extracting a list of DASD devices and producing reports on errors etc.

UCBFILTER
Filters UCB addresses matching the first character specified, ie UCBFILTER=ABCD will match devices starting A, B, C or D
VOLFILTER
Filters DASD volume names matching the first character specified, ie VOLFILTER=ABCD will match volume names starting A, B, C or D. You can prefix this list with '!' to exclude any matches.
PPRC
Show the PPRC display as opposed to the standard display
REPORTPPRCERROR
If any PPRC errors are found, the RC is set to 1 and output is created to be emailed. Requires DD:EMAILS - see JCL Examples.
ALTCYLS
Show all volumes with alternate cylinders
NOHEADER
Do not display the headers
DASDLIST
Produce a CSV list of the DASD devices - this parameter is the list name.
MODEL
Filter on the DASD Model Type, ie 3390-3.

JCL Examples

This example will list all DASD devices with the UCB address starting with 4, 5, 7 or C and the volume will be excluded if it starts with S or P.

//STEP1   EXEC PGM=BATCHXV                          
//STEPLIB  DD DISP=SHR,DSN=YOUR.LOADLIB
//SYSOUT   DD SYSOUT=*                              
//SYSIN    DD *                                     
UCBFILTER=457C             
VOLFILTER=!SP                                       
/*                                                  
					
This example will list all DASD devices with the UCB address starting with 8, 9, A or B. No headers will be produced and the data will be written to DD:SYSOUT.

//STEP1   EXEC PGM=BATCHXV                                     
//STEPLIB  DD DISP=SHR,DSN=YOUR.LOADLIB
//SYSOUT   DD DISP=SHR,DSN=YOUR.OUTPUT.PDS(DASDTEST) 
//SYSIN    DD *                                                
UCBFILTER=89AB                                
DASDLIST=TEST                                                  
NOHEADER                                                       
/*                                                             
					
This example will report on any PPRC errors - if any are found, RC=1 is passed from STEP1 and an email is sent. We have this JCL set up to run every hour.

//STEP1   EXEC PGM=BATCHXV                                        
//STEPLIB  DD DISP=SHR,DSN=YOUR.LOADLIB                     
//SYSOUT   DD DSN=&&FILE1,DISP=(NEW,PASS,DELETE),                 
//            SPACE=(CYL,(1,1),RLSE),                             
//            DCB=(BLKSIZE=255,LRECL=255,RECFM=FBA)               
//EMAILS   DD *
test.software@host.com
//SYSIN    DD *                                                   
UCBFILTER=AB89                                    
REPORTPPRCERROR                                                   
/*                                                                
//*************************************************************** 
//* IF STEP1.RC = 1 THEN WE KNOW ERRORS HAVE BEEN FOUND SO        
//* WE CREATE AN EMAIL AND SEND IT                                
//*************************************************************** 
//CHECK IF (STEP1.RC = 1) THEN                                    
//STEP2   EXEC PGM=IEBGENER,REGION=4M                             
//SYSIN    DD DUMMY                                               
//SYSOUT   DD SYSOUT=*                                            
//SYSPRINT DD SYSOUT=*                                            
//SYSUT2   DD SYSOUT=(B,SMTP)                                     
//SYSUT1   DD DSN=&&FILE1,DISP=SHR                                
//END    ENDIF                                                    
					

Abend or Error Codes

U0001
UCBSCAN Error
U0002
Specified DD statement not found
U0003
SSI call to SMS failed
U0004
Parameter error for ANTRQST
U0005
ANTRQST - ANTAS000 not started
U0006
System Data Mover RC=7240 failure

Environment

This program was written in z/OS HLASM Assembler and will run under OS/390 and z/OS in 31bit or 64bit. The code is re-entrant.

This program was developed and tested under z/OS 1.12 up to z/OS 2.4.

Additional Macros

The program uses the STRING macro from https://gsf-soft.com/Freeware/STRING.html - I highly recommend this.

Assemble & Link

The program is a single source member and the JCL has been set up to create an object file and link into a load module. The JCL runs under JES3 so you will probably need to tailor it for your environment.

The code will need to be changed to reflect your environment - see * CHANGE in the code to replace the SMTP host, MAIL FROM email address, email title and the Generic email group.