You will need to utilize SARSECUX to change the resource class before the security call is invoked. SARSECUX is called prior to every function security call. CPLCLS contains the address of the resource class name.
Here's an example of the code you will need to add to SARSECUX:
L R4,CPLCLS address of resource class in Reg4
MVC 0(8,R4),=c'@SAR' set new resource class name
RETURN8 forces a return code of 8 from SARSECUX. This tells View to do the security call based upon what may have been changed in SARSECUX.