Netcool / OMNIbus SQL程序没有运行\什么都不做(Netcool/OMNIbus SQL procedure not running\doing nothing)

编程入门 行业动态 更新时间:2024-10-24 04:43:10
Netcool / OMNIbus SQL程序没有运行\什么都不做(Netcool/OMNIbus SQL procedure not running\doing nothing)

所以我有一个调用程序的工具。 工具看起来像这样:

call Attach_test('select TTID from alerts.status where Class in (73000,8891) and to_int(TTID) > 0 and ServerSerial in ($selected_rows.Serial)',[ $selected_rows.Serial ]); flush iduc;

它应该获得TTID(该字段只有许多选定的警报之一)和所选警报的服务器序列数组。 然后所有这些数据都转移到SQL过程,如下所示:

declare tempservser integer; k integer; begin for k = 1 to array_len(serserial) do begin set tempservser = serserial[k]; update alerts.status set ParentTT = parentttid, TTFlag = 2 where ServerSerial = tempservser and TTID = '' ; end; end

参数:

parentttid Char(11) 在整数的serserial数组中

这就是麻烦 - 程序什么都不做。 没有错误或其他内容,但所选警报没有更新。

我希望它能像这样工作 - 你选择了许多只有一个有TTID的警报,运行这个工具,在所有其他选定的警报上设置ParentTT = TTID。 OS版本 8.1

对不起我的英语不好

So i have a tool that call procedure. Tool looks like that:

call Attach_test('select TTID from alerts.status where Class in (73000,8891) and to_int(TTID) > 0 and ServerSerial in ($selected_rows.Serial)',[ $selected_rows.Serial ]); flush iduc;

it should get TTID (that field have only one of many selected alarms ) and array of server serials of selected alarms. Then all this data is transfered to SQL procedure that looks like:

declare tempservser integer; k integer; begin for k = 1 to array_len(serserial) do begin set tempservser = serserial[k]; update alerts.status set ParentTT = parentttid, TTFlag = 2 where ServerSerial = tempservser and TTID = '' ; end; end

Parameters:

in parentttid Char(11) in serserial array of Integer

And here comes the trouble - procedure do nothing. There is no errors or something but there is no update on selected alarms.

I want it to work like this - you select many alarms with only one that have TTID, run this tool that set ParentTT = TTID on every other of selected alarms. OS ver. 8.1

Sorry for my english

最满意答案

我想出了怎么做:

工具

call AttachSelectedToTTID([ $selected_rows.Serial ],[ $selected_rows.ParentTT ]); flush iduc;

程序

declare tempservser integer; k integer;n integer;partt char(15); begin for n = 1 to array_len(ttid) do begin if (ttid[n] != '' ) then set partt = ttid[n]; end if; end; for k = 1 to array_len(serserial) do begin set tempservser = serserial[k]; update alerts.status set ParentTT = partt,TTFlag = 2 where Serial = tempservser and TTID = ''; end; end

参数:

在Ttid数组Char(15)

在整数的serserial数组中

I figured out how to do it:

Tool

call AttachSelectedToTTID([ $selected_rows.Serial ],[ $selected_rows.ParentTT ]); flush iduc;

Procedure

declare tempservser integer; k integer;n integer;partt char(15); begin for n = 1 to array_len(ttid) do begin if (ttid[n] != '' ) then set partt = ttid[n]; end if; end; for k = 1 to array_len(serserial) do begin set tempservser = serserial[k]; update alerts.status set ParentTT = partt,TTFlag = 2 where Serial = tempservser and TTID = ''; end; end

Parameters:

in ttid array of Char(15)

in serserial array of Integer

更多推荐

本文发布于:2023-07-22 18:28:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1222331.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:什么都不   程序   OMNIbus   Netcool   SQL

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!