I get following error. When I ran above sql in a separate java class that runs fine. Also I ran above sql in the AS400 and it works file. I am not sure what is the issue when running on XI. Please let me know.