On Fri, 29 Mar 2019, at 07:24, Elardus Engelbrecht wrote:

> Now, for my problem is, I have this macro (which is not working):
> 
> ISREDIT MACRO (PARMIN PARMUIT)       
>   ISREDIT RESET                      
>   ISREDIT CAPS OFF                   
>   ISREDIT CHANGE &PARMIN &PARMUIT ALL
>   ISREDIT SAVE                       
> ISREDIT END   

Remember that when an ispf edit macro starts to execute you have 
access to the underlying ispf session, and indeed underlying TSO.
So change the macro to, for example:

address ispexec "vget (parmin parmuit) profile"
address isredit
"macro"
"reset"
"caps off"
"change" parmin parmuit "all"
"save"
"end"

Personally I'd also set up error handling, probably at least a little
validation of the incoming parameters, and I might check that the
'save' actually works before 'end'ing the macro.  As it stands you
won't be able to tell from the invoking rexx exec whether what the
macro was intended to do actually worked.

> Above macro is called by this:
> 
> /*REXX*/ 
> TRACE ALL 
> PARSE ARG DSN PARMIN PARMUIT
> SAY DSN  PARMIN PARMUIT 
> Z = "EDIT DATASET('"||DSN||"') MACRO(CHANGEIT) CONFIRM(NO) "
> ADDRESS ISPEXEC Z 
> EXIT 

and in that before you invoke ispf edit, insert 

address ispexec "vput (parmin parmuit) profile"

So, what happens is that you use the ispf variables support to save
the values of parmin etc before invoking edit, then once the macro
has control it asks ispf for the values that were saved.

-- 
Jeremy Nicoll - my opinions are my own.

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

Reply via email to