Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BEGINNER'S QUANDRY 1

Status
Not open for further replies.

suruppak

Programmer
Mar 12, 2003
17
US
Hello everyone, I've had great luck in the cobol forums so I hope I do here as well.

I am trying to figure out how to write an easy rexx script to take care of a set of commands I use all day long.

Here is what I have written:

/* REXX TO GET RID OF ALL OF THOSE ANNOYING EJECTS AND SKIPS */
ADDRESS ISREDIT "MACRO PROCESS
ADDRESS ISREDIT "CHANGE 'EJECT' ' ' ALL WORD
ADDRESS ISREDIT "CHANGE 'SKIP1' ' ' ALL WORD
ADDRESS ISREDIT "CHANGE 'SKIP2' ' ' ALL WORD
ADDRESS ISREDIT "CHANGE 'SKIP3' ' ' ALL WORD
ADDRESS ISREDIT "RESET CHG
SAY "WHY IS THIS EXECUTING THE TSO PART BUT NOT THE ISPF PART?"
EXIT 0

The problem is that I cannot figure out how to execute it!!

Using error messages as my guide, I managed to do the following:

I put it in a library called 'a551900.jyeject.clist' under the name TEMPNAME.
This allows me to call it from command line of a member being edited by typing in:
TSO EXEC JYEJECT

However, this seems to execute the TSO part, because the message prints along with the ***, but when it goes back to the member being edited, there is no change.

Any help would be appreciated, I am hoping the problem isn't shop specific.
 
I assume you are not actually missing the closing double quotes in the actual macro?

 
Assuming you have an end " on all your macro statements, you are invoking it the wrong way. You execute a REXX by doing a TSO whatever, but you have written an edit macro which is invoked directly from the command line of a member of a PDS (or from a macro parameter from an EDIT or VIEW but that's another story).

So you would run this by editing the member then just typing TEMPNAME on the command line (i.e. without the TSO in front).
 
An edit macro must be located in SYSPROC or SYSEXEC. It cannot be stored in its own dataset and executed explicitly.

Frank Clarke
Tampa Area REXX Programmers' Alliance
REXX Language Assn Listmaster
 
Thanks everyone! Well, the problem is that I am not allowed to put edit macros in SYSPROC or SYSEXEC. I was basically wanting to know how to execute them explicitly. I am sorry to hear that this cannot be done.

Thanks again everyone!
 
Hi suruppak,

There are various ways of allocating your own libraries so that you can run Macros (or Execs or CLists) from them. It is a few years since I've worked on a mainframe so I can't remember all the details off the top of my head, but checkout TSO ALTLIB and/or ISPF LIBDEF and/or User library concatenations, DD SYSUPROC etc. If you need more help, post back and I will dig out some old stuff (or someone with recent knowledge will help I'm sure).

Enjoy,
Tony

------------------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading FAQ222-2244 before you ask a question.
 
Thanks Tony, when time permits I will play around and see what I can come up with. I am currently waiting for a book entitled "TSO/E CLIST: The Complete Tutorial and Desk Reference " to arrive in the mail, but it will still be a couple of weeks. I am hoping it will help. Thanks for letting me know that it isn't impossible!
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top