> From: [email protected]
> Can a Rexx macro toggle from one session to the other?

It can (in a way), but not in the sense I think you mean. Plus, it would be 
cumbersome. Much easier would be to edit both members from within a single 
session. For example, suppose you're editing MEM1 and you type MAC1 on the 
command line. MAC1 would do some stuff (e.g. copy some lines from MEM1) and 
could then call MAC2 to edit MEM2:

address ispexec "EDIT DATASET('MY.DSN(MEM2)') MACRO(MAC2)"

The above syntax is from my head but hopefully it's right. The MAC2 macro could 
receive arguments from MAC1 in several ways, such as VPUT/VGET, the CUT/PASTE 
buffer, a temporary ISPF table, using PARMS, and so on.

So, MAC2 gets the lines that were passed to it by MAC1, and perhaps gets a 
pointer telling it where to insert the lines into MEM2. After MAC2 has inserted 
the lines it could leave the MEM2 edit session open so you could manually 
inspect the changes and decide if you want to END (save the changes) or CANCEL 
without saving. It could even run a COMPARE so you could see what changed. Or, 
if you want, it could automatically END and save the changes by issuing ISREDIT 
END. Either way, this would return you to editing MEM1. Once there you could 
call MAC1 again (if you wanted to), and so on, until all editing is done.

HTH,

Dave Salt

SimpList(tm) - try it; you'll get it! 

http://www.mackinney.com/products/program-development/simplist.html  





                                          
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to