How to resolve the -305 error code in DB2?
And also please let me know, how to resolve the db2 error
codes.

Answer Posted / vikram and mangesh

The null value is the concept of DB2 and your application
program does not understand the null concept, so to handle
the null value in our application program we use null
indicator.

Null indicator will have following values(depending upon
what values comes from DB2).
0 means the column is not null and any actual value stored
in the column is valid.
-1 means column is set to null.
-2 means column was set to null as the result of a data
conversion error.


in above scenarion if your table contains nullable columns
(means the column can have null values) and in aplication
program you dont mentioned the null indicator,you will get
sql code -305.

For a NOT NULL column there is no need of null indicator as
there cannot be null at any point of time and if you dont
give any value then you will get SQL code -407.

Is This Answer Correct ?    4 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What action db2 takes when a program aborts in the middle of a transaction?

903


What is iseries database?

816


What is reorg?

875


How do I start db2 in windows?

837


What's The Percentage Free Space ?

992


Is db2 relational database?

775


run jcl for cobol+db2 pgm?.. //jobcard //step001 exec pgm=ikjeft01 //systin dd * DSNSYSTEM(--------) RUN PROGRAM(MYPGMNAME) PLAN(-----), LIB(-------), PARMS(------) /* WHAT WILL U GIVE INSIDE THE BRACKETS... WHAT IS PLAN,PACKAGE,BIND?..PLAN N PACAKGES ARE GENERATED BY ?...

4076


What is a buffer in memory?

825


Mention the definition of cobol in varchar field.

924


What is the difference between cursor and select statement?

885


What are the bind parameters ibm db2?

830


What is the physical storage length of date data type?

1020


What is table space in db2?

808


What are the various data types available in db2?

832


What is phantom read in db2?

855