• What source line am I executing?

    From Glenn Knickerbocker@21:1/5 to All on Tue May 12 10:30:20 2020
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rick McGuire@21:1/5 to All on Tue May 12 09:08:11 2020
    If you're using ooRexx, the .line environment variable will return the current line number.

    Rick

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Glenn Knickerbocker@21:1/5 to Rick McGuire on Tue May 12 20:05:46 2020
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)