View previous topic :: View next topic
|
Author |
Message |
sathyaraj
New User
Joined: 28 Sep 2007 Posts: 71 Location: India.
|
|
|
|
HI..
Am trying to load a table from a PS file which has around 9000 records..
The program is abending at the 4408th record and when i tried to run the program with 3000 records its giving the desired O/P..
I have initialised the subscripts with 9(06) also comp-3.. so guess that shouldn be a problem..
Can someone plz tell me what would be the possible fixes..? |
|
Back to top |
|
|
sathyaraj
New User
Joined: 28 Sep 2007 Posts: 71 Location: India.
|
|
|
|
Sry.. for not mentioning this..
Teh abend is SOC4 |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
What does the table look like, please post it..... |
|
Back to top |
|
|
sathyaraj
New User
Joined: 28 Sep 2007 Posts: 71 Location: India.
|
|
|
|
Hi..
Found something... I have given only 2000 in the occurs class..
but am wondering how it went till 4408...
Lemme try by increasing this to 99999. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Working storage and program code before your move steped on something that did not belong to your program...
A tip,
OCCURS 10000 TIMES DEPENDING ON max-count.
&
ADD 1 TO current-row
IF current-row > max-count
abend/display error/stop run/BOOM |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
Protection error and subscript checking are not the same thing. The program was perfectly happy to overlay memory after your array (2000 OCCURS), be it data or code, but the system was not happy to let you overlay another region not belonging to your program. |
|
Back to top |
|
|
Sandy Zimmer
Active Member
Joined: 13 Jun 2007 Posts: 826 Location: Wilmington, DE
|
|
|
|
Please consider the size of the table and what version of COBOL are you on? Are you above or below the line?
Why are you loading all of these records to an INTERNAL table? |
|
Back to top |
|
|
venktv
New User
Joined: 29 Mar 2006 Posts: 59 Location: Montreal
|
|
|
|
Compile your program with SSRANGE compiler option and try again you will get SOC4 if you your program try to cross the max limit of the table. |
|
Back to top |
|
|
sathyaraj
New User
Joined: 28 Sep 2007 Posts: 71 Location: India.
|
|
|
|
I used the code by william and is working fine.. I was just unaware of the option DEPENDING ON... Thnx a lot.. |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Quote: |
Found something... I have given only 2000 in the occurs class..
but am wondering how it went till 4408... |
Because as you got past 2000 entries you started to overlay other data in your pgm until you ran out of space in your region and then, BINGO!! 0C4. |
|
Back to top |
|
|
|