You need to visualize which program is doing what. When you are entering commands interactively, XEDIT is reading your input and looking for XEDIT things: XEDIT commands and macros (like ALL XEDIT).
When an EXEC runs, the EXEC interpreter is reading the file and looking for EXEC things, like CMS modules. What you need to do is to get the EXEC interpreter to put the XEDIT input into a place where XEDIT will read from. A buffer is the answer. Once you've placed your XEDIT commands into a buffer, you then invoke XEDIT and it will read the buffer and do XEDIT things. /* example */ "MAKEBUF" buf = rc queue "SET ZONE 12 13" queue "ALL /02/" queue "DEL *" queue "FILE" "XEDIT" someFN someFT someFM "DROPBUF" buf By the way, when a buffer is emptied, XEDIT will read from the next, then the next, etc., and eventually from the terminal. If you don't have an XEDIT command that tells XEDIT to finish (like FILE or QUIT or QQUIT), XEDIT will exhaust the buffer(s) and read from the terminal, which will be confusing if you're not expecting it. This can easily happen if you've changed the file then tried "quit". "Quit" won't quit if the file has changed, which means XEDIT continues reading. Also, you can use this MAKEBUF/queue/DROPBUF technique for most any program that takes its input from the terminal. Someone may give an example of mixing "address command" and "address xedit" in the same EXEC, but I don't do that. If someone does give such an example, we'll all be richer. Richard Corak
