I do this often enough that it's the first thing that occurred to me, too.
Dunno as I'd agree with "pointless", though.  Some of my REXXes check to see
whether the exec was called as a TSO command or Edit macro - with or without
the TSO prefix, in other words, from an ISPF command line - and adjust its
behavior accordingly.  If it has to use ISREDIT commands then, as Seymour
says, it can detect this and call itself as an edit macro.  But I'm pretty
sure I've had occasion to want the exec to behave differently depending on
the type of invocation; I can't remember off-hand the details, but it's
happened more than once.  Oh, I remember, maybe if it was called without the
TSO command prefix then it expects to look at the current Edit/View session
and interpret the current dataset, but if it was called as a TSO command
then it must open a particular (default) dataset and process that.

Ah, here's an example:  At one client users can issue "TSO WHOIS BRIDGES";
this opens a View session of a list of userIDs and executes an ONLY command,
which excludes all records but those that contain the string BRIDGES.  Or
they can say "TSO WHOIS" simply to View the dataset with no string search.
Or they can type "whois bridges" once they're in View and it'll do simply
the exclude-and-find part - and that they can do again and again.

Nothing very compelling, but it saves the users a little work.

---
Bob Bridges, robhbrid...@gmail.com, cell 336 382-7313

/* The more sophisticated the technology, the more vulnerable it is to
primitive attack. People often overlook the obvious.  -Dr Who, 1978 */

-----Original Message-----
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of
Seymour J Metz
Sent: Friday, April 21, 2023 11:19

It's simple, but, IMHO, pointless. At the beginning of the macro, you test
the current environment. If it's not ISREDIT, then call EDIT with an initial
macro.

________________________________________
From: Billy Ashton <bill00ash...@gmail.com>
Sent: Friday, April 21, 2023 10:57 AM

Is it possible to use a Rexx program to edit a file (maybe a PDS member,
maybe a flat file, shouldn't care) and to issue ISREDIT commands there, but
not by using a separate macro? IOW, I want to have a single program that I
can pass a file as a parm, and then this Rexx program edits the file, does
some commands to find things and maybe change things, saves the file,
displays some other stuff, and then ends.

Is there a way to do this Edit stuff without a separate macro?

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to