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

S0C7 because of memory overlapping


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

Active User


Joined: 21 Jun 2009
Posts: 160
Location: Indore

PostPosted: Thu Jun 10, 2010 5:37 pm
Reply with quote

Thanks Bharath.

One more question.
Where I can see the name of the array's that are having overflow in it.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Thu Jun 10, 2010 5:40 pm
Reply with quote

Bharath Bhat wrote:
Generally adding 1 would not give SOC-7 if the destination field does not have garbage.

rgupta71 wrote:
...when one is added to a variable which contains X'000000'. Its PIC clause is S9(5) COMP-3.
Looks like garbage to me.....
Back to top
View user's profile Send private message
rgupta71

Active User


Joined: 21 Jun 2009
Posts: 160
Location: Indore

PostPosted: Thu Jun 10, 2010 5:41 pm
Reply with quote

CICS Guy ,You are right .I also found this statement to be incorrect.

Thanks.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Jun 10, 2010 5:58 pm
Reply with quote

Using a variable with a value of X'000000' that is defined as PIC S9(05) COMP-3 for arithmetic will automatically generate a S0C7 abend. X'000000' is not a valid numeric value for COMP-3 data.
Back to top
View user's profile Send private message
rgupta71

Active User


Joined: 21 Jun 2009
Posts: 160
Location: Indore

PostPosted: Thu Jun 10, 2010 6:05 pm
Reply with quote

Yes,this what the problem is.Due to some memory overlapping it is having some junk data.

Thanks
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Jun 10, 2010 6:15 pm
Reply with quote

rgupta71 wrote:
Yes,this what the problem is.Due to some memory overlapping it is having some junk data.
Sorry, i did not get this - what kind of concept is this? And what process populates the data in the varaible of type "PIC S9(05) COMP-3" ?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Jun 10, 2010 6:20 pm
Reply with quote

I do not understand your terminology. Memory does not "overlap". It cannot overlap. There are N bytes of memory (where N depends upon the site and the configuration of the LPAR) and none of them can overlap -- ever. They each stand alone and unique. There is a concept in assembler of overlapping moves, which is often used to clear print lines and other data fields, but the move is overlapping -- not the memory.

Memory can be overlaid, certainly, but that is not overlapping. Overlaid memory can be caused by tables exceeding defined limits, subroutines that use more memory than is passed, and so forth. If you think your memory is overlapping, we cannot help you since it is not possible for this to occur. If you think there is an overlay problem, then your program needs a complete code review to determine which table or subroutine call (or whatever) is causing the memory overlay and then you can fix it. This is best accomplished by your peers or seniors at your site, not by a public forum.
Back to top
View user's profile Send private message
rgupta71

Active User


Joined: 21 Jun 2009
Posts: 160
Location: Indore

PostPosted: Thu Jun 10, 2010 6:21 pm
Reply with quote

@ANuj Dhawan
We cannot have X'000000' in a variable that is defined as PIC S9(05) COMP-3.But when the job abends the variable is having X'000000' value.So, I am assuming that there must be some kind of memory overlapping in this case.

Thanks.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jun 10, 2010 6:26 pm
Reply with quote

Quote:
some kind of memory overlapping in this case.
36_11_6.gif 12.gif
Back to top
View user's profile Send private message
rgupta71

Active User


Joined: 21 Jun 2009
Posts: 160
Location: Indore

PostPosted: Thu Jun 10, 2010 6:29 pm
Reply with quote

@dbzTHEdinosauer
What is wrong in this? icon_sad.gif
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jun 10, 2010 6:32 pm
Reply with quote

rgupta71 wrote:
@dbzTHEdinosauer
What is wrong in this?


Robert Sample wrote:
I do not understand your terminology. Memory does not "overlap". It cannot overlap. There are N bytes of memory (where N depends upon the site and the configuration of the LPAR) and none of them can overlap -- ever. They each stand alone and unique. There is a concept in assembler of overlapping moves, which is often used to clear print lines and other data fields, but the move is overlapping -- not the memory.

Memory can be overlaid, certainly, but that is not overlapping. Overlaid memory can be caused by tables exceeding defined limits, subroutines that use more memory than is passed, and so forth. If you think your memory is overlapping, we cannot help you since it is not possible for this to occur. If you think there is an overlay problem, then your program needs a complete code review to determine which table or subroutine call (or whatever) is causing the memory overlay and then you can fix it. This is best accomplished by your peers or seniors at your site, not by a public forum.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Thu Jun 10, 2010 6:34 pm
Reply with quote

rgupta71 wrote:
So, I am assuming that there must be some kind of memory overlapping in this case.
Why, it could be just uninitialized data or data initialized at the group level.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Jun 10, 2010 6:35 pm
Reply with quote

Well, have you read the response from Robert. Before we start with, I'd like to state the classical sentecne from Robert - Terminology is absolutely critical to get right in IT since there are similar terms that may mean very different things.

