Joined: 19 Mar 2009 Posts: 184 Location: Globe, India
Sorry due to lack of time i could not post the details. Here we go with the details of that scenario...
The ORACLE table was having a column of datatype DATE.
While executing SELECT SQL i.e.
SELCT <COLUMN> INTO <HOST VARIABLE> from <TABLE>
was working fine and i was able to get the date in host variable in
The host vairable for the same column was generated by ORACLE utility option with
just like the option we have in DB2I to crreate DCLGEN.
But while executing INSERT or UPDATE SQLs, i used to move date in
format into host variable to be further used in SQL. But it was failing with the error saying - 'invalid month'.
Then i tried all the date format options (Brute Force way) to move into host vairable and finally the format
e.g. 12-FEB-2014 only worked out through host variable and then only we got the success
SQLCODE = 0
I still didnt understand why ORACLE behaves different while executing SELECT v/s INSERT/UPDATE SQLs. Being a mainframer, i did not have much visibility over the mocrofocus COBOL and ORACLE communication and hence was stuck up.
Oracle's default (external) format for DATE is "DD-MON-YY"
When you start an instance, Oracle Database establishes globalization support based on the values of initialization parameters that begin with "NLS". You can query the dynamic performance table V$NLS_PARAMETERS to see the current globalization attributes for your session.
The default datetime formats are specified either explicitly with the initialization parameter NLS_DATE_FORMAT or implicitly with the initialization parameter NLS_TERRITORY. You can change the default datetime formats for your session with the ALTER SESSION statement.