Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Where to put TEST(SYM) for compiling a COBOL code
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: 2502
Location: Atlanta, Georgia, USA

PostPosted: Tue Sep 04, 2012 7:45 pm    Post subject: Reply to: Where to put TEST(SYM) for compiling a COBOL code
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Tue Sep 04, 2012 7:52 pm    Post subject: Re: Where to put TEST(SYM) for compiling a COBOL code
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: 2502
Location: Atlanta, Georgia, USA

PostPosted: Tue Sep 04, 2012 8:07 pm    Post subject: Reply to: Where to put TEST(SYM) for compiling a COBOL code
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    Post subject: Reply to: Where to put TEST(SYM) for compiling a COBOL code
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    Post subject:
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: 2502
Location: Atlanta, Georgia, USA

PostPosted: Tue Sep 04, 2012 8:21 pm    Post subject: Reply to: Where to put TEST(SYM) for compiling a COBOL code
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Tue Sep 04, 2012 8:23 pm    Post subject: Reply to: Where to put TEST(SYM) for compiling a COBOL code
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: 1738
Location: Bloomington, IL

PostPosted: Tue Sep 04, 2012 8:24 pm    Post subject: Re: Reply to: Where to put TEST(SYM) for compiling a COBOL c
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts What is the code in CLIST to enable t... jackzhang75 CLIST & REXX 1 Fri Dec 02, 2016 3:02 am
No new posts IDEAL - Code Retrieval yugendran CA Products 0 Fri Nov 25, 2016 3:27 pm
This topic is locked: you cannot edit posts or make replies. RANDOM Function in COBOL swapnil781 COBOL Programming 2 Tue Nov 15, 2016 6:17 pm
No new posts Regarding COBOL Stored Procedure opti... selvamsrinivasan85 DB2 4 Fri Nov 04, 2016 8:57 pm
No new posts COOLGEN - TSO TEST FACILITY indianrajput CA Products 4 Wed Nov 02, 2016 9:28 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us