BPX4PAF (__pid_affinity) example

The following code will add your PID to the target process' affinity list. For the callable service, see __pid_affinity (BPX1PAF, BPX4PAF) — Add or delete an entry in a process's affinity list. AMODE 31 callers use BPX1PAF (__pid_affinity) example.
                                              
*        MVC   TARPID,....           PID of target                      
*        MVC   SIGPID,....           PID of this routine                
         CALL  BPX4PAF,                                                +
               (=A(PAF_ADD_PID#),    Function code (add entry)         +
               TARPID,               PID of target                     +
               SIGPID,               PID to receive signal             +
               =A(SIGUSR1#),         signal to be generated            +
               RETVAL,               Return value: 0 or -1             +
               RETCODE,              Return code                       +
               RSNCODE),             Reason code                       +
               MF=(E,PLIST)          ----------------------------------