BPX1GPY (getpriority) example

The following code gets the CPU priority based on the input which and who values. The which value used is PRIO_PROCESS, which indicates to get the priority by process ID. The who value used is 7, indicating to get the priority for process ID 7. For the callable service, see getpriority (BPX1GPY, BPX4GPY) — Get the scheduling priority of a process. AMODE 64 callers use BPX4GPY (getpriority) example.
                                              
         MVC   PROCID,=XL4'00000007' Process ID to get priority for     
         SPACE ,                                                        
         CALL  BPX1GPY,              Get priority value                +
               (=A(PRIO_PROCESS),    Input: Get by Process ID          +
               PROCID,               Input: PID to get priority for    +
               RETVAL,               Return value: Priority of process +
               RETCODE,              Return code                       +
               RSNCODE),             Reason code                       +
               VL,MF=(E,PLIST)       ---------------------------------- 
         L     R15,RETVAL            Load return value                  
         C     R15,=F'-1'            Test for -1 return                 
         BE    PSEUDO                Branch on error