View previous topic :: View next topic
|
Author |
Message |
hnharish
New User
Joined: 30 Aug 2005 Posts: 23
|
|
|
|
Hi All,
Usually when we get sql error in a cobol db2 program it is difficult to find out due which column the sql error was generated.For example when we get SLCODE=-305 when null value is encountered it is difficult track which column of the table causing the error.Is there is any way which we can find out the column causing the error .One way is we have to use display statement.Can we track the error using fields declared under SQLCA group data item. |
|
Back to top |
|
|
murugan_mf
Active User
Joined: 31 Jan 2008 Posts: 148 Location: Chennai, India
|
|
|
|
If column is a nullable then you must use indicator variables.
By displaying the indicator variable value you can find out whether the colomn is null or not. |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
Look at "DSNTIAR" in the DB2 Application Programming Guide. |
|
Back to top |
|
|
prashanth1
New User
Joined: 27 Sep 2006 Posts: 47 Location: Hyderabad
|
|
|
|
Harish,
Try with SQLERRM . Probably it may help you to find which column is giving the problem . |
|
Back to top |
|
|
|