SQL query output to a file is failing with error code 9 when the data contains French and English characters with size > 32k
I removed this line and its working fine now. It is writing all kind of characters to the file.(English,French,Chinese)

WHENEVER OSERROR EXIT 9;