IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

To insert SQL Error text message in Audit Log Table..


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rahul.arora

New User


Joined: 09 Jul 2011
Posts: 9
Location: India

PostPosted: Sat Sep 24, 2011 1:05 am
Reply with quote

I made a program to perform insert/delete on a table(main table)...My program also write a log for the operations (insert/delete) performed on this this table in another table(audit log table)...
The program write the log for every successful or failed operation performed on main table in audit log table...I have one field in my audit log table in which i want to move the reason of failure of the operation, if the operation will fail for main table..

I know the reason for sqlcodes like -503 , +100 , -803 ...But i want to insert reason for every SQL code possible...

Is there any variable in SQLCA , from where i can insert the sql error text message into the table..??
Or there is any other way to do it ?
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1787
Location: Bloomington, IL

PostPosted: Sat Sep 24, 2011 1:24 am
Reply with quote

I shall refrain from commenting on the utility of this, and merely point you to DSNTIAR.
Back to top
View user's profile Send private message
rahul.arora

New User


Joined: 09 Jul 2011
Posts: 9
Location: India

PostPosted: Tue Nov 15, 2011 4:02 pm
Reply with quote

Thanks alot..It works..icon_smile.gif
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1787
Location: Bloomington, IL

PostPosted: Wed Nov 16, 2011 2:38 am
Reply with quote

You're welcome. icon_smile.gif
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts count contained values of several col... DB2 4
No new posts Design for Message Trapping and WTO N... All Other Mainframe Topics 2
No new posts COBOL Text Adventure Engine for TK4- ... COBOL Programming 0
No new posts U0016 error in JCL JCL & VSAM 4
No new posts To join 2 tables and to join 3rd tabl... DB2 8
Search our Forums:


Back to Top