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
 
Internal Table Over Flow

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
SBMF390

New User


Joined: 27 Jul 2006
Posts: 9

PostPosted: Tue Aug 01, 2006 11:08 am    Post subject: Internal Table Over Flow
Reply with quote

Suppose i have a table X occurs 5 Times, But I increment the counter and Write 8 times. Where will the Extra 3 records will go.
Back to top
View user's profile Send private message

Muthukumar.PLindia

New User


Joined: 03 Jul 2006
Posts: 51
Location: Chennai

PostPosted: Tue Aug 01, 2006 11:16 am    Post subject:
Reply with quote

SOC4 abend will occur... while trying to write the 5 th record
Back to top
View user's profile Send private message
SBMF390

New User


Joined: 27 Jul 2006
Posts: 9

PostPosted: Tue Aug 01, 2006 11:25 am    Post subject:
Reply with quote

No, My Question is Where will the Extra 3 records will be written.
Back to top
View user's profile Send private message
giri_82

New User


Joined: 19 Jul 2006
Posts: 6

PostPosted: Tue Aug 01, 2006 3:04 pm    Post subject:
Reply with quote

The Next three records wont be written.. It will give soc4 on referring to the 6th occurance. ie it will abend while trying to write the 6th record
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Tue Aug 01, 2006 8:17 pm    Post subject: Re: Internal Table Over Flow
Reply with quote

Can I ask a clarification of your question? Are you asking if you have a table TBL-X occurs 5 times, and you populate the table to TBL-X(8) what happened to table occurrences 6, 7, and 8?

Dave
Back to top
View user's profile Send private message
SBMF390

New User


Joined: 27 Jul 2006
Posts: 9

PostPosted: Wed Aug 02, 2006 10:10 am    Post subject:
Reply with quote

Yes Dave you are right
Back to top
View user's profile Send private message
IQofaGerbil

Active User


Joined: 05 May 2006
Posts: 183
Location: Scotland

PostPosted: Wed Aug 02, 2006 2:42 pm    Post subject: Re: Internal Table Over Flow
Reply with quote

Would the data not be written to the next available slot in memory as if the table was defined as occurs 8?

thus any fields actually defined after the 5th occurance would overwrite the working storage which can lead to trouble eg S0C7s etc
sometimes depending on where the table is situated and by how much you overwrite it you can also corrupt the program code itself.
Back to top
View user's profile Send private message
SBMF390

New User


Joined: 27 Jul 2006
Posts: 9

PostPosted: Wed Aug 02, 2006 5:33 pm    Post subject:
Reply with quote

That's grt. Thanks all.
Back to top
View user's profile Send private message
ursprasanna
Warnings : 2

New User


Joined: 15 May 2006
Posts: 20
Location: chennai

PostPosted: Thu Aug 03, 2006 11:57 pm    Post subject:
Reply with quote

hi Iqofagerbil,

you have mentioned that there will be a SOC7 error . but i think it must be a SOC4 error .

the s0c7 error occurs only where there is a alphanumeric field in a numeric variable or vice versa.

Please correct me if i am wrong.

can u please explain if how there could be a soc7 error in that case if am wrong.

Thanks,
prasanna subramaniam.
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Fri Aug 04, 2006 12:29 am    Post subject: Re: Internal Table Over Flow
Reply with quote

prasanna,

0C7s are pretty common on table overflow conditions. As correctly stated above, when you overflow the table, it overlays any working storage following the table definition. The 0C7 occurs when you overlay a COMP-3 field with non-packed data, and then try to access the field. The table overflow ABEND generally does not occur on the overflow of the table, but rather when you try to access the corrupted data following the table.

Dave
Back to top
View user's profile Send private message
neeraj.cics
Currently Banned

New User


Joined: 05 Jun 2006
Posts: 1
Location: bangalore

PostPosted: Fri Aug 04, 2006 2:04 am    Post subject:
Reply with quote

i think all you r saying it may be right.but i think records 6,7,8 may come in the ouput unless u have not given SSRANGE IN the syntax.....we have to define SSRANGE or you can retrieve data above the defined range.....
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Fri Aug 04, 2006 4:28 am    Post subject: Re: Internal Table Over Flow
Reply with quote

Neeraj,

I agree with you partly. You can store data in a table outside the limits of the table, and then retrieve it later in the processing, assuming that the program does not abend, and the program has not stored data in the variables that were corrupted by the overlay, now corrupting the table entry or having the program use a corrupted variable from the overlay. This condition, where the program does not abend and the table has been overflowed, can be very difficult to analyze.

Good programming code will prevent this from happening. The problem with using SSRANGE is the CPU resources it takes to execute. And then your program still Abends when a fault is encountered. I guess this prevents the problem of the program continuing to run.


Dave
Back to top
View user's profile Send private message
ursprasanna
Warnings : 2

New User


Joined: 15 May 2006
Posts: 20
Location: chennai

PostPosted: Fri Aug 04, 2006 1:11 pm    Post subject: Re: Internal Table Over Flow
Reply with quote

Dave,

I am completely confused on this . can you make it more clear.

As of as i know when you try to store more than the specified range and the program is compiled with out the ss-range option the 6,7,8 values will be over writen on the 5 position and if the program is compiled with out ss-range option it will go with a soc4 abend saying memeory violation.

I am not clear of what you have mentioned about the bata overflow in the working storage .....

thanks in advanvce for your efforts,

Prasanna subramaniam.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat Aug 05, 2006 8:21 am    Post subject: Re: Internal Table Over Flow
Reply with quote

Hi guys,

The ques that wasn't asked, like Sherlock Holmes' dog that didn't bark is the key that solves the mystery.

Does the table use an index or a subscript? If an index, then an 0C4 results.

If a subscript, you have your choice of disasters. An 0C7 is the most common if the moved data stays within the WS. If the data move goes outside the bounds of the pgm an 0C4 results. If the data is moved into the procedure division code anything can happen. If you're REALLY unlucky you may not get any abend at all, but your pgm will probably produce erroneous data. BAD!!!

Did I just make a case for using indexes for tables? icon_confused.gif
Back to top
View user's profile Send private message
diwa_thilak

Active User


Joined: 13 Jul 2006
Posts: 205
Location: At my desk

PostPosted: Mon Aug 07, 2006 10:00 am    Post subject:
Reply with quote

Hi guys,

I can explain this with my personel experience.

I had a cobol program which can handle 10 rows (internal table). Once there was an issue with the input, we got 13 records.

The following error msg is displayed in Sysprint and the job got abended.

RECORD TYPE=F,LENGTH=(000111,,)
CEE3207S The system detected a data exception (System Completion Code=0C7).


you can clearly see there is data access violation. Which will usually result when trying to access the memory area outside the scope.

the records will not be processed for the rest.

Hope i could make things clear.

regards,
Diwakar.D
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Thu Aug 10, 2006 3:26 am    Post subject:
Reply with quote

Hi Diwakar.D,

You didn't get an 0C7 abend because you "accessed" data outside the "scope", you got it because the system executed an arithmetic instruction against data that wasn't formatted properly for that type of arithmetic instruction.

There's a world od difference between the two.
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 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
No new posts PC (UTF-8) -> z/OS (EBCDIC) -> ... prino All Other Mainframe Topics 4 Fri Sep 01, 2017 1:47 am
No new posts Adding a userid to SMTP Security table Yolanda Harvey JCL & VSAM 1 Sun Aug 13, 2017 6:16 pm
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 19 Thu Jul 13, 2017 2:11 pm

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