View previous topic :: View next topic
|
Author |
Message |
ranjithmainframe
New User
Joined: 21 Jan 2008 Posts: 39 Location: chennai
|
|
|
|
an you please help on this...
I have three arrays declared in my cobol as follows
01 ARRAY-1.
02 WS-PRO-ARRAY OCCURS 3000 TIMES.
05 WS-PRO-ARR PIC X(351).
01 ARRAY-2.
02 WS-ADD-ARRAY OCCURS 3000 TIMES.
05 WS-ADD-ARR PIC X(194).
01 ARRAY-3.
02 WS-CON-ARRAY OCCURS 3000 TIMES.
05 WS-CON-ARR PIC X(206).
In the program,
Array-1 will be moved with 900 records from input file1
Array-2 will be moved with 800 records from input file2
Array-3 will be moved with 2100 (which is > 2000 declared limit in cobol) records from input file3
Finally when read the Array-2, it has the records overlapped
In thought of array-3 has caused the issue, I have increase the
limit from 2000 to 2200 and tried . But i got the same issue.
I tried increasing the limit of other array too. But the problem is not resolved
.Still the array-1 has the records got overlapped.
Please give an helping hand to resolve this issue. |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
Check after you load each array to see when the error occurs. |
|
Back to top |
|
|
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
|
|
INITIALIZE those tables(arrays) to SPACES if you are using them for more than once before moving data to them. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Declare a counter for each of the internal COBOL Tables.
As you load each table, check the counter against the max number of occurances allowed for each table. |
|
Back to top |
|
|
ranjithmainframe
New User
Joined: 21 Jan 2008 Posts: 39 Location: chennai
|
|
|
|
Thank you..
I have just tried initializing the arrays which was not done before.
but still the array-2 has the same issue.
Further, the array overlapped happens only when the array-3 file get loaded with more than 2002 record exactly. say 2003 records.
And it is working fine when we give 2002 number of records as input to array-3.
Still i am working on it to resolve this.... |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
How is the subscript you are using defined? |
|
Back to top |
|
|
ranjithmainframe
New User
Joined: 21 Jan 2008 Posts: 39 Location: chennai
|
|
|
|
Hi Craq Giegerich,
My subscripts are defined as follows,
01 WS-PRO-CNT PIC 9(04) VALUE 0. for array-1
01 WS-ADD-CNT PIC 9(04) VALUE 0. for array-2
01 WS-CON-CNT PIC 9(04) VALUE 0. for array-3 |
|
Back to top |
|
|
Pcrummey
New User
Joined: 26 Feb 2008 Posts: 4 Location: Van Wert, OH
|
|
|
|
Isn't there a max number of bytes for working storage?
Something like: Fixed length group items or tables are limited to 131,071 bytes.
There may not be any limitation any more(Never worked with working storage that big), I know there is for linkage to another program. But if there is a limit, your first Occurs would be over 1 million bytes. There is occurs depending that would make your table variable on the number of input records. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Hi,
I might sound little dumb but didn't get when you say 'overlap'..what data do You expect in WS-PRO-ARRAY(1) & what do you get because of 'overlap'? |
|
Back to top |
|
|
ranjithmainframe
New User
Joined: 21 Jan 2008 Posts: 39 Location: chennai
|
|
|
|
Hi,
I meant data overlap because when read WS-PRO-ARRAY(i) and it has data that loaded from file-1 but it is not mapped at all with corresponding layout. All the records look like misplaced and get mixed with other records. I am not sure whether Array-3 is overlapped with Array-1. It looks like dump...
Thanks many... |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Hi,
Show the data fromt input file & the data (perhaps DISPLAYs) using which you could say..
Quote: |
It looks like dump... |
|
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
sounds as if you descision process (which array to populate) fails to properly identify which internal cobol table to fill, or one fo your routines to populate the internal cobol tables is populating the wrong table. |
|
Back to top |
|
|
ranjithmainframe
New User
Joined: 21 Jan 2008 Posts: 39 Location: chennai
|
|
|
|
Hi,
Thanks everyone for your time...
Due to time constraint, the same code has been replaced with SAS... But I suspect the problem was with array initialization... I will let everyone know if it the problem is identified in my testing...
thanks.... |
|
Back to top |
|
|
|