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 Loading data to table gives wrong for... Raghu navaikulam DB2 19 Thu Jul 13, 2017 2:11 pm
No new posts DB2 Program abending without giving a... rahulgarg14 DB2 7 Mon May 29, 2017 8:10 pm
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am


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