Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Problem in loading a table...

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Problem in loading a table...
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    Post subject:
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: 3158
Location: Tucson AZ

PostPosted: Mon Nov 12, 2007 11:24 pm    Post subject:
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    Post subject:
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: 3158
Location: Tucson AZ

PostPosted: Tue Nov 13, 2007 1:43 am    Post subject:
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

Active Member


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

PostPosted: Tue Nov 13, 2007 2:33 am    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SYMNAMES problem jacobdng DFSORT/ICETOOL 7 Thu Dec 22, 2016 7:47 am
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm
No new posts Problem in Running Query via JCL vickey_dw DB2 3 Tue Oct 18, 2016 11:11 pm
No new posts DB2 Streaming Batch Processing Problem Manshadi DB2 4 Sat Sep 24, 2016 12:14 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us