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 31 callers use
BPX1GPY (getpriority) example.
MVC PROCID,=XL4'00000007' Process ID to get priority for
SPACE ,
CALL BPX4GPY, 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 +
MF=(E,PLIST) ----------------------------------
L R15,RETVAL Load return value
C R15,=F'-1' Test for -1 return
BE PSEUDO Branch on error