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
 
S0c4 abend question

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> ABENDS & Debugging
View previous topic :: :: View next topic  
Author Message
shankarm

Active User


Joined: 17 May 2010
Posts: 175
Location: India

PostPosted: Sun Mar 11, 2012 7:01 pm    Post subject: S0c4 abend question
Reply with quote

Hi am getting a s0c4 abend.
I tried recompiling the program with OFFSET option,
Code:

COB2 EXEC PGM=IGYCRCTL,PARM='OBJECT,NOTEST,OFFSET,DATA(24)',


Link with below parameters
Code:

LKED     EXEC PGM=IEWL,PARM='XREF,LIST,LET,MAP,AMODE=31,RMODE=ANY',


Abend message in sysout is,
Code:

offset +0000381E at entry offset +0000381E at address 15E03926.


When i search for '381E' in my compile program. it says search string not found.
My unserstanding was that, when a cobol program is compiled, it generates assembler code and it will have the offset address.

Am i doing something wrong? why am i not able to find '381E' in my compile job?

Please help.
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Sun Mar 11, 2012 7:08 pm    Post subject: Reply to: S0c4 abend question
Reply with quote

Cobol code rarely translates one-to-one, so there will typically be many assembler instructions from one line of Cobol code.

When you have the offset, you have to find the source line whose offset is closest but less than the offset you are looking for.

If you generate the pseudo-assembler in the compile listing you will get an exact hit for the offset of the assembler generated, and it is the previous Cobol statement that the code has been generated from.
Back to top
View user's profile Send private message
shankarm

Active User


Joined: 17 May 2010
Posts: 175
Location: India

PostPosted: Sun Mar 11, 2012 7:20 pm    Post subject:
Reply with quote

Bill,

The below lines of code is from the compile program,


Code:

000979 003778 IF                            000980 003782 WRITE 
000982 0038D8 ADD                           000984 0038F2 IF     
000986 003A0E ADD                           000988 003A28 IF     


The error offset is 381E in the above lines we have '3782 WRITE' which is closest but less than 381E.

so, The write operation could be the issue correct?

Pseudo-assembler is generated when 'LIST' option is used correct?
I have used list option but still there is no exact hit for '381E'

The compiler parm used is mentioned in my first post. Please correct me if i am wrong.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Sun Mar 11, 2012 7:46 pm    Post subject: Reply to: S0c4 abend question
Reply with quote

Yes, it is the code to do with the WRITE that has failed.

Are you saying you used LIST and didn't get the pseudo-assembler, or just didn't get a match to the offset?

If you have your LIST output, compare the code to the code around the location of the offset from the dump. Check what is being written, is the file open, stuff like that.

If you have the LIST and the code doesn't match, or the OFFSET is in the middle of an instruction, then you either have a problem with overwriting (start by looking to see if SSRANGE compile option is set) or you are not running the program you are looking at the compile listing of.
Back to top
View user's profile Send private message
shankarm

Active User


Joined: 17 May 2010
Posts: 175
Location: India

PostPosted: Sun Mar 11, 2012 8:04 pm    Post subject:
Reply with quote

Thanks a lot Bill.

I am writing this below description about the issue for others to use in future,

I got a S0c4 abend and i got the offset address of the code throwing the error from sysout of my job.

i recompiled the program and searched for the offset address throm in sysout. I didn't get any match.

I changed the compiler option as below, with LIST

Code:

EXEC PGM=IGYCRCTL,PARM='OBJECT,NOTEST,LIST,DATA(24)'


and recompiled the program.

In the recompiled job, i searched for offset in SYSPRINT.


Code:

00381E  0E46                    MVCL 4,6       


I got the above match, the error is thrown in MVCL command.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Sun Mar 11, 2012 8:13 pm    Post subject:
Reply with quote

The OFFSET compiler option provides the offsets within the program for each COBOL verb. Since there may be multiple pseudo-assembler statements generated for each COBOL verb, as you have found the precise offset of an abend may be between the offsets of two COBOL verbs since it may occur on any pseudo-assembler instruction. The LIST compiler option will produce a pseudo-assembler listing of the entire program, so the exact offset of an abend can be located (in most cases); the cost is that the listing will be larger than if OFFSET is used.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Sun Mar 11, 2012 8:48 pm    Post subject: Reply to: S0c4 abend question
Reply with quote

Be careful when doing a re-compile. If you use a different option which affects the generated code (say, SSRANGE) the offset from the dump will no longer stand any chance of matching the listing, so the job will have to be run again to obtain the new dump with offset: which should then be in the listing.

Have a look here for a method to ensure you are looking at the same code from the run and the listing.
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 -> ABENDS & Debugging All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts ASP3 ABEND IN CICS Vedant CICS 0 Fri Oct 20, 2017 3:18 pm
No new posts question about dfsms management clas... Hervey Martinez IBM Tools 0 Tue Oct 10, 2017 6:19 pm
No new posts Question related to Data dictionary f... rexx77 SYNCSORT 3 Thu Aug 31, 2017 7:23 am
No new posts C03 ABEND sjiraga PL/I & Assembler 1 Thu Jun 01, 2017 4:51 pm
No new posts QUESTION: RETURN CHANNEL pahiker CA Products 21 Thu Apr 20, 2017 12:31 am

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