| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| Deepthi Beginner
 
  
 Joined: 20 Aug 2005
 Posts: 27
 Topics: 6
 Location: MN
 
 | 
			
				|  Posted: Mon Mar 23, 2009 2:16 am    Post subject: How to read SYSSNAP dump for an EZT abend |   |  
				| 
 |  
				| I am testing few easytrives for the new R11 upgrade and encountered a S0C4 in one of them. I am unable to make out much from the dump. Can someone help please? I am providing first few lines of the dump
 
 PSW AT ENTRY TO SNAP    078D1000  A2601136  ILC  02  INTC  0033
 PSW LOAD MODULE             ADDRESS = 0052B180  OFFSET = 00000066
 NAME=EPTKUT1
 _________________
 Thanks,
 Deepthi.
 
 Our lives begin to end the day we become silent about things that matter.
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| kolusu Site Admin
 
  
 
 Joined: 26 Nov 2002
 Posts: 12394
 Topics: 75
 Location: San Jose
 
 | 
			
				|  Posted: Mon Mar 23, 2009 10:40 am    Post subject: |   |  
				| 
 |  
				| Deepthi, 
 S0C4 may be due to
 
 
  	  | Code: |  	  | Bad Subscript/index
 Protection Exception (programs running in 31 AMODE with 24-bit dependency)
 Missing parameters on called subprogram
 Read/Write to unopened file
 
 | 
 
 In your JESMSGLG you would get a bit more details along with the reason code
 
  	  | Code: |  	  | ABEND=S0C4 U0000 REASON=00000010  712
 
 | 
 
 I don't know if this is still valid.  There used to be a parm in easytrieve which would keep track of statements executed prior to the abend. DEBUG (STATE FLOW). STATE saves the statement number of the statement currently being executed. The statement number is then printed in the associated abnormal termination messages.
 
  	  | Code: |  	  | PARM LINK(EPTKUT1 R) DEBUG (STATE FLOW)
 
 | 
 
 add that statement and see if you can debug your program abend
 
 Kolusu
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Deepthi Beginner
 
  
 Joined: 20 Aug 2005
 Posts: 27
 Topics: 6
 Location: MN
 
 | 
			
				|  Posted: Wed Mar 25, 2009 2:28 am    Post subject: |   |  
				| 
 |  
				| Thanks Kolusu. I tried the Debug parm, it did guide me to few errors but not the one I was originally encountering. We checked with systems engineer and found that we were supposed to include a new loadlib for macros. 
 After including the new loadlib, the job failed for out of bounds issue.
 
 EZABX009 An index or subscript is out of range.
 EZABX008 The error occurred at program statement number 32.
 
 This is the code around line 32
 
  	  | Code: |  	  | 30   SUB1          = 0
 31    DO WHILE SUB1 < 241
 32       IF INPUT-BYTE < ' '
 33          INPUT-BYTE = ' '
 34       END-IF
 35       DISPLAY 'SUB1' SUB1
 36       SUB1 = SUB1 + 1
 37    END-DO
 
 | 
 and the array declaration is as below.
 
  	  | Code: |  	  | FILE INPUT1
 F1               1  2   B
 F2               3  4   B
 F3               7  4   B
 CTR            11 2   B
 DESC          13 240 A
 INPUT-BYTE      DESC   1   A INDEX SUB1
 
 | 
 Input file is 252 bytes FB.
 
 I do not see anything wrong in the declaration as well as the do-while logic using index. However the jobs failing with out of bounds error.
 
 Weird thing was that I tried the following declaration and the job worked.
   
  	  | Code: |  	  | FILE INPUT1
 F1               1  2   B
 F2               3  4   B
 F3               7  4   B
 CTR            11 2   B
 DESC          13 240 A
 INPUT-BYTE      DESC   1   A INDEX SUB1
 DUMMY-VAR 253 1 A
 
 | 
 Any ideas?
 _________________
 Thanks,
 Deepthi.
 
 Our lives begin to end the day we become silent about things that matter.
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| kolusu Site Admin
 
  
 
 Joined: 26 Nov 2002
 Posts: 12394
 Topics: 75
 Location: San Jose
 
 | 
			
				|  Posted: Wed Mar 25, 2009 12:08 pm    Post subject: |   |  
				| 
 |  
				|  	  | Deepthi wrote: |  	  | I do not see anything wrong in the declaration as well as the do-while logic using index. However the jobs failing with out of bounds error.
 | 
 
 Deepthi,
 
 Your declaration itself is wrong. You re-defined the DESC a length of 240 with just 1 byte
  . You forgot the important OCCURS part. I highly doubt if you got the right results with that code. 
 The second declaration is just telling that the DUMMY VAR starts from pos 15 for 253 bytes. Easytrieve does not complain about mis match lRECL like cobol , that is the reason you got away with that declaration even though your input LRECL is only 252 bytes.
 
 Ideally this is how your code should be
 
 
  	  | Code: |  	  | FILE INPUT1
 F1          01   002   B
 F2          03   004   B
 F3          07   004   B
 CTR         11   002   B
 DESC        13   240   A
 INPUT-BYTE  DESC 001   A OCCURS 240 INDEX SUB1
 
 
 30    SUB1          = 1
 31    DO UNTIL SUB1 > 240
 32       IF INPUT-BYTE(SUB1) < ' '
 33          INPUT-BYTE(SUB1) = ' '
 34       END-IF
 35       DISPLAY 'SUB1' SUB1
 36       SUB1 = SUB1 + 1
 37    END-DO
 
 
 | 
 _________________
 Kolusu
 www.linkedin.com/in/kolusu
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Deepthi Beginner
 
  
 Joined: 20 Aug 2005
 Posts: 27
 Topics: 6
 Location: MN
 
 | 
			
				|  Posted: Thu Mar 26, 2009 12:27 am    Post subject: |   |  
				| 
 |  
				| Hi Kolusu, 
 I am sorry I should have mentioned earlier that my first try when the job failed, was to use the occurs clause and see if it was the problem. But it had failed even with the use of occurs clause. I am really sorry I did not mention it earlier.
 
 Code:
 
  	  | Code: |  	  | FILE INPUT1
 F1               1  2   B
 F2               3  4   B
 F3               7  4   B
 CTR            11 2   B
 DESC          13 240 A
 INPUT-BYTE      DESC   1   A OCCURS 240 INDEX SUB1
 
 | 
 and the error was
 
  	  | Code: |  	  | EZABX009 An index or subscript is out of range.
 EZABX008 The error occurred at program statement number 32.
 
 | 
 
 Program statement number 32 is provided in my previous post.
 
 Also, the code without the occurs clause works in R6.4 (old release)
 Code fails in R11 (new release, which I am testing) with or without the use of occurs clause & the reason is same.
 
 I also found that my code works without the dummy variable if I reduce my check limit to 240 instead of 241 in the do-while loop. But I feel, this way I will never check the last byte.
 
 Moreover, I noticed that you have used do-until > 240 and my code works with do-while < 240. So was the "241" set as limit in my original code, the real problem?
 
 I am really confused!!
  _________________
 Thanks,
 Deepthi.
 
 Our lives begin to end the day we become silent about things that matter.
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| kolusu Site Admin
 
  
 
 Joined: 26 Nov 2002
 Posts: 12394
 Topics: 75
 Location: San Jose
 
 | 
			
				|  Posted: Thu Mar 26, 2009 10:29 pm    Post subject: |   |  
				| 
 |  
				| Deepthi, 
 It does NOT matter whether you use DO WHILE or DO UNTIL , but I guess the real problem is NOT Qualifying the array. Pay attention to the code I posted.
 
 Kolusu
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Deepthi Beginner
 
  
 Joined: 20 Aug 2005
 Posts: 27
 Topics: 6
 Location: MN
 
 | 
			
				|  Posted: Fri Mar 27, 2009 4:58 am    Post subject: |   |  
				| 
 |  
				| Hi Kolusu, 
 I tried with subscripts and it worked fine. Thank you
   
 Here is my next question  -
 
 My job has 11 EZT's (similar) and only this one was failing.
 I am posting the code from a different EZT in the prev step of the failed one.
 
 Code
 
  	  | Code: |  	  | FILE INPUT1
 F1               1  2   B
 F2               3  4   B
 F3               7  2   B
 CTR            9  2   B
 DESC          11 240 A
 INPUT-BYTE    INSTL_DESC   1   A INDEX SUB1
 AVAIL_FLG      251 1   A
 
 | 
 
 Input file is 251 bytes FB.
 
 Looping is same as I have provided above for the failed one, but this one did not fail.
 
 The arrays are not qualified in any of these 11 EZT's. I found only one difference in the one that failed & rest of the 10. For the failed EZT, array declaration was the last declaration in the file structure definition whereas for the other 10 EZT's it wasn't. The other 10 EZT's had atleast one or more file variable declaration after array declaration. This difference actually led me to introduce that dummy variable, I have mentioned in my earlier post & which worked too.
  _________________
 Thanks,
 Deepthi.
 
 Our lives begin to end the day we become silent about things that matter.
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| kolusu Site Admin
 
  
 
 Joined: 26 Nov 2002
 Posts: 12394
 Topics: 75
 Location: San Jose
 
 | 
			
				|  Posted: Fri Mar 27, 2009 10:50 am    Post subject: |   |  
				| 
 |  
				|  	  | Deepthi wrote: |  	  | I found only one difference in the one that failed & rest of the 10. For the failed EZT, array declaration was the last declaration in the file structure definition whereas for the other 10 EZT's it wasn't. The other 10 EZT's had atleast one or more file variable declaration after array declaration. This difference actually led me to introduce that dummy variable, I have mentioned in my earlier post & which worked too.  | 
 
 Deepthi,
 
 It is a poor coding practice and had EZT behaved like COBOL about mismatched LRECL's and Subscripts out of range , the programs would have failed.
 
 IMHO you really don't need 11 different EZT programs to perform a similar task. A single program could do it all
 
 By introducing a dummy variable you are just trying to patch a hole , thats all
 
 Kolusu
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Deepthi Beginner
 
  
 Joined: 20 Aug 2005
 Posts: 27
 Topics: 6
 Location: MN
 
 | 
			
				|  Posted: Fri Mar 27, 2009 11:54 pm    Post subject: |   |  
				| 
 |  
				| Thats true!!  I am just testing already existing EZT's in production for the upcoming R11 upgrade to verify if they will run without issues after the upgrade. We found a couple of issues and this particular one was weird. Along with the R11 changes, we are also identifying and proposing to change repetitive EZT's to a single EZT.  This one will change into a single EZT job & will incude the occurs clause for array declaration. 
 Thanks much for your help!!
 _________________
 Thanks,
 Deepthi.
 
 Our lives begin to end the day we become silent about things that matter.
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		|  | 
	
		|  |