| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| edkir98 Beginner
 
  
 Joined: 27 Aug 2007
 Posts: 102
 Topics: 42
 Location: Chennai
 
 | 
			
				|  Posted: Thu Jan 31, 2008 8:10 am    Post subject: ABEND in Repro |   |  
				| 
 |  
				| Is it possible to trap and abend in Repro? For ex.
 Suppose I want to repro a VSAM file to a flat file, but the VSAM file is already allocated to the region, my job abends with U0009. I would want the job to return a RC of 04 instead of the abend.
 
 Is this possible?
 _________________
 Thanks
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| vkphani Intermediate
 
  
 Joined: 05 Sep 2003
 Posts: 483
 Topics: 48
 
 
 | 
			
				|  Posted: Thu Jan 31, 2008 8:40 am    Post subject: |   |  
				| 
 |  
				| Code like below. 
 
  	  | Code: |  	  | REPRO -
 INFILE(INFILE) -
 OUTFILE(OUTFILE)
 IF LASTCC EQ 12 THEN SET MAXCC=4
 
 | 
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| vkphani Intermediate
 
  
 Joined: 05 Sep 2003
 Posts: 483
 Topics: 48
 
 
 | 
			
				|  Posted: Thu Jan 31, 2008 8:41 am    Post subject: |   |  
				| 
 |  
				| Pls do not open multiple threads on the same topic. |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Bill Dennis Advanced
 
  
 Joined: 03 Dec 2002
 Posts: 579
 Topics: 1
 Location: Iowa, USA
 
 | 
			
				|  Posted: Thu Jan 31, 2008 9:18 am    Post subject: |   |  
				| 
 |  
				| Edward, U0009 doesn't sound like an abend from IDCAMS REPRO.  What program are you executing?
 _________________
 Regards,
 Bill Dennis
 
 Disclaimer: My comments on this foorum are my own and do not represent the opinions or suggestions of any other person or business entity.
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| taltyman JCL Forum Moderator
 
  
 
 Joined: 02 Dec 2002
 Posts: 310
 Topics: 8
 Location: Texas
 
 | 
			
				|  Posted: Thu Jan 31, 2008 9:58 am    Post subject: |   |  
				| 
 |  
				| Moderators note: I deleted the 3 duplicate posts. |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| edkir98 Beginner
 
  
 Joined: 27 Aug 2007
 Posts: 102
 Topics: 42
 Location: Chennai
 
 | 
			
				|  Posted: Thu Jan 31, 2008 10:09 am    Post subject: Re |   |  
				| 
 |  
				|  	  | Bill Dennis wrote: |  	  | Edward, U0009 doesn't sound like an abend from IDCAMS REPRO.  What program are you executing?
 | 
 
 This is the JCL I used
 
  	  | Code: |  	  | //R001     EXEC PGM=CONDCODE,PARM=IDCAMS //INDD     DD  DSN=TSOESAM.FILE,
 //             DISP=SHR
 //OUTDD    DD  SYSOUT=*
 //SYSIN    DD  *
 REPRO INFILE(INDD) OUTFILE(OUTDD) SKIP(01)
 IF LASTCC=0 THEN SET MAXCC=4
 ELSE DO
 SET MAXCC=8
 END
 /*
 //SYSPRINT DD  SYSOUT=*
 //SYSOUT   DD  SYSOUT=*
 | 
 
 This is the sysout I got.
 
 
  	  | Code: |  	  | IDC0005I NUMBER OF RECORDS PROCESSED WAS 0 IDC3006I FUNCTION TERMINATED DUE TO BEGINNING POSITIONING ERROR
 
 IF LASTCC=0 THEN SET MAXCC=4
 
 ELSE DO
 
 SET MAXCC=8
 
 END
 
 IDC0002I IDCAMS PROCESSING COMPLETE. MAXIMUM CONDITION CODE WAS 8
 | 
 
 Actually, the input file dint have any records and the abend had happened because I said SKIP(01) on an empty file. But the if statements that followed were not at all taken.
 
 This is the JESMSGLG
 
  	  | Code: |  	  | CCD009I IDCAMS   SET RETURN CODE OF X'0008' IEA995I SYMPTOM DUMP OUTPUT  370
 USER COMPLETION CODE=0009
 TIME=07.55.11  SEQ=32516  CPU=0000  ASID=0164
 PSW AT TIME OF ERROR  078D1000   80007EDA  ILC 2  INTC 0D
 ACTIVE LOAD MODULE           ADDRESS=00007BB0  OFFSET=000
 NAME=CONDCODE
 DATA AT PSW  00007ED4 - 00181610  0A0D58D0  C34858E0
 GR 0: 00000000_80000000   1: 00000000_80000009
 2: 00000000_00000006   3: 00000000_00006FFE
 4: 00000000_00000006   5: 00000000_00000000
 6: 00000000_00000004   7: 00000000_FD000000
 8: 00000000_00006FF8   9: 00000000_00939378
 A: 00000000_00000000   B: 00000000_009FF290
 C: 00000000_80007BB0   D: 00000000_00007EF4
 E: 00000000_80FD70C8   F: 00000010_00000000
 END OF SYMPTOM DUMP
 IEF450I TSOESAMO R001 - ABEND=S000 U0009 REASON=00000000  37
 TIME=07.55.11
 ACT002E    R001              CONDCODE 00:00:00.02  U0009 ***
 | 
 _________________
 Thanks
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| jsharon1248 Intermediate
 
 
 Joined: 08 Aug 2007
 Posts: 291
 Topics: 2
 Location: Chicago
 
 | 
			
				|  Posted: Thu Jan 31, 2008 11:21 am    Post subject: |   |  
				| 
 |  
				| The IF statement did exactly as you told it to do.  The LASTCC was not equal to 0, so IDCAMS set it to 8.  That's what you coded. 
 That's a strange setup you have there.  Why do you call a program that invokes IDCAMS rather than just executing IDCAMS?  Based on the name, it doesn't look like an application pgm.
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Bill Dennis Advanced
 
  
 Joined: 03 Dec 2002
 Posts: 579
 Topics: 1
 Location: Iowa, USA
 
 | 
			
				|  Posted: Thu Jan 31, 2008 3:46 pm    Post subject: |   |  
				| 
 |  
				| I'm sure that pgm CONDCODE is a home grown program to call the IDCAMS utility and ABEND rather than let IDCAMS end with a bad COND CODE.  It's easier on production job setup to let a job abend rather than try to stop on a non-zero COND CODE (you know that pesky COND parameter works backwards!). 
 edward,
 If you want a COND CODE rather than abend, you'll probably need to quit executing pgm=CONDCODE and just exec pgm=IDCAMS.  Check with experts at your site.
 _________________
 Regards,
 Bill Dennis
 
 Disclaimer: My comments on this foorum are my own and do not represent the opinions or suggestions of any other person or business entity.
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		|  | 
	
		|  |