I'll take it as given that you cannot rearrange how those OBEY files and programs are set up. If I had to solve that problem, I'd probably try to rearrange how the file names were communicated to the programs, so the filenames could be listed in one place, which could also be consulted by this program that is to do the purgedata.
By the way, do you really want to purgedata the input files? I suppose if they are output files of earlier steps, that makes sense, but unless those input files are output files of earlier steps, doing a purgedata on them doesn't seem like it would be the right thing to do.
Now to your problem.
No, you cannot have nested INLINE. Just one INLINE at a time. However, you can have as many programs using INV (with each program using a different INV variable) at the same time as you like. Or one INLINE and one or more INV at the same time. So it is possible to feed commands from your TACL code to any of a number of programs that are running at the same time.
Your idea of saving all the filenames until you have looked at all the OBEY files, then move on to doing the purgedata commands is a good way to do it, which would let you use EDIT with INLINE to find the filenames, then later stop the EDIT and start FUP with INLINE to feed purgedata commands to FUP.
As far as getting EDIT to extract the filename from the line it is on, there isn't an easy way to do that. However, if you get EDIT to list the line that contains the filename and capture that list output in a TACL variable, then you can use TACL code to pick the filename out of the line. Something like:
EDIT/INLINE,OUTV lst,NOWAIT/
...
+ L /$/
[#set line [#extract lst]]
Here write TACL statements to find the filename in the variable line and put it in a variable by itself.
Then you can use that variable to construct a purgedata command to send to FUP by #appending to an INV variable
or build a list of filenames by #appending the value of the filename to the variable that is the list of filenames.
The EDIT command L /$/ will list all the lines that contain a $. If you are sure that the only lines that contain $ are the lines that have the filenames you want to do the purgedata on, then that command will list them for you. If there are several such lines in the current file, that command will list them all, so you would need an #extract loop to process them one at a time.
I think that covers all you need to do. If there is some part of the task that you still are unclear about, just ask about it.