> >A final note: if you *do* things like this using an XEDIT macro, I advise having the macro named slightly differently from the EXEC. > >For example, if the example above was called from SENDINV EXEC, the macro might be called $SENDINV, or SENDINV$. This avoids problems if you try to invoke the EXEC from XEDIT ... >
I prefer not having to support/maintain 2 files for one function, so in similar situations what I sometimes do is queue the name of the *calling* exec, with an option of '(XEDIT' or something similar. Then in the beginning of the EXEC itself, where I check parms and command line options, if option "XEDIT" is there, I call a subroutine that does ADDRESS XEDIT and turns itself from a CMS exec into an XEDIT macro. Shimon
