If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Calling COBOL Subroutine from DB2 Trigger

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-31-09, 07:44
vijaygarla vijaygarla is offline
Registered User
 
Join Date: Mar 2009
Posts: 3
Calling COBOL Subroutine from DB2 Trigger

Hi ,

I have a need to procees some task based on insertion/updation of a table.
For this I am planning to create a trigger which will tell me when there is any action(insert/update) on this table.

Now I need the way to call a cobol sub-routine from the trigger action part.
In COBOL sub-routine I need to validate the data in DB2, create XML and this XML I have to keep in the MQ.


Could any one please suggest me on this ?


Thanks in Advance,
Vijay.
Reply With Quote
  #2 (permalink)  
Old 03-31-09, 15:01
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
You can write a UDF or stored procedure and call that from the trigger body.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #3 (permalink)  
Old 04-01-09, 04:52
vijaygarla vijaygarla is offline
Registered User
 
Join Date: Mar 2009
Posts: 3
Thanks Stolze. Could you please post a sample one for calling cobol sub-routine from a DB2 SP ??


Cheers
Vijay.
Reply With Quote
  #4 (permalink)  
Old 04-01-09, 05:57
vijaygarla vijaygarla is offline
Registered User
 
Join Date: Mar 2009
Posts: 3
Sorry Stolze. Is COBOL SP or DB2 SP can be called from DB2 trigger ?
Reply With Quote
  #5 (permalink)  
Old 04-01-09, 14:56
dr_te_z dr_te_z is offline
Registered User
 
Join Date: Jan 2009
Location: Zoetermeer, Holland
Posts: 555
In DB2/LUW: Yes
In DB2/z: dunno
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On