BPX4CHP (chpriority) example

The following code changes the CPU priority based on the input which, who, and priority type values. The which value used is PRIO_PROCESS, indicating that the priority will be set by process ID. The who value used is 7, to set the priority for process ID 7. The priority type is CPRIO_ABSOLUTE, indicating that the priority will be set to the value specified, 1. For the callable service, see chpriority (BPX1CHP, BPX4CHP) — Change the scheduling priority of a process. AMODE 31 callers use BPX1CHP (chpriority) example.
                                              
         MVC   PROCID,=XL4'00000007' Process ID to change priority for  
         MVC   PRIORITY,=XL4'00000001' Priority value of 1              
         SPACE ,                                                        
         CALL  BPX4CHP,              Change priority value             +
               (=A(PRIO_PROCESS),    Input: Set by Process ID          +
               PROCID,               Input: PID to set priority for    +
               =A(CPRIO_ABSOLUTE),   Input: Change by absolute value   +
               PRIORITY,             Input: Priority value to change to+
               RETVAL,               Return value: 0 or -1             +
               RETCODE,              Return code                       +
               RSNCODE),             Reason code                       +
               MF=(E,PLIST)          ---------------------------------- 
         L     R15,RETVAL            Load return value                  
         C     R15,=F'-1'            Test for -1 return                 
         BE    PSEUDO                Branch on error