| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| apru Beginner
 
 
 Joined: 15 Feb 2014
 Posts: 25
 Topics: 6
 
 
 | 
			
				|  Posted: Thu Aug 06, 2015 5:38 am    Post subject: ODO Object Not found |   |  
				| 
 |  
				| Hi all 
 In our program,  we are fetching a DB2 cursor into a working storage table.
 
 On compilation of the program , we are getting the below error.
 
 ODO Object not found for : CUST-DTLS
 
 
 The output copybook is as follows .
 
  	  | Code: |  	  | 03 WS-CUST-DTLS.
 04 CUST-DTLS OCCURS 1 TO 4 TIMES DEPENDING ON WS-CNT.
 05 OS-CUST-ID           PIC S9(9) USAGE COMP.
 
 
 | 
 Inside the program we have declared the following :
 
  	  | Code: |  	  | DATA DIVISION.
 WORKING-STORAGE SECTION.
 77 I PIC 9(2) VALUE 00.
 77 WS-CNT PIC 9(2) VALUE 00.
 
 | 
 The fetch is implemented as follows :
 
  	  | Code: |  	  | PERFORM UNTIL SQLCODE = 100
 EXEC SQL
 FETCH INSCSR
 INTO :DCUST-ID
 END-EXEC
 EVALUATE SQLCODE
 WHEN 0
 ADD 1 TO I
 ADD 1 TO WS-CNT
 MOVE DCUST-ID TO OS-CUST-ID(I)
 
 | 
 (where DCUST-ID is host variable in DCLGEN)
 
 But on execution of the code we are getting the error
 - ODO Object Not found for : CUST-DTLS
 
 We are not able to trace the issue.
 Kindly share your inputs to resolve the issue.
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| William Collins Supermod
 
 
 Joined: 03 Jun 2012
 Posts: 437
 Topics: 0
 
 
 | 
			
				|  Posted: Thu Aug 06, 2015 9:13 am    Post subject: |   |  
				| 
 |  
				| Well, that doesn't look like a message which comes from Enterprise COBOL, or any other regular Mainframe component. There's no message number. 
 So what software are you using, and where and when do you see the message?
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| kolusu Site Admin
 
  
 
 Joined: 26 Nov 2002
 Posts: 12394
 Topics: 75
 Location: San Jose
 
 | 
			
				|  Posted: Thu Aug 06, 2015 10:17 am    Post subject: |   |  
				| 
 |  
				| apru, 
 Please learn to use code tags so that your code is readable.
 
 As William mentioned you need to show us the complete error message with message id instead of just the error text.
 
 Try defining the ODO as follows and manipulate it after the fetch.
 
  	  | Code: |  	  | 03 WS-CUST-DTLS.
 04 WS-CNT                  PIC 9(2).
 04 CUST-DTLS OCCURS 1 TO 4 TIMES DEPENDING ON WS-CNT.
 05 OS-CUST-ID           PIC S9(9) USAGE COMP.
 
 | 
 _________________
 Kolusu
 www.linkedin.com/in/kolusu
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		|  | 
	
		|  |