Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 965
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 Update table without cursor Ron Klop DB2 3 Wed Oct 11, 2017 1:06 pm
No new posts Table(Unicode(Graphic) table) loading... muralikrishnan_new DB2 0 Thu Oct 05, 2017 5:10 pm
No new posts LMINIT problem - not finding DDNAME Danielle.Filteau CLIST & REXX 7 Tue Sep 19, 2017 9:57 pm
No new posts Insert a Row_number into table useit DB2 2 Tue Sep 19, 2017 1:07 pm
No new posts how to see when the last read access ... Mike 1304 DB2 1 Tue Sep 12, 2017 7:52 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us