Debugging REXX programs like the COBOL programs.

Time Sharing Option, Interactive System Productivity Facility and REstructured eXtended eXecutor

Moderator: mickeydusaor

Post Reply
Pathi Kumar
New Member
Posts: 3
Joined: Fri Jan 09, 2015 1:58 pm

Debugging REXX programs like the COBOL programs.

Post by Pathi Kumar »

Hi,

I am a COBOL programmer and an ok programmer in this language. So I understand it to a better extent than other languages. I am learning REXX now and I am pretty new to REXX. I was thinking if there is any way we can debug REXX codes like we can do the COBOL code using XPEDITOR or IBM DEBUG tool.

Please guide.

Thanks,
enrico-sorichetti
Global Moderator
Global Moderator
Posts: 826
Joined: Wed Sep 11, 2013 3:57 pm

Re: Debugging REXX programs like the COBOL programs.

Post by enrico-sorichetti »

look at the wonders of the TRACE command
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort 8-)
zprogrammer
Global Moderator
Global Moderator
Posts: 588
Joined: Wed Nov 20, 2013 11:53 am
Location: Mars

Re: Debugging REXX programs like the COBOL programs.

Post by zprogrammer »

I double Enrico said there are plenty of options along with Trace...
zprogrammer
User avatar
prino
Registered Member
Posts: 68
Joined: Sun Jun 01, 2014 4:15 am
Location: Vilnius, Lithuania
Contact:

Re: Debugging REXX programs like the COBOL programs.

Post by prino »

And you don't even have to change your source if you do a

Code: Select all

TSO EXECUTIL TS
before invoking the code...
Robert AH Prins
robertahprins @ the.17+Gb.Google thingy
Some z/OS code here
Pathi Kumar
New Member
Posts: 3
Joined: Fri Jan 09, 2015 1:58 pm

Re: Debugging REXX programs like the COBOL programs.

Post by Pathi Kumar »

enrico-sorichetti wrote:look at the wonders of the TRACE command


Thanks enrico-sorichetti. I looked at this link http://publibz.boulder.ibm.com/cgi-bin/ ... #SPTREF313 and found it very useful:
TRACE controls the tracing action (that is, how much is displayed to the user) during processing of a REXX program. (Tracing describes some or all of the clauses in a program, producing descriptions of clauses as they are processed.) TRACE is mainly used for debugging. Its syntax is more concise than that of other REXX instructions because TRACE is usually entered manually during interactive debugging. (This is a form of tracing in which the user can interact with the language processor while the program is running.) For this use, economy of key strokes is especially convenient.
If specified, the number must be a whole number.

The string or expression evaluates to:

A numeric option
One of the valid prefix or alphabetic character (word) options described later
Null
The symbol is taken as a constant, and is, therefore:
A numeric option
One of the valid prefix or alphabetic character (word) options described later
The option that follows TRACE or the result of evaluating expression determines the tracing action. You can omit the subkeyword VALUE if expression does not begin with a symbol or a literal string (that is, if it starts with a special character, such as an operator or parenthesis).
Last edited by Anuj Dhawan on Mon Feb 08, 2016 1:46 pm, edited 1 time in total.
Reason: Added quote tags
Pathi Kumar
New Member
Posts: 3
Joined: Fri Jan 09, 2015 1:58 pm

Re: Debugging REXX programs like the COBOL programs.

Post by Pathi Kumar »

I also find this text very useful: http://publibz.boulder.ibm.com/cgi-bin/ ... 2#HDRDEBUG
11.0 Chapter 11. Debug Aids


In addition to the TRACE instruction, (see 3.23) there are the following debug aids:

The interactive debug facility
The TSO/E REXX immediate commands:
HE -- Halt Execution
HI -- Halt Interpretation
TS -- Trace Start
TE -- Trace End
You can use the immediate commands if a REXX exec is running in the TSO/E address space and you press the attention interrupt key. In attention mode, you can enter HE, HI, TS, or TE. You can also use the TS and TE immediate commands in a REXX exec that runs in any address space. That is, TS and TE are available from both ADDRESS MVS and ADDRESS TSO.
The TSO/E REXX command EXECUTIL with the following operands:
HI -- Halt Interpretation
TS -- Trace Start
TE -- Trace End
You can use the EXECUTIL command in an exec that runs in the TSO/E address space. You can also use EXECUTIL from TSO/E READY mode and ISPF and in a TSO/E CLIST. You can use EXECUTIL with the HI, TS, or TE operands in a program written in a high-level programming language using the TSO service facility. See "EXECUTIL" in topic 10.4 for more information.
The trace and execution control routine IRXIC. You can invoke IRXIC from a REXX exec or any program that runs in any address space to use the following TSO/E REXX immediate commands:
HI -- Halt Interpretation
TS -- Trace Start
TE -- Trace End
HT -- Halt Typing
RT -- Resume Typing
Last edited by Anuj Dhawan on Mon Feb 08, 2016 2:02 pm, edited 1 time in total.
Reason: Added Quote Tags.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “TSO, ISPF & REXX (Do you still do CLIST?!).”