| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| YSMVS Beginner
 
  
 Joined: 19 May 2004
 Posts: 51
 Topics: 25
 Location: My House
 
 | 
			
				|  Posted: Fri Mar 04, 2005 12:33 pm    Post subject: Return codes of REPRO |   |  
				| 
 |  
				| Hi all, 
 In my site there is a step which copies the contents of a VSAM file to a Flat file. Repro command is used for this. Whenever the Input VSAM file is empty it is giving the Return code of 12.
 
 We are planning to override the condition code  of 12 with 4 if the file is empty as follows.
 
 
  	  | Code: |  	  | REPRO - INFILE(INFILE) -
 OUTFILE(OUTFILE)
 IF LASTCC EQ 12 THEN SET MAXCC=4
 | 
 
 I want to know, in which other case the repro command will give return code 12.
 
 I know that we can introduce a new step to check if the file is empty (by copying 1 record) and skip the  repro command, but still I want to do the above said way.
 
 Thanks,
 YSMVS.
 _________________
 Thanks,
 YSMVS
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| kolusu Site Admin
 
  
 
 Joined: 26 Nov 2002
 Posts: 12394
 Topics: 75
 Location: San Jose
 
 | 
			
				|  Posted: Fri Mar 04, 2005 2:32 pm    Post subject: |   |  
				| 
 |  
				| YSMVS, 
 There are many instances when you can get a return code of 12 on Repro command.
 
 ex: 1 when the output dataset does not exist
 
 
  	  | Code: |  	  | //STEP0100 EXEC PGM=IDCAMS //*
 //SYSPRINT DD  SYSOUT=*
 //SYSOUT   DD  SYSOUT=*
 //SYSIN    DD  *
 REPRO IDS(SOME.EXISTING.VSAM FILE) -
 ODS(NON EXISTING VSAM FILE) REPLACE
 /*
 
 | 
 
 ex: 1  Copying a Vsam file which is not INITIALIZED
 
 
  	  | Code: |  	  | //STEP0100 EXEC PGM=IDCAMS
 //*
 //SYSPRINT DD  SYSOUT=*
 //SYSOUT   DD  SYSOUT=*
 //SYSIN    DD  *
 REPRO IDS(NOT INIT VSAM FILE) -
 ODS(SOME EXISTING VSAM FILE) REPLACE
 /*
 
 | 
 
 Also check this topics which discuss about checking an empty file.
 
 http://www.mvsforums.com/helpboards/viewtopic.php?t=27&highlight=empty
 
 
 http://www.mvsforums.com/helpboards/viewtopic.php?t=2600&highlight=vsamemt
 
 Hope this helps...
 
 Cheers
 
 Kolusu
 _________________
 Kolusu
 www.linkedin.com/in/kolusu
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Mouli Beginner
 
 
 Joined: 07 Jun 2003
 Posts: 18
 Topics: 7
 
 
 | 
			
				|  Posted: Tue Mar 15, 2005 3:38 pm    Post subject: |   |  
				| 
 |  
				| If we have Records out of sequence(not in sorted order) also, we will be getting Return code as 12. _________________
 Regards,
 Mouli
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| kolusu Site Admin
 
  
 
 Joined: 26 Nov 2002
 Posts: 12394
 Topics: 75
 Location: San Jose
 
 | 
			
				|  Posted: Wed Mar 16, 2005 8:49 am    Post subject: |   |  
				| 
 |  
				| Mouli, 
 
  	  | Quote: |  	  | If we have Records out of sequence(not in sorted order) also, we will be getting Return code as 12.
 
 | 
 
 That depends on the ERRORLIMIT value coded on the repro statement. If you override the default value of 4 to much higher value then you would not get the error.
 
 
  	  | Code: |  	  | ERRORLIMIT('VALUE')
 - SPECIFIES THE NUMBER OF ERRORS REPRO COPY DATA SET WILL
 TOLERATE.
 'VALUE'  - SPECIFIES THE NUMBER OF ERRORS.  THE NUMBER MAY RANGE
 FROM 1 TO 2,147,483,647.  THE DEFAULT VALUE IS 4.
 
 | 
 
 Hope this helps...
 
 Cheers
 
 kolusu
 _________________
 Kolusu
 www.linkedin.com/in/kolusu
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Mouli Beginner
 
 
 Joined: 07 Jun 2003
 Posts: 18
 Topics: 7
 
 
 | 
			
				|  Posted: Wed Mar 16, 2005 4:13 pm    Post subject: |   |  
				| 
 |  
				| hmm... Just checked the QW for REPRO. It says all the information that you provided.. 
 Thanks for Reminding(Sorry updating!).
 
 Thanks,
 Mouli
 _________________
 Regards,
 Mouli
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		|  | 
	
		|  |