>Andy >Are you able to post your response in this list
Here is my original post. Sorry about the confusion. There are some other considerations here, I think. Is there already coded and tested a maintask program capable of attaching from 1 - n subtasks and managing and restarting them in case of abends? The issue of DD names must be dealt with because each instance would have to have a unique one in order to run in the same address space. Operator commands to monitor the tasks would be required. The dispatching priority of each task is controlled by the maintask and without some very sophisticated logic each task would probably retain its original priority (set on the ATTACHX macro). CHAP could be used but knowing which task to CHAP would be problematic. This is not the simplest of programs to write but it's not impossible either. If it doesn't exist it will have to be created in order for multiple instances of the original stand alone program be run in a single address space. Limiting the number of instances to the number of CPs is an interesting thought. However, if an instance does any sort of wait (e.g. for I/O) then there's no reason that one instance per CP makes a lot of sense. Speaking of limits, there are, of course, limits to everything. In one address space there is a limit to the number of TCBs that can be attached. This limit is quite high but there isn't an infinite amount of SQA. CSA (as opposed to ECSA) is quite limited and some is used for each address space. These are just some of the trade-offs that should be considered. z/OS handles many address spaces very well. In fact, WLM can dynamically change the dispatching priority of an address space based on parameters set by the installation. It can even vary CPs online and offline if necessary and what's more it can increase the number of available CPs dynamically. If there becomes a need to establish a different priority for each POSIX queue then WLM is the way to do it because CHAP can't increase the dispatching priority of the address space only of the task. However, WLM does not monitor tasks within an address space, only the address space itself. In the best of all possible worlds having a program which dynamically starts processing address spaces (via MGCRE for instance) and each address space supporting multiple TCBs would give the best flexibility. Coding all of this might be more than anyone wants to do, however. Andy Coburn
