>>> However when I am saving it in a text file using JDBC The Teradata JDBC Driver does not save any data in a text file. So your application would be doing the saving to a text file. Please copy-and-paste your application code that calls the JDBC Driver, and that subsequently saves the data to a file. Then we can perhaps determine why the .0 is appearing.
This has to do with the FORMAT setting not at the database end, but at the application end. So try to tweak that. For assurance if the issue is same .... try to put data in file by casting it to VARCHAR.