View previous topic :: View next topic
|
Author |
Message |
jpgidwani.27
New User
Joined: 10 Aug 2012 Posts: 5 Location: India
|
|
|
|
Hi,
How to use TEST(SYM) option , and where to put it for compiling a COBOL Code, I need this to look for a S0C7 ABEND.
Thanks. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
You can add it to the existing compiler-option parmlist or specify it as a CBL card addition.
Probably adding it as a CBL card addition would be the first choice, as it leaves the exisiting compiler-option parmlist as-is. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Quote: |
I need this to look for a S0C7 ABEND. |
Really? You've had the OFFSET calculated for you (unless you are on a very old system). The OFFSET is easily connected to the failing Cobol code on the compile listing. Depending on the particular instruction causing the failure there are usually only one or two possibilities for which field is erroneous.
Still, if you feel it is less effort to do it a different way... |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Bill,
Wasn't even going to go there....
Maybe he's using DeBug Tool? |
|
Back to top |
|
|
jpgidwani.27
New User
Joined: 10 Aug 2012 Posts: 5 Location: India
|
|
|
|
Hi,
I get offset addresses in compile listing, but i do not get it exactly, for e.g. its
+000BDA6 and I find only nearest is BDA0, is there a way to do so. |
|
Back to top |
|
|
jpgidwani.27
New User
Joined: 10 Aug 2012 Posts: 5 Location: India
|
|
|
|
i.e. is there a way to get exact address in listing. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Use compile options LIST,NOOFFSET, which will generate the Assembler expansion of the COBOL program, which allows you to narrow it down to the exact instruction, which is probably going to be a packed-decimal instruction, such as a ZAP, SP, AP, SRP, etc.
Is this CICS or non-CICS COBOL? |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
From the ordinary listing, take the instruction which is lower than or equal to the OFFSET from the abend output.
If it is not exact, you'll find that are least on of your fields requires some maniplulation before it is fit for causing an abend. For instance, if you have a USAGE DISPLAY field, it will be converted to packed-decimal before it abends, so the OFFSET will not be exact.
To get the exact line of pseudo-assembler generated by the compiler, compile with option LIST. You should then get an exact match, in all cases except where code in your "procedure division" has been overwritten. |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
jpgidwani.27 wrote: |
Hi,
I get offset addresses in compile listing, but i do not get it exactly, for e.g. its
+000BDA6 and I find only nearest is BDA0, is there a way to do so. |
That is the exact address. You mean an address of a first assembler instruction in a source statement. To find the source statement, look at the PMAP and find the statement with the highest address less than or equal to the offset at abend. |
|
Back to top |
|
|
|