Page 1 of 3

Set Trace ON/OFF

PostPosted: Mon Jun 17, 2013 11:17 pm
by LaBeets
Would anyone know how to set trace on/off for a cobol program using TSO ?

On the Command Line you enter:
Set Trace On and hit enter

But the question is really how do get this to display the paragraphs names when executing the JCL.
I executed the JCL and nothing was traced.
Am I missing something ?

Thanks
La Beets

Re: Set Trace ON/OFF

PostPosted: Mon Jun 17, 2013 11:26 pm
by Pedro
JCL is asynchronous to the TSO. The only settings the JCL knows are the settings provided within the JCL when the job was submitted. Check your JCL for PARM=(...) and update is necessary for the program being executed.

Re: Set Trace ON/OFF

PostPosted: Mon Jun 17, 2013 11:30 pm
by LaBeets
Wrong answer, the correct program was executed, nothing was traced.

Re: Set Trace ON/OFF

PostPosted: Mon Jun 17, 2013 11:48 pm
by Akatsukami
Read this thread from our sister board about COBOL tracing.

Re: Set Trace ON/OFF

PostPosted: Tue Jun 18, 2013 12:03 am
by Robert Sample
La Beets, what kind of trace are you expecting? Have you seen this trace output before? COBOL used to have a READY TRACE facility that would display paragraph names when the first statement in the paragraph was executed, but that facility has not existed in COBOL for well over 20 years. Certain third-party software products, such as Xpediter, allow for tracing of code but the set up for such products would be specific to your site and only someone working at your site would be able to help you set up such a trace. IBM's Debug Tool package probably can do tracing, but again it is an extra-cost item NOT part of the base product and hence only someone working at your site could tell you how to invoke it. I am not aware of any TSO command as you described, so your problem description is by no means accurate nor complete.

So why don't you start at the beginning and tell us:
- what COBOL you are using
- what platform you are using that COBOL on
- what extra products (if any) your site uses such as Xpediter or Debug Tool
- which page of which COBOL manual you are reading that indicates the SET TRACE ON syntax (or, if not a COBOL manual then give us the IBM reference number for the manual and the page you are reading)

Re: Set Trace ON/OFF

PostPosted: Tue Jun 18, 2013 12:11 am
by LaBeets
So why don't you start at the beginning and tell us:
- what COBOL you are using
COBOL for z/OS

- what platform you are using that COBOL on
Being run on the Mainframe

- what extra products (if any) your site uses such as Xpediter or Debug Tool
Doesn't matter, we have Smarttest I can use but 'Set trace On' should work, I've used it before on
the same platform and it worked, just don't remember waht piece is missing.

- which page of which COBOL manual you are reading that indicates the SET TRACE ON syntax (or, if not a COBOL manual then give us the IBM reference number for the manual and the page you are reading)
Set Trace On is a ISPF/TSO Option
If I had the manula I would find the answer.

COBOL for z/OS

Re: Set Trace ON/OFF

PostPosted: Tue Jun 18, 2013 12:24 am
by Pedro
Set Trace On is a ISPF/TSO Option

ISPF is a platform. Numerous vendors provide ISPF panels as part of their products. Telling us that you issued 'SET TRACE ON' in some panel is not useful. What product's panel were you displaying when you issued the command? Provide us with the panel ID and panel title.

Re: Set Trace ON/OFF

PostPosted: Tue Jun 18, 2013 12:36 am
by LaBeets
Go to ISPF on the IBM MAinframe.
Go to the EDIT screen and bring up some source code.
Once there, on the COMMAND Line type in 'SET TRACE ON'

Re: Set Trace ON/OFF

PostPosted: Tue Jun 18, 2013 12:47 am
by Akatsukami
LaBeets wrote:So why don't you start at the beginning and tell us:
- what COBOL you are using
COBOL for z/OS

Well, "COBOL for z/OS" means, in IBM's parlance, Enterprise COBOL...which, as Mr. Sample says, has never had an intrinsic trace feature. It may well be that, in the past, you used a seriously obsolete compiler (IIRC, READY TRACE was made inefficacious in VS COBOL II). Use the "USE FOR DEBUGGING ON ALL PROCEDURES" directive instead.

Re: Set Trace ON/OFF

PostPosted: Tue Jun 18, 2013 12:58 am
by LaBeets
I disagree SET TRACE ON does work for Cobol on the Mainframe.

I'm not looking for an alternative, I'm trying to get this to work, and it does work but a piece is missing for Cobol II.

I know all about IBM-Z10 WITH DEBUGGING MODE.

And no, this wasn't used with a 'seriously obsolete compiler', it was used with the 'seriously modern compiler'.

If can't answer the question, why answer ?