Do a DSPPGM of the failing program. Check to see how ‘Use adopted authority’ is set. I suspect it’s *NO.
Providing integrated solutions for the System i user community
Also check programs higher in the call stack. If a higher program has USEADPAUT(*NO), that will block adopted authority from being passed to programs lower in the stack. Lower programs would need to re-establish their own adopted authority.