There is no such function in CARLa, but you could add your vote in the system by opening an RFE. Please be sure to provide use cases so developers know how this is meant to work.
I use the IDCAMS program to set the JCL level return code, from a temporary file that you fill from a CARLa program. Then test the return code of the IDCAMS step instead:
//CARLA EXEC C2RC
//RC DD DISP=(NEW,PASS),DSN=&&RCFILE,
// UNIT=SYSDA,SPACE=(TRK,1)
//SYSIN DD *
newlist dd=rc nopage outlim=1,
emptylist=' SET LASTCC=4'
s c=user special revoked
sortlist ' SET LASTCC=0'
//RC EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD DISP=(OLD,PASS),DSN=&&RCFILE
//
------------------------------
Rob van Hoboken
------------------------------