Whenever partial decoupling is discovered, its degree is calcu- lated using CALCDC. If the degree is greater than the previously encountered maximum degree of decoupling the new scheme is considered to be better. The old scheme is released using RELNAM and the new scheme is saved. Whenever a decoupling scheme is released, CLRMEM is called to clear the MEMORY COMMON area of the unneeded data. A decoupling scheme is saved by making the output assignments to the SIM and the indices and saving these with STOSIM and STONDX. The subprogram terminates either by finding full decoupling or by analyzing all possible combinations of index incrementing (at which point a "best" partial decoupling scheme will have been found). B.1.3 I21QSA STOSIM (3.2), JILGND (4.4), J1LGOR (4.5), JiVIDM (5.7), HASSAL (6.5), SPEDUP (6.20) The first step by I2I SA is to create the IDM's for each variable index by calling J1VIDM and then to store these IDM's using STOSIM. The IDM names are stored in the vector IDMPV as indicated in Chapter 5. The output set assignments for the IDM's are made by I2ISA. If only structural consideration of the IDM's is to be made, the subprogram J1LGND is called to produce the logical "AND" IDM for each function index. This is analyzed by HASSAL to determine whether an output set assignment can be made. If it can,then that output set assignment can be used for all of the IDM's of the function index. JILGOR is called to produce the logical "OR" IDM's. Then HASSAL and SPEDUP determine whether any of these fully precedence order. If any does, its corresponding function index fully precedence orders. The output set