Re: How I can tell Teradata is running on ANSI mode or teradata mode
You can use the parameter TMODE in the connection string. (can set it to values ANSI,TERADATA or DEFAULT).
I haven't personally used ANSI mode in JDBC, but I think it would turn off the autoCommit feature, so you would have to explicitly call commit. This also implies that transactions would keep accumulating locks till you commit. And hence increases the possibility of lock contention, dead locks and AMP lock table overflow (the later if you have heavy duty inserts and don't use FASTLOAD mode).
You would want to get yourself a copy of the JDBC manual and SQL Reference: Statement and Transaction processing manual.