And to make it worse, Memory is part of the processor where programs are loaded in order to run; you are talking about data of some file, which has to be on a disk -- files are stored on disk drives that are not part of the processor and hence, for sure not of memory.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Jun 10, 2010 6:35 pm
Reply with quote

Quote:
What is wrong in this?


Rober gave a very good explanation why memory overlapping is a wrong term,
You did not care to read/understand his reply
and used the same wrong term again

and... the memory overlay concept is logical one ...
from my point of view I would call it memory/storage corruption
memory/storage contained something good, somebody overlayed/corrupted it with garbage

or the memory/storage contained garbage to start with
Back to top
View user's profile Send private message
rgupta71

Active User


Joined: 21 Jun 2009
Posts: 160
Location: Indore

PostPosted: Thu Jun 10, 2010 6:35 pm
Reply with quote

Thanks a lot dbzTHEdinosauer.

So this means that values of the variables are getting Overlaid.How can we resolve this kind of issue.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Thu Jun 10, 2010 6:37 pm
Reply with quote

rgupta71,
You might be intending to say that definitions overlap (as in redefines). As Robert states, memory does not overlap.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Jun 10, 2010 6:37 pm
Reply with quote

another alternative would be a uninitialized variable.
but without looking at the program and at the dump very difficult to tell !
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Jun 10, 2010 6:40 pm
Reply with quote

Well, please answer this too:
Anuj Dhawan wrote:
And what process populates the data in the varaible of type "PIC S9(05) COMP-3" ?


Peter - i'm ignored again, amen! icon_lol.gif
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jun 10, 2010 6:42 pm
Reply with quote

well, you could stop watching this thread for answers,

we can not provide you with a solution - we don't have your code

we can only provide you with methodologies -

you have an internal-cobol-table-item-field that contains an invalid value.

you can either use your site's debugger (xpeditor, intertest - whatever)
or just start putting DISPLAYs in your code to verify that contents of your
table.

if the program abends each time at the same place (same field occurance)
then you have a start.

also, and important, I was not laughing at you.
I was laughing at this situation which occurs often in this forum.
in fact, there is another thread today, where the discussion lead to
whether or not seniors should make attempts to correct the terminology of posters.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Jun 10, 2010 6:46 pm
Reply with quote

Quote:
So this means that values of the variables are getting Overlaid.How can we resolve this kind of issue.
rgupta71, you have been told -- multiple times -- how to fix the problem. You can review the code yourself to look for potential overlays, you can have a code walk through with your peers to look for potential overlays, you can add display statements to check for memory overlays, you can recompile your program with SSRANGE compiler option and run the program with CHECK(ON), or you can analyze the dump (generate one if you didn't get it already) to find the memory overlay and fix it.

You have plenty of options -- you need to pick one and go with it. There is no reason to repeatedly ask as we cannot debug your code for you (especially since you haven't posted any code). Only someone at your site could fix this problem since access to the source is required.
Back to top
View user's profile Send private message
rgupta71

Active User


Joined: 21 Jun 2009
Posts: 160
Location: Indore

PostPosted: Thu Jun 10, 2010 6:50 pm
Reply with quote

Sorry everyone.
I think it is some synchronization issue.When I was posting reply for the last post meanwhile some other person posted his reply.

Sorry once again.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Jun 10, 2010 6:52 pm
Reply with quote

Ok, not a problem - this thread had been drifted a lot, but could you get a way to go now?
Back to top
View user's profile Send private message
rgupta71

Active User


Joined: 21 Jun 2009
Posts: 160
Location: Indore

PostPosted: Thu Jun 10, 2010 7:01 pm
Reply with quote

I have done modification in the source CBL SSRANGE (1st Line of the Program) in program and changed JCL to EXEC PGM=BATCH to EXEC PGM=BATCH,PARM='/CHECK(ON)'.The job abended as ususal but I am still looking for overflowing array's list.Where I can find the list.

Thanks
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jun 10, 2010 7:06 pm
Reply with quote

What is that I hear?

the scrapping of chairs as everyone madly clears the building!!
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 420
Location: Inside the SPEW (Southwest Ohio, USA)

PostPosted: Thu Jun 10, 2010 7:11 pm
Reply with quote

I think it's in core! icon_biggrin.gif (for you old guys)
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 Goto page 1, 2  Next

 


Similar Topics
Topic Forum Replies
No new posts S0C7 - Field getting overlayed COBOL Programming 2
No new posts Access an specific memory address exp... COBOL Programming 1
No new posts FIELDS OVERLAPPING WITH MODE = IN OR ... CICS 3
No new posts Foreign character look different in m... COBOL Programming 3
No new posts S0C7 abend while running a Cobol Program COBOL Programming 2
Search our Forums:

Back to Top