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

TRACE ON for a COBOL Program


IBM Mainframe Forums -> IBM Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
shikhagupta33

New User


Joined: 11 Apr 2005
Posts: 7
Location: Bangalore

PostPosted: Fri Mar 13, 2009 12:10 pm
Reply with quote

Hi All,

I my previous project I was using TRACE ON (on command line) while I opened my cobol program in edit mode. The TRACE on used to display all the PAPAs called while execution of the program. For some reasons my intertest is not working. So I am trying TRACE on option, so that I get the flow of my program for a given i/p record. But in this project it seems TRACE on is not working.

It would be really helpful If anybody can provide me the REXX routine for the same.
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: Fri Mar 13, 2009 6:56 pm
Reply with quote

With the introduction of COBOL II, some 20+ years ago, the TRACE option (assuming that you're referring to READY TRACE) was removed.

The following link outlines features which were removed from OS/VS COBOL upon migration to VS COBOL II -

ibmmainframes.com/references/a10.html

Regards,
Back to top
View user's profile Send private message
shikhagupta33

New User


Joined: 11 Apr 2005
Posts: 7
Location: Bangalore

PostPosted: Sat Mar 14, 2009 10:21 am
Reply with quote

Oh! I did not know this. But I need TRACE on urgently. Does anybody have the REXX tool for that. Would u mind sharing that with me?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat Mar 14, 2009 10:28 am
Reply with quote

Hello,

The rexx trace is for trouble-shooting rexx code. I've not seen it used to trace cobol.

If your system has intertest, it would probably be a good thing to do to determine why it is not now working. Possibly working with the technical support people can get intertest working again.

If not and something must be worked with today, suggest you place some DISPLAY statements thru the code to manually track the code.
Back to top
View user's profile Send private message
shikhagupta33

New User


Joined: 11 Apr 2005
Posts: 7
Location: Bangalore

PostPosted: Sat Mar 14, 2009 10:45 am
Reply with quote

The TRACE ON can be keyed in on command line (while cobol code is opened in edit mode). The hit enter, it will put display statements in every para.
like
A000-PARA1.
DISPLAY " A000-PARA1."
MOVE A TO B.
---
---
---
B000-PARA2.
DISPLAY " B000-PARA2."
MOVE D TO F.

Then the pgm needs to be compiled to get the desired result.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat Mar 14, 2009 7:09 pm
Reply with quote

Hello,

This TRACE sounds like a site-specific utiliity that inserts/removes a DISPLAY after each paragraph name.

You might look here for a similar tool that you could use on your system (Thanks to Anuj icon_smile.gif )
ibmmainframes.com/viewtopic.php?t=38498
Back to top
View user's profile Send private message
shikhagupta33

New User


Joined: 11 Apr 2005
Posts: 7
Location: Bangalore

PostPosted: Sun Mar 15, 2009 7:52 pm
Reply with quote

Thank you for the code. I will try it.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Sun Mar 15, 2009 8:45 pm
Reply with quote

Hi,

If you face any problem in using that, please let me know.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Mon Mar 16, 2009 2:57 am
Reply with quote

The "USE FOR DEBUGGING ON ALL PROCEDURES" clause in Enterprise COBOL acts very similar to what READY TRACE did in OS/VS COBOL. See Programming Language Reference Manual, DEBUGGING Declarative.
Back to top
View user's profile Send private message
karz

New User


Joined: 04 Feb 2010
Posts: 39
Location: Mumbai

PostPosted: Thu Jun 10, 2010 5:45 pm
Reply with quote

Hi anuj, iam not able to run the REXX given in the link ibmmainframes.com/viewtopic.php?t=38498...

the rexx executes but no displays are inserted in the source
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jun 10, 2010 5:49 pm
Reply with quote

Anuj,

welcome to 99% of the problem of providing code to rookies - support!
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Jun 10, 2010 6:02 pm
Reply with quote

Well, that's why Indian gets most of the support projects - I, for one, sometimes feel - do the people like us have future in India in IT or should I move to some other country. It looks like, there is no more fun in IT around here - I'm disappointed. icon_sad.gif
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jun 10, 2010 6:05 pm
Reply with quote

rename it to something like ADDDISP

trace and derivatives are reserved words.
Back to top
View user's profile Send private message
karz

New User


Joined: 04 Feb 2010
Posts: 39
Location: Mumbai

PostPosted: Thu Jun 10, 2010 6:05 pm
Reply with quote

Anuj, dont get disappointed..new starters do face such problems..and we woudl learn from experiences only...
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jun 10, 2010 6:07 pm
Reply with quote

my using the term rookies has nothing to do with ethnic background.

is only has to do with experience.

and don't read anything else into my comment.
Back to top
View user's profile Send private message
karz

New User


Joined: 04 Feb 2010
Posts: 39
Location: Mumbai

PostPosted: Thu Jun 10, 2010 6:09 pm
Reply with quote

renamed the rexx to ADDDISP, did num OFF on my source and then did TSO ADDDISP...but it did not work
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Jun 10, 2010 6:11 pm
Reply with quote

Ok, when you say - it did not work; what exactly happened actually?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jun 10, 2010 6:11 pm
Reply with quote

try leaving num std cob
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jun 10, 2010 6:13 pm
Reply with quote

also,

do all your paragraph/section names begin in column 8?
Back to top
View user's profile Send private message
karz

New User


Joined: 04 Feb 2010
Posts: 39
Location: Mumbai

PostPosted: Thu Jun 10, 2010 6:19 pm
Reply with quote

yes..all my para names start from column 8..teh rexx does executes..i mean teh screen flashes for a sec just like when REXX executes..but then no displays are inserted..
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jun 10, 2010 6:49 pm
Reply with quote

since this is an edit macro, you do not need (actually you should not)
type TSO macroname
simply type macroname on command line.
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 -> IBM Tools

 


Similar Topics
Topic Forum Replies
No new posts Cobol prog to put an indicator on the... JCL & VSAM 1
No new posts COBOL Ascending and descending sort n... COBOL Programming 5
No new posts Receiving RC 5 when executing REXX pr... CLIST & REXX 3
No new posts COBOL program logic for comparisipn o... COBOL Programming 2
No new posts COBOL - create and write to output fi... COBOL Programming 0
Search our Forums:

Back to Top