IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Problem in loading a table...


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sathyaraj

New User


Joined: 28 Sep 2007
Posts: 71
Location: India.

PostPosted: Mon Nov 12, 2007 10:04 pm
Reply with quote

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
View user's profile Send private message
sathyaraj

New User


Joined: 28 Sep 2007
Posts: 71
Location: India.

PostPosted: Mon Nov 12, 2007 10:05 pm
Reply with quote

Sry.. for not mentioning this..

Teh abend is SOC4
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Mon Nov 12, 2007 11:24 pm
Reply with quote

What does the table look like, please post it.....
Back to top
View user's profile Send private message
sathyaraj

New User


Joined: 28 Sep 2007
Posts: 71
Location: India.

PostPosted: Tue Nov 13, 2007 12:00 am
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Tue Nov 13, 2007 1:43 am
Reply with quote

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
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Tue Nov 13, 2007 2:33 am
Reply with quote

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
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Tue Nov 13, 2007 5:53 am
Reply with quote

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
View user's profile Send private message
venktv

New User


Joined: 29 Mar 2006
Posts: 59
Location: Montreal

PostPosted: Tue Nov 13, 2007 4:18 pm
Reply with quote

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
View user's profile Send private message
sathyaraj

New User


Joined: 28 Sep 2007
Posts: 71
Location: India.

PostPosted: Tue Nov 13, 2007 6:12 pm
Reply with quote

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
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Wed Nov 14, 2007 9:59 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Check data with Exception Table DB2 0
Search our Forums:

Back to Top