The length of the %SCAN or %SCANR search argument is not between 1 and the source string length.
20
Cause . . . . . : The search argument (first parameter) of %SCAN or %SCANR must have a length of at least 1, and it must be no longer than the source string (second parameter). If the starting position (third parameter) is specified, the source string consists of the second parameter from the start position to the end. The built-in function is ignored.
Recovery . . . : Correct the lengths of the first two parameters for the built-in function, or correct the starting position. Compile again.