I want to create utility X. I want to call utility X in program A and program B. Program A runs, calls X, does work, then calls B. B will also call program X. This new X needs to start fresh and preserve state (file status, working storage) separate from the first instance. while B uses it. Eventually B will shut down X #2, and return to A, which needs X #1 to remember it's file state and working storage.
The manual says that you only have one instance of X in memory, and therefore only state, unless it is called in two different threads. I don't want to run A and B as separate threads. I could run X in it's own separate thread, but then I cannot call that instance again, because it's now in a separate thread - I would have to send messages back & forth instead of using the linkage area to pass back & forth.
Anyone know how to call a specific instance of X? (I was hoping the call would allow calling with thread handle already set, but that's not what the manual says)