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

Where to put TEST(SYM) for compiling a COBOL code


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

New User


Joined: 10 Aug 2012
Posts: 5
Location: India

PostPosted: Tue Sep 04, 2012 7:43 pm
Reply with quote

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
View user's profile Send private message
Bill O'Boyle

CICS Moderator


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

PostPosted: Tue Sep 04, 2012 7:45 pm
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


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

PostPosted: Tue Sep 04, 2012 7:52 pm
Reply with quote

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
View user's profile Send private message
Bill O'Boyle

CICS Moderator


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

PostPosted: Tue Sep 04, 2012 8:07 pm
Reply with quote

Bill,

Wasn't even going to go there.... icon_rolleyes.gif

Maybe he's using DeBug Tool?
Back to top
View user's profile Send private message
jpgidwani.27

New User


Joined: 10 Aug 2012
Posts: 5
Location: India

PostPosted: Tue Sep 04, 2012 8:10 pm
Reply with quote

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
View user's profile Send private message
jpgidwani.27

New User


Joined: 10 Aug 2012
Posts: 5
Location: India

PostPosted: Tue Sep 04, 2012 8:11 pm
Reply with quote

i.e. is there a way to get exact address in listing.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


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

PostPosted: Tue Sep 04, 2012 8:21 pm
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


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

PostPosted: Tue Sep 04, 2012 8:23 pm
Reply with quote

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
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Tue Sep 04, 2012 8:24 pm
Reply with quote

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
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

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts run rexx code with jcl CLIST & REXX 15
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Compile rexx code with jcl CLIST & REXX 6
Search our Forums:

Back to Top