BPX1GRL (getrlimit) example
The following code fills in the rlimit structure for the
calling process based on the input resource value.
The resource value is set to RLIMIT_CPU. For the
callable service, see getrlimit (BPX1GRL, BPX4GRL) — Get resource limits.
For the data structure,
see BPXYRLIM — Map the rlimit, rusage, and timeval structures. AMODE
64 callers use BPX4GRL (getrlimit) example.
MVC RESOURCE,=A(RLIMIT_CPU) Value of resource
SPACE ,
CALL BPX1GRL, Get resource limits +
(RESOURCE, Input: resource +
RLIMIT, Structure, mapped by BPXYRLIM +
RETVAL, Return value: 0 or -1 +
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