What source line am I executing?

37 views
Skip to first unread message

Glenn Knickerbocker

unread,
May 12, 2020, 10:30:22 AM5/12/20
to
Wow, how have I gone all these years without trying to do this? I
wanted to add a statement to type out the next line of an exec, so I
could try it in interactive trace before letting it execute.

SOURCELINE(n) returns the nth line, and SOURCELINE() tells me the total
number of lines, but how do I know what line I'm on? Only way I see to
get the current line is to add a trivial internal routine to check SIGL:

ThisLine: Return sigl

(Then, of course, to get the *next* line, if I'm worried about
continuation, I'd have to parse out comments line by line until I find
the end.)

¬R

Rick McGuire

unread,
May 12, 2020, 12:08:13 PM5/12/20
to
If you're using ooRexx, the .line environment variable will return the current line number.

Rick

Glenn Knickerbocker

unread,
May 12, 2020, 8:05:48 PM5/12/20
to

On 5/12/2020 12:08 PM, Rick McGuire wrote:
> If you're using ooRexx, the .line environment variable will return
> the current line number.
Aha, thanks, I think I have used that in the past. Today I was on CMS,
though. (I started to say TSO, because I was working on an ISPF macro,
but no, I got interrupted from that and my tracing problem was in an
MPVM macro I was using to log onto a bunch of IDs to try to find who was
filling up SPOOL.)

¬R
Reply all
Reply to author
Forward
0 new messages