Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Syntax for calling an Edit macro from a REXX - UPDATE

237 views
Skip to first unread message

Bob Bridges

unread,
Jan 22, 2019, 6:27:27 AM1/22/19
to
I got part of it figured out, but part of it still puzzles me. If the
calling routine is an Edit macro itself, I can call the external routine
this way:

address ISREDIT macname

That works correctly. But if the user invokes the calling routine with the
"TSO" prefix, ie

==>tso caller

...then any attempt to do an ISREDIT command will return rc=20. Is there a
way to get around this? If I'm in a View or Edit session and type "tso
caller", is there any way to get the CALLER routine to fire up an external
Edit macro to look at the current listing?

(Side hike: It's silly to call it an Edit "macro". These are full-blown
programs, not just macros. The same with VBA programs in MS Office; they go
far beyond "macros".)

---
Bob Bridges, cell 336 382-7313
robhb...@gmail.com
rbri...@InfoSecInc.com

/* A delay is better than a disaster. -Found taped to a departed IS
manager's keyboard */


-----Original Message-----
From: Bob Bridges [mailto:robhb...@gmail.com]
Sent: Tuesday, January 22, 2019 05:35

I have an Edit macro that is capable of parsing certain information under
the cursor: It determines which of several types of listings it's looking
at, and extracts the information based on the expected format. Now I find
that I want to write another Edit macro that starts the same way.

So what I want to write first is an Edit macro that can fetch that
information and return it to the calling routine. No problem, right?
Except now that I've started on it, I realize I'm uncertain about the syntax
of the call.

I know how to invoke an Edit macro in a Edit or View invocation:

address ISPEXEC 'EDIT DATASET('whatever') MACRO('macname')'

But what about when the listing is already being displayed? If I try
calling it in any of the usual ways...

address TSO macname
<macname>
call value(macname)

...surely the ISREDIT commands won't be available? I'm not sure where to
look for this in the documentation. Has anyone done it before?

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LIST...@VM.MARIST.EDU with the message: INFO TSO-REXX

Mike Shaw

unread,
Jan 22, 2019, 8:47:34 AM1/22/19
to
Bob,

If you are in edit when the listing is on screen that you want to extract
cursor-located information from, just type the name of the edit macro on
the ISPF command line. It will work if your edit macro is constructed
correctly.

Mike Shaw
MVS/QuickRef Support Group
Chicago-Soft, Ltd.

Jeremy Nicoll

unread,
Jan 22, 2019, 12:13:34 PM1/22/19
to
On Tue, 22 Jan 2019, at 11:27, Bob Bridges wrote:

> That works correctly. But if the user invokes the calling routine with the
> "TSO" prefix, ie
>
> ==>tso caller

- then that applies ispf command translation, as happens on any command
typed on any commandline inside ispf, first.

"TSO" translates into (or used to) something like

select command( &zparm )

so you're going out of ispf edit into the underlying ispf environment and
invoking a tso command (ie command processor etc).

--
Jeremy Nicoll - my opinions are my own.

Paul Gilmartin

unread,
Jan 22, 2019, 12:22:26 PM1/22/19
to
On 2019-01-22, at 04:27:02, Bob Bridges wrote:
>
> address ISREDIT macname
>
> That works correctly. But if the user invokes the calling routine with the
> "TSO" prefix, ie
>
> ==>tso caller
>
"Doctor, it hurts when I do that."
> ...then any attempt to do an ISREDIT command will return rc=20. Is there a
> way to get around this?
>
Then don't do that.


> -----Original Message-----
> From: Bob Bridges
> Sent: Tuesday, January 22, 2019 05:35
> ...
> <macname>
>
That's always worked for me.

> ...surely the ISREDIT commands won't be available?
>
They're available unless you use TSO [EXEC] MACNAME.

If you use Rexx CALL MACNAME you must PARSE ARG X rather than MACRO (X).
PARSE SOURCE will tell you about this.

-- gil

Bob Bridges

unread,
Jan 28, 2019, 8:09:06 PM1/28/19
to
Interesting information, but I cannot tell whether it answers my question.
To review that question: Suppose I'm in View or Edit looking at DATASET1 .
If at that point I issue the command "tso rexx2", is there any way for REXX2
to call REXX3 such that REXX3 will be able to use ISREDIT commands to
examine DATASET1? Without, I mean, starting a new View or Edit session?

---
Bob Bridges, cell 336 382-7313
robhb...@gmail.com
rbri...@InfoSecInc.com

/* Anyone can do any amount of work, provided it isn't the work he is
supposed be doing at that moment. -Robert Benchley */

--- On Tue, 22 Jan 2019, at 11:27, Bob Bridges wrote:
"TSO" translates into (or used to) something like

select command( &zparm )

so you're going out of ispf edit into the underlying ispf environment and
invoking a tso command (ie command processor etc).

-----Original Message-----
From: Bob Bridges [mailto:robhb...@gmail.com]
Sent: Tuesday, January 22, 2019 06:27

I got part of it figured out, but part of it still puzzles me. If the
calling routine is an Edit macro itself, I can call the external routine
this way:

address ISREDIT macname

That works correctly. But if the user invokes the calling routine with the
"TSO" prefix, ie

==>tso caller

...then any attempt to do an ISREDIT command will return rc=20. Is there a
way to get around this? If I'm in a View or Edit session and type "tso
caller", is there any way to get the CALLER routine to fire up an external
Edit macro to look at the current listing?

-----Original Message-----
From: Bob Bridges [mailto:robhb...@gmail.com]
Sent: Tuesday, January 22, 2019 05:35

I have an Edit macro that is capable of parsing certain information under
the cursor: It determines which of several types of listings it's looking
at, and extracts the information based on the expected format. Now I find
that I want to write another Edit macro that starts the same way.

So what I want to write first is an Edit macro that can fetch that
information and return it to the calling routine. No problem, right?
Except now that I've started on it, I realize I'm uncertain about the syntax
of the call.

I know how to invoke an Edit macro in a Edit or View invocation:

address ISPEXEC 'EDIT DATASET('whatever') MACRO('macname')'

But what about when the listing is already being displayed? If I try
calling it in any of the usual ways...

address TSO macname
<macname>
call value(macname)

...surely the ISREDIT commands won't be available? I'm not sure where to
look for this in the documentation. Has anyone done it before?

Seymour J Metz

unread,
Jan 29, 2019, 9:19:26 AM1/29/19
to
Certainly nothing documented or safe. Could you use CUT and PASTE instead?


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3

________________________________________
From: TSO REXX Discussion List <TSO-...@VM.MARIST.EDU> on behalf of Bob Bridges <robhb...@GMAIL.COM>
Sent: Monday, January 28, 2019 8:08 PM
To: TSO-...@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Syntax for calling an Edit macro from a REXX - UPDATE

Bob Bridges

unread,
Jan 29, 2019, 10:09:53 AM1/29/19
to
"Nothing documented or safe" is good enough for me, I think. I can think of
no reason why REXX2 ~has~ to be called as a TSO command rather than an Edit
macro.

I have some REXXs that can operate as either Edit macros or TSO commands. I
just thought I'd leave that option to the operator, who may after all have
included the "tso" prefix simply out of absent-minded habit. So if it can
work that way, fine; but if it can't, it can't, that's all. Thanks.

---
Bob Bridges, cell 336 382-7313
robhb...@gmail.com
rbri...@InfoSecInc.com

/* "Humble yourselves, therefore, under the mighty hand of God, that He may
exalt you at the proper time." (1 Peter 5:6) It is our job to humble
ourselves; it is God's job to exalt. If we try to do His job, He will do
our job. -Rick Joyner, "The World Aflame" */

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-...@VM.MARIST.EDU] On Behalf Of
Seymour J Metz
Sent: Tuesday, January 29, 2019 09:19

Certainly nothing documented or safe. Could you use CUT and PASTE instead?

________________________________________
From: TSO REXX Discussion List <TSO-...@VM.MARIST.EDU> on behalf of Bob
Bridges <robhb...@GMAIL.COM>
Sent: Monday, January 28, 2019 8:08 PM

Interesting information, but I cannot tell whether it answers my question.
To review that question: Suppose I'm in View or Edit looking at DATASET1 .
If at that point I issue the command "tso rexx2", is there any way for REXX2
to call REXX3 such that REXX3 will be able to use ISREDIT commands to
examine DATASET1? Without, I mean, starting a new View or Edit session?

0 new messages