Static statement names will not work properly if used by 2 threads

Error code 2664
Probable cause

You have used a static statement name and preprocessed with the -r reentrancy option. Static statement names cause static variables to be generated that are filled in by the database. If two threads use the same statement, contention arises over this variable. Use a local host variable as the statement identifier instead of a static name.