IBM Tivoli Netcool/OMNIbus Version 8.1

Example: External procedure

This example external procedure calls a program called nco_mail, which sends e-mail about unacknowledged critical alerts.

Within the External Procedure Details window, the external procedure named send_email is created with the following entries:
Table 1. Entries for the send_email external procedure in the External Procedure Details window
Field Entry
Name send_email
Parameters in node Char(255)
in severity Integer
in subject Char(255)
in email Char(255)
in summary Char(255)
in hostname Char(255)
These read-only entries in the Parameters list are constructed from entries made in the In/Out, Name, Data Type, and Length fields in the Parameters area. For example, for in node Char(255), the entries are:
  • In/Out: in
  • Name: node
  • Data Type: Char
  • Length: 255
Executable $NCHOME/omnibus/utils/nco_mail
Arguments '\''+node+'\'', severity,'\''+subject+'\'','\''+email+'\'','\''+summary+'\''
Host localhost

The full SQL text of the same send_email procedure is as follows:

create or replace procedure send_email
(in node character(255), in severity integer, in subject character(255), 
in email character(255), in summary character(255), in hostname character(255)) executable '$NCHOME/omnibus/utils/nco_mail' host 'localhost' user 0 group 0 arguments '\'' + node + '\'', severity, '\'' + subject + '\'',
'\'' + email + '\'', '\'' + summary + '\'';

This example also shows how to pass text strings to an executable. Strings must be enclosed in quotation marks, and the quotation marks must be escaped with backslashes. All quotation marks in this example are single quotation marks.


Library | Support |