Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Select into from Mainframe Cobol returns inconsistent results

Select into from Mainframe Cobol returns inconsistent results

From: Randy Klingman <randy.klingman_at_eds.com>
Date: 9 Aug 2001 12:54:47 -0700
Message-ID: <8f26a39a.0108091154.5a039c45@posting.google.com>

I have the following issue running an Oracle select statement from a Cobol Program in the mainframe environment.

The SELECT INTO statement within the program should return 6,904 rows.  When the program uses an OCCURS clause anywhere between 6,904 and 196,607, all 6,904 rows are returned. However, when the OCCURS clause is set to 196,608, zero rows are returned! Furthermore, if the OCCURS clause is increased by one (to 196,609) then one row is returned, if increased by two (to 196,610) then two rows are returned, etc. This pattern continues until all 6,904 rows are returned when the OCCURS reaches 203,512.

Interestingly, all 6,904 rows continue to be returned when the OCCURS clause ranges from 203,512 to 393,215. However, at 393,216 (i.e., 2 * 196,608) no rows are returned! The pattern then repeats itself all over again.

We ran two traces against this program. The 1st trace was against the version with an OCCURS of 196,607 and the 2nd with an OCCURS of 196,608. DBA's examined the trace results and determined the following: both runs produced the exact same SQL statements; however, they did not return the same number of rows!

The 1st run returned 6,904 rows while the 2nd returned 0 rows. They suspected that the contents of the bind variables within the SELECT must be different between the two runs but there was no evidence to indicate that this was the case.

Any ideas what would cause this type of behavior? I won't always know exactly how many rows will be returned so I need to find a root cause of this problem.

Thanks,

Randy Received on Thu Aug 09 2001 - 14:54:47 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US