Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to find column causing error

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
hnharish

New User


Joined: 30 Aug 2005
Posts: 22

PostPosted: Mon Jan 26, 2009 11:25 pm    Post subject: How to find column causing error
Reply with quote

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
View user's profile Send private message

murugan_mf

Active User


Joined: 31 Jan 2008
Posts: 148
Location: Chennai, India

PostPosted: Thu Jan 29, 2009 11:48 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Fri Jan 30, 2009 12:16 am    Post subject:
Reply with quote

Look at "DSNTIAR" in the DB2 Application Programming Guide.
Back to top
View user's profile Send private message
prashanth1

New User


Joined: 27 Sep 2006
Posts: 47
Location: Hyderabad

PostPosted: Fri Jan 30, 2009 12:27 pm    Post subject:
Reply with quote

Harish,

Try with SQLERRM . Probably it may help you to find which column is giving the problem .
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts S922 Error yuvan ABENDS & Debugging 3 Fri Dec 02, 2016 6:58 pm
No new posts How to find the first monday of the w... abdulrafi COBOL Programming 10 Fri Nov 25, 2016 3:24 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us