BPX4TAF (MVSThreadAffinity) example

The following code executes the assembler routine EXITRTN on another thread, identified by thread ID THID, and passes EXITPARM as input in R1. The requesting thread is blocked until EXITRTN runs. For the callable service, see MVSThreadAffinity (BPX1TAF, BPX4TAF) — MVS thread affinity service. AMODE 31 callers use BPX1TAF (MVSThreadAffinity) example.
                                              
         MVC   EXITRTNA,=AD(EXITRTN)  ->Routine address                 
*        MVC   EXITPLA,=AD(EXITPARM)  ->Input parameter list            
         SPACE ,                                                        
         CALL  BPX4TAF,                                                +
               (EXITRTNA,            Input: Routine address            +
               EXITPLA,              Input: Parm list address or 0     +
               THID,                 Input: Target pthread to run exit +
               RETVAL,               Return value: -1 or not return    +
               RETCODE,              Return code                       +
               RSNCODE),             Reason code                       +
               MF=(E,PLIST)          ----------------------------------