Dynamic PER traps

TARGETID, along with indirect addressing on the RANGE parameter, allows you to activate a new PER trap dynamically once the previous trap has been deactivated as a result of MATCHLIM. In the next example, specifying TARGETID=TR2 on the first PER trap will cause the second PER trap, ID=TR2, to activate when the first trap deactivates. The address range of the second PER trap is determined by the contents of register 1 when the MATCHLIM occurs.
   First PER trap:

        SLIP SET,IF,RANGE=10000,TARGETID=TR2,ACTION=TARGETID,END

   Second PER trap:

        SLIP SET,SA,DISABLE,RANGE=1R?,ID=TR2,ACTION=SVCD,END
The second PER trap can specify a third trap and so on. There is no limit to the number of traps in a chain of dynamic traps, which is called a dynamic PER activation chain.

Each PER trap can be of any kind and have its own unique set of matching criteria or filters. However, PER traps will be active only for address spaces specified in the initial trap by the JOBNAME, ASID, and MODE=HOME parameters. Therefore IBM® recommends that an ASID parameter specified in the initial trap must include all address spaces for the subsequent traps. For example, it makes sense to specify ASID=(1,2,3) on the initial trap and ASID=(1,2) on the second trap, but not the reverse, because no units of work would be monitored in ASID=3.

Rules for dynamic PER traps: