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
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: To insert SQL Error text message in Audit Log Table..
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: 1755
Location: Bloomington, IL

PostPosted: Sat Sep 24, 2011 1:24 am    Post subject:
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    Post subject:
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: 1755
Location: Bloomington, IL

PostPosted: Wed Nov 16, 2011 2:38 am    Post subject:
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    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 Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts unload data from table with lob columns farhad_evan DB2 0 Sat Apr 22, 2017 1:32 pm
No new posts IDC2902I Error tzeche ABENDS & Debugging 2 Tue Mar 28, 2017 11:39 am
No new posts Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm


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