View previous topic :: View next topic
|
Author |
Message |
SBMF390
New User
Joined: 27 Jul 2006 Posts: 9
|
|
|
|
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 |
|
|
Muthukumar.PLindia
New User
Joined: 03 Jul 2006 Posts: 51 Location: Chennai
|
|
|
|
SOC4 abend will occur... while trying to write the 5 th record |
|
Back to top |
|
|
SBMF390
New User
Joined: 27 Jul 2006 Posts: 9
|
|
|
|
No, My Question is Where will the Extra 3 records will be written. |
|
Back to top |
|
|
giri_82
New User
Joined: 19 Jul 2006 Posts: 6
|
|
|
|
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 |
|
|
DavidatK
Active Member
Joined: 22 Nov 2005 Posts: 700 Location: Troy, Michigan USA
|
|
|
|
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 |
|
|
SBMF390
New User
Joined: 27 Jul 2006 Posts: 9
|
|
|
|
Yes Dave you are right |
|
Back to top |
|
|
IQofaGerbil
Active User
Joined: 05 May 2006 Posts: 183 Location: Scotland
|
|
|
|
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 |
|
|
SBMF390
New User
Joined: 27 Jul 2006 Posts: 9
|
|
|
|
That's grt. Thanks all. |
|
Back to top |
|
|
ursprasanna Warnings : 2 New User
Joined: 15 May 2006 Posts: 20 Location: chennai
|
|
|
|
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 |
|
|
DavidatK
Active Member
Joined: 22 Nov 2005 Posts: 700 Location: Troy, Michigan USA
|
|
|
|
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 |
|
|
neeraj.cics Currently Banned New User
Joined: 05 Jun 2006 Posts: 1 Location: bangalore
|
|
|
|
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 |
|
|
DavidatK
Active Member
Joined: 22 Nov 2005 Posts: 700 Location: Troy, Michigan USA
|
|
|
|
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 |
|
|
ursprasanna Warnings : 2 New User
Joined: 15 May 2006 Posts: 20 Location: chennai
|
|
|
|
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 |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
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? |
|
Back to top |
|
|
diwa_thilak
Active User
Joined: 13 Jul 2006 Posts: 205 Location: At my desk
|
|
|
|
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 |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
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 |
|
|
|