| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| Bithead Advanced
 
  
 Joined: 03 Jan 2003
 Posts: 550
 Topics: 23
 Location: Michigan, USA
 
 | 
			
				|  Posted: Tue Oct 25, 2005 9:46 am    Post subject: Mis-Catalogued Datasets |   |  
				| 
 |  
				| I have a large number of mis-catalogued datasets. Normally, I would use 3.4 to search for the correct volume and then I would re-catalog the dataset but this time, it will take me hours. 
 Does anyone know of a utility or method of doing this automatically?
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| kolusu Site Admin
 
  
 
 Joined: 26 Nov 2002
 Posts: 12394
 Topics: 75
 Location: San Jose
 
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Bithead Advanced
 
  
 Joined: 03 Jan 2003
 Posts: 550
 Topics: 23
 Location: Michigan, USA
 
 | 
			
				|  Posted: Tue Oct 25, 2005 10:38 am    Post subject: |   |  
				| 
 |  
				| Kolusu, 
 The datasets are mis-catalogued. We had built a disaster recovery image built using pack backups where the backup date of the data packs and that of the master catalog were different. Since the datasets were SMS controlled, they moved.
 
 I will look at ADRSSU to see if it can be of any use.
 
 Thanks.
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| taltyman JCL Forum Moderator
 
  
 
 Joined: 02 Dec 2002
 Posts: 310
 Topics: 8
 Location: Texas
 
 | 
			
				|  Posted: Tue Oct 25, 2005 1:48 pm    Post subject: |   |  
				| 
 |  
				| There are a couple of ISV's that have code that will rattle through volumes and build the idcams statements for uncataloged datasets.   In fact our storage group uses it at disaster recovery.  I guess it could be massaged to add delete noscratch. 
 How many volumes are you talking about?  Maybe you could whip up some rexx code.
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Bithead Advanced
 
  
 Joined: 03 Jan 2003
 Posts: 550
 Topics: 23
 Location: Michigan, USA
 
 | 
			
				|  Posted: Thu Oct 27, 2005 8:59 am    Post subject: |   |  
				| 
 |  
				| I compared the output from IEHLIST with that of a LISTCAT to determine which datasets were incorrectly catalogued. I wrote a couple of programs to do the comparison. |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| semigeezer Supermod
 
 
 Joined: 03 Jan 2003
 Posts: 1014
 Topics: 13
 Location: Atlantis
 
 | 
			
				|  Posted: Thu Oct 27, 2005 12:50 pm    Post subject: |   |  
				| 
 |  
				| There are standard utilities that can handle this, but a quick and dirty program like this may come in handy... /* Rexx - Catstat : Check catalog status of all ds on vol            */
 Parse Upper Arg volser .                     /* requires a volser */
 If volser = '' Then Do; Say 'no volser'; Return; End
 Address ispexec
 dsvar=''
 Say 'Retrieving names on 'volser'...'
 'LMDINIT LISTID(LISTIDV) VOLUME('volser')'        /* read VTOC */
 servrc=rc
 Do queued(); Pull; End
 Call time 'r'
 n=0
 Say 'Processing names...'
 Do While servrc = 0
 'LMDLIST LISTID(&LISTIDV) DATASET(DSVAR)'       /* get next dsname */
 servrc=rc
 If servrc = 0 Then
 Do
 If 0<>listdsi("'"dsvar"'" 'NORECALL' ) Then /* is it cataloged?*/
 Queue volser':' left(dsvar' ',47,'.')' not catlg'
 Else
 If sysvolume <> volser Then          /* cataloged elsewhere? */
 Queue volser':' left(dsvar' ',47,'.')' catlg on' sysvolume
 End
 n=n+1
 If time('e') > 5 Then           /* give status msg every 5 seconds */
 Do; Say 'Processed 'n' names'; Call time 'r'; End
 End
 'LMDFREE LISTID(&LISTIDV)'
 If queued()>0 Then
 Do
 'VGET (ZSCREEN) SHARED'
 ddname='$STAT$'zscreen
 Address tso 'ALLOC F('ddname') UNIT(VIO) DSO(PS) RECFM(V B)',
 'LREC(80) NEW DEL REU'
 Address tso 'EXECIO 'queued()' DISKW 'ddname' (FINIS '
 'LMINIT DATAID(STAT) DDNAME('ddname') ENQ(SHR)'
 'EDIT DATAID(&STAT)'
 'LMFREE DATAID(&STAT)'
 Address tso 'FREE F('ddname')'
 End
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Bithead Advanced
 
  
 Joined: 03 Jan 2003
 Posts: 550
 Topics: 23
 Location: Michigan, USA
 
 | 
			
				|  Posted: Thu Oct 27, 2005 3:43 pm    Post subject: |   |  
				| 
 |  
				| Semigeezer, 
 Thanks, I will take a look.
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		|  | 
	
		|  |