View previous topic :: View next topic
|
Author |
Message |
Rijit
Active User
Joined: 15 Apr 2010 Posts: 168 Location: Pune
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
Rijit
Active User
Joined: 15 Apr 2010 Posts: 168 Location: Pune
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Rijit
Active User
Joined: 15 Apr 2010 Posts: 168 Location: Pune
|
|
|
|
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 |
|
|
Rijit
Active User
Joined: 15 Apr 2010 Posts: 168 Location: Pune
|
|
|
|
WS-GRP-IDX is PIC S9(4) COMP-3 and used as an index to array . |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
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 |
|
|
|