IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search Log in to check your private messages Log in
 

S0C7 abend not able to locate


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

Active User


Joined: 15 Apr 2010
Posts: 168
Location: Pune

PostPosted: Wed Apr 01, 2015 4:03 pm
Reply with quote

Code:
064BDA, F921 2707 34E0          CP    1799(3,2),1248(2,3)     WS-GRP-IDX


can anyone help me to understand this machiNE instruction. i am getting a S0C 7 on this instruction. I got to know about this instruction from abendaid log .I want to locate which instruction is causing the S0c7 abend.

Thanks

Code'd
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Wed Apr 01, 2015 4:31 pm
Reply with quote

The instruction is an Assembler Compare Packed (CP) instruction -- it is used to compare two packed decimal numbers. COBOL generates anywhere from 1 to many Assembler instructions for a single COBOL statement. To locate the instruction causing the S0C7, you need to look at the COBOL compile listing and find which COBOL statement this instruction is generated for. The actual Assembler instruction does not matter too much -- what is important is which COBOL statement had the problem.
Back to top
View user's profile Send private message
Rijit

Active User


Joined: 15 Apr 2010
Posts: 168
Location: Pune

PostPosted: Wed Apr 01, 2015 5:38 pm
Reply with quote

Robert Sample wrote:
The instruction is an Assembler Compare Packed (CP) instruction -- it is used to compare two packed decimal numbers. COBOL generates anywhere from 1 to many Assembler instructions for a single COBOL statement. To locate the instruction causing the S0C7, you need to look at the COBOL compile listing and find which COBOL statement this instruction is generated for. The actual Assembler instruction does not matter too much -- what is important is which COBOL statement had the problem.


Hi Robert,

Any idea how to map this assembler instruction with the actual cobol instruction which is causing the S0C7 abend.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7312
Location: Inside the Matrix

PostPosted: Wed Apr 01, 2015 6:25 pm
Reply with quote

It looks like you have copied that line from the listing. I don't understand where you got the comma from...

Shortly above that line, you should find the compiler source line-number and the COBOL verb which generated that code.

The name WS-GRP-IDX is being compared to "somethiing", whose name you've chopped off.

Either WS-GRP-IDX (looks like a poor name, because it isn't an index) is not numeric, or "something" is not numeric.
Back to top
View user's profile Send private message
Rijit

Active User


Joined: 15 Apr 2010
Posts: 168
Location: Pune

PostPosted: Wed Apr 01, 2015 6:43 pm
Reply with quote

Code:

064BD2                 GN=3122  EQU   *
064BD2  5820 9268               L     2,616(0,9)              BLW=78
064BD6  5830 C058               L     3,88(0,12)              CBL=5
064BDA  F921 2707 34E0          CP    1799(3,2),1248(2,3)     WS-GRP-IDX   
064BE0  4720 B48A               BC    2,1162(0,11)            GN=1100(064C3C)
064BE4  5840 D108               L     4,264(0,13)             DOV=1
064BE8  F273 4058 2719          PACK  88(8,4),1817(4,2)       TS2=16


got the message from program sysout
Code:

t compile unit offset +00064BDA at entry offset +00064BDA


used 64BDA and searched in program listing and found the instruction
Code:

064BDA  F921 2707 34E0          CP    1799(3,2),1248(2,3)     WS-GRP-IDX      PGMLIT AT +16516
[/quote]
Back to top
View user's profile Send private message
Rijit

Active User


Joined: 15 Apr 2010
Posts: 168
Location: Pune

PostPosted: Wed Apr 01, 2015 6:55 pm
Reply with quote

WS-GRP-IDX is PIC S9(4) COMP-3 and used as an index to array .
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7312
Location: Inside the Matrix

PostPosted: Wed Apr 01, 2015 7:03 pm
Reply with quote

See, now there's no comma :-)

Press PF7. You should see a line which has just a line-number and a COBOL verb or clause. Look at that (compiler-generated, the number at the left of the listing) line and you should see exactly what is being used.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7312
Location: Inside the Matrix

PostPosted: Wed Apr 01, 2015 7:07 pm
Reply with quote

Rijit wrote:
WS-GRP-IDX is PIC S9(4) COMP-3 and used as an index to array .


Well, no it isn't.

I mean it's not being used as an index. Which is why I think -IDX is misleading. And COBOL doesn't have arrays (it has Tables, with OCCURS).

An index is defined (implicitly, the compiler does it) by INDEXED BY.

A data-item used for subscripting (what you have) is a different thing.

It is better as an unsigned BINARY PIC 9(4).
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2504
Location: Atlanta, Georgia, USA

PostPosted: Wed Apr 01, 2015 9:05 pm
Reply with quote

Expanded instruction ===> CP 1799(3,2),1248(2,3)

1st-Operand = at 1799 off R2 for a length of 3

2nd-Operand = at 1248 off R3 for a length of 2

Find the addresses of R2 and R3 in your dump and then go to each one of these offsets.

You're going to find non packed-decimal data at these addreses in one or both.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> COBOL Programming
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Forum Replies
No new posts ABEND=04E FOR REASON=00E50013 DB2 4
No new posts Any idea about how to solve 3022 aben... IMS DB/DC 3
No new posts Handling abend to prevent termination CICS 0
No new posts Abend deletes last record written ABENDS & Debugging 10
No new posts APCT Abend while running an online CI... CICS 1

Back to Top