How do you list the number of DSNB on multi-files volumes with TMSGRW?

Document ID : KB000019824
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

If we wish to use TMSGRW utility to get the number of the DSNBs for the single volumes or multifile volumes, what control statements should be coded?

Solution:

Here we can find a sample with an explanation:


 	CONTROL-SECTION 	
 	ALTER DSNB=YES 	
 	*     
 	DEF SCRBIT HX '04' 
 	SORT VOLSEQ 	
 	* 	
 	PROCESS-SECTION 	
 	* 	
 	WHEN AND FLAG1 OFF SCRBIT 	
 	LIST 	
 	* 	
 	REPORT-SECTION 	
 	* 	
 	PRINT VOLSER 'Volume' 	
 	PRINT DSN 'Fichier' 	
 	PRINT NUMDSNB 'FileSeq' 	
 	PRINT LSTDSNB 'CURRENT DSNB' 	
 	PRINT FLAG1 'No Scratch' 	
 	PRINT BLKSIZE 'BlockSize' 

The DSNB is mapped to the volume record, so you need to use the keywords from the volume record.

When reading a DSNB it will show the CURDSNB but when reading the Volume record it shows the last DSNB number.

CA1 maps the CURDSNB into NXTDSNB field. The field called NEXT is mapped into 1STDSNB.