FWIW, Here's a working example of an exec calling a macro to edit a pds
member.  This runs in ISPF batch.  I think I had trouble passing a value to
the 2nd one via arg, and resorted to VPUT/VGET.

Ken

/* calling REXX Exec */
drvolA = '999999' /* vol ser */

  address ISPEXEC
  'VPUT  DRVOLA ASIS'

  DSN = 'SYSX.DR.BACKUP.CNTL($RESTORE)'
  Say 'VOLDRSET: Invoking Edit Macro VOLDREDI for DSN=' dsn
  "EDIT DATASET('"dsn"') MACRO(VOLDREDI)"
  edit_rc = RC
  Say 'VOLDRSET: Edit Macro RC =' edit_rc
end

VOLDREDI
/* Rexx */
'ISREDIT Macro'
'ISPEXEC  VGET  DRVOLA'

say 'VOLDREDI: In Edit macro to set DR tape volserA to:' drvolA
'ISREDIT CHANGE $TAPEVOLA$' drvolA 'ALL'

'ISREDIT SAVE'
'ISREDIT END'

On Thu, Nov 5, 2015 at 8:30 PM, Lizette Koehler <[email protected]>
wrote:

> Since this was suggested,
> You may wish to join the TSO-REXX and/or ISPF Lists for further assistance.
>
> To join, if you have not done so -
>
> ISPF                   https://listserv.nd.edu/cgi-bin/wa?A0=ispf-l
> TSO REXX        http://www2.marist.edu/htbin/wlvindex?TSO-REXX
>
>
> And I agree with others, use the trace function in REXX to help. I like ?i
> to allow a step through approach.
>
>
> Lizette ;-D
>
> > -----Original Message-----
> > From: IBM Mainframe Discussion List [mailto:[email protected]] On
> > Behalf Of Paul Gilmartin
> > Sent: Thursday, November 05, 2015 5:15 PM
> > To: [email protected]
> > Subject: Re: ISREDIT REXX CHANGE no variable substitution
> >
> > (Before Lizette deflects this to ISPF-L or TSO-REXX:)
> >
> > On 2015-11-05 16:23, Nims,Alva John (Al) wrote:
> > > I think that it is more of a REXX treatment of strings.
> > >
> > > When the REXX instruction:
> > > CMD = "CHANGE ALL SYSDA " IMPLUNIT
> > > Is processed, CMD becomes the full string "CHANGE ALL SYSDA SYSDA"
> > > But in the second invocation, it treats it as two different parameters
> > > to ISREDIT so Parm #1 is the string "CHANGE ALL SYSDA" and the second
> is the
> > string  "IMPLUNIT"
> > > I don't think REXX is performing a variable substitution in this case.
> > >
> > > I wonder if it does something differently if you were to use single
> quotes around
> > the command:
> > > ' ISREDIT CHANGE ALL SYSDA ' IMPLUNIT
> > >
> > Should make no difference; I believe that in both cases Rexx removes the
> delimiting
> > quotes; they are not passed to ISREDIT.
> >
> >
> > > -----Original Message-----
> > > From: Donald Likens
> > > Sent: Thursday, November 05, 2015 5:14 PM
> > >
> > > Can anyone explain why the second try does not work as expected?
> > >
> > > ISREDIT "MACRO"
> > At this point, I would add:
> >   trace R            /* To see what's happening.  */
> >   signal on novalue  /* Traps inadvertently undefined symbols.  */
> >
> > > Say "IMPLUNIT" IMPLUNIT
> > > CMD = "CHANGE ALL SYSDA " IMPLUNIT
> > > ISREDIT CMD
> > >
> > Rather:
> >   address ISREDIT CMD  /* For clarity  */
> >
> > >     Results:
> > >     IMPLUNIT SYSDA
> > >     SYSDA is changed to SYSDA
> > >
> > ... but that's not what I'd expect.
> >
> > > ISREDIT "MACRO"
> > > Say "IMPLUNIT" IMPLUNIT
> > > ISREDIT "CHANGE ALL SYSDA " IMPLUNIT
> > >
> > Likewise:
> >   address ISREDIT "CHANGE ALL SYSDA " IMPLUNI  /* For clarity  */
> >
> > >    Results:
> > >    IMPLUNIT SYSDA
> > >    SYSDA is changed to IMPLUNIT
> > >
> > But that, the second try, is what I'd expect.
> >
> > -- gil
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN
>

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

Reply via email to