The Fortran standard limits the context where BOZ constants can used to:

C410 (R411) A boz-literal-constant shall appear only as a data-stmt-constant in a DATA statement, as the actual argument associated with the dummy argument A of the numeric intrinsic functions DBLE, REAL or INT, or as the actual argument associated with the X or Y dummy argument of the intrinsic function CMPLX.

In your context, the INT function with a KIND optional argument will wort:

KERR.AND.int(O'17',4)