In sql_mode=oracle, when an SP parameter of the VARCHAR data type is defined without length,
the length should be inherited from the actual argument at call time. This is how Oracle works.
This script works fine in Oracle:
fails with an error:
Furthermore, since Oracle 9, VARCHAR datatype in PL/SQL is not limited to 4000 char but to 32k.
It's the size of varchar column in a table that is limited to 4000 (until Oracle 12C which allow 32k when MAX_STRING_SIZE=EXTENDED).