here is the {@Up Time (from array)} formula directly below, the {@lookup_up_trap_name} bet set := to counter is below the {@Up Time (from array)} formula. This is going to be a lot of code but I seperated the two. anything else you need? One more thing, there is another field called TrapNames (this is when the node initially goes down, indicated by the letters DC and NC) and UpTrapNames (this is when the node initially goes back up, indicated by NST and OK). HP OpenView system records the EventTime, this is the Downtime field. The Uptime array caculates when the system comes back up, the main problem is when an administrator logs into the HP OPenView system, a false downtime is recorded by the database, the array seems to be working fine as it finds the next NST or OK value and records the time the node came back up. I spoke w/ the HP Openview guys and they said there is no way to prevent the xtra downtime being recorded by the DB, so I need a way to identify that if the current downtime is LESS thand the previous Uptime, then suppress that record eliminating the excess duration. Again the formulas are below, let me know what you think and THANKS!
---------------{@Up Time (from array)}--------------------
WhilePrintingRecords;
shared stringVar array hjaiacell_01_event_times;
shared stringVar array hjaiacell_02_event_times;
shared stringVar array hjaiacell_03_event_times;
shared stringVar array hjaiacell_04_event_times;
shared stringVar array hjaiacell_05_event_times;
shared stringVar array hjaiacell_06_event_times;
shared stringVar array hjaiacell_07_event_times;
shared stringVar array hjaiacell_08_event_times;
shared stringVar array hjaiacell_09_event_times;
shared stringVar array hjaiacell_10_event_times;
shared stringVar array hjaiapcshigh_01_event_times;
shared stringVar array hjaiapcshigh_02_event_times;
shared stringVar array hjaiapcshigh_03_event_times;
shared stringVar array hjaiapcshigh_04_event_times;
shared stringVar array hjaiapcshigh_05_event_times;
shared stringVar array hjaiapcshigh_06_event_times;
shared stringVar array hjaiapcshigh_07_event_times;
shared stringVar array hjaiapcshigh_08_event_times;
shared stringVar array hjaiapcshigh_09_event_times;
shared stringVar array hjaiapcshigh_10_event_times;
shared stringVar array hjaiapcslow_01_event_times;
shared stringVar array hjaiapcslow_02_event_times;
shared stringVar array hjaiapcslow_03_event_times;
shared stringVar array hjaiapcslow_04_event_times;
shared stringVar array hjaiapcslow_05_event_times;
shared stringVar array hjaiapcslow_06_event_times;
shared stringVar array hjaiapcslow_07_event_times;
shared stringVar array hjaiapcslow_08_event_times;
shared stringVar array hjaiapcslow_09_event_times;
shared stringVar array hjaiapcslow_10_event_times;
shared stringVar array hjaiaps_smr_01_event_times;
shared stringVar array hjaiaps_smr_02_event_times;
shared stringVar array hjaiaps_smr_03_event_times;
shared stringVar array hjaiaps_smr_04_event_times;
shared stringVar array hjaiaps_smr_05_event_times;
shared stringVar array hjaiaps_smr_06_event_times;
shared stringVar array hjaiaps_smr_07_event_times;
shared stringVar array hjaiaps_smr_08_event_times;
shared stringVar array hjaiaps_smr_09_event_times;
shared stringVar array hjaiaps_smr_10_event_times;
local numberVar counter;
counter:={@lookup_up_trap_name};
//return.
if counter>0 then
(
select {Command.NODENAME}
case 'HJAIACELL' :
(
select {Command.LOCATION}
case '1' :
hjaiacell_01_event_times[counter]
case '2' :
hjaiacell_02_event_times[counter]
case '3' :
hjaiacell_03_event_times[counter]
case '4' :
hjaiacell_04_event_times[counter]
case '5' :
hjaiacell_05_event_times[counter]
case '6' :
hjaiacell_06_event_times[counter]
case '7' :
hjaiacell_07_event_times[counter]
case '8' :
hjaiacell_08_event_times[counter]
case '9' :
hjaiacell_09_event_times[counter]
case '10' :
hjaiacell_10_event_times[counter]
)
case 'HJAIAPCSHIGH' :
(
select {Command.LOCATION}
case '1' :
hjaiapcshigh_01_event_times[counter]
case '2' :
hjaiapcshigh_02_event_times[counter]
case '3' :
hjaiapcshigh_03_event_times[counter]
case '4' :
hjaiapcshigh_04_event_times[counter]
case '5' :
hjaiapcshigh_05_event_times[counter]
case '6' :
hjaiapcshigh_06_event_times[counter]
case '7' :
hjaiapcshigh_07_event_times[counter]
case '8' :
hjaiapcshigh_08_event_times[counter]
case '9' :
hjaiapcshigh_09_event_times[counter]
case '10' :
hjaiapcshigh_10_event_times[counter]
)
case 'HJAIAPCSLOW' :
(
select {Command.LOCATION}
case '1' :
hjaiapcslow_01_event_times[counter]
case '2' :
hjaiapcslow_02_event_times[counter]
case '3' :
hjaiapcslow_03_event_times[counter]
case '4' :
hjaiapcslow_04_event_times[counter]
case '5' :
hjaiapcslow_05_event_times[counter]
case '6' :
hjaiapcslow_06_event_times[counter]
case '7' :
hjaiapcslow_07_event_times[counter]
case '8' :
hjaiapcslow_08_event_times[counter]
case '9' :
hjaiapcslow_09_event_times[counter]
case '10' :
hjaiapcslow_10_event_times[counter]
)
case 'HJAIAPS-SMR' :
(
select {Command.LOCATION}
case '1' :
hjaiaps_smr_01_event_times[counter]
case '2' :
hjaiaps_smr_02_event_times[counter]
case '3' :
hjaiaps_smr_03_event_times[counter]
case '4' :
hjaiaps_smr_04_event_times[counter]
case '5' :
hjaiaps_smr_05_event_times[counter]
case '6' :
hjaiaps_smr_06_event_times[counter]
case '7' :
hjaiaps_smr_07_event_times[counter]
case '8' :
hjaiaps_smr_08_event_times[counter]
case '9' :
hjaiaps_smr_09_event_times[counter]
case '10' :
hjaiaps_smr_10_event_times[counter]
)
)
else
'Unknown'
------------{@lookup_up_trap_name}-------------------
WhilePrintingRecords;
//HJAIACELL ARRAYS
shared stringVar array hjaiacell_01_ip_addresses;
shared stringVar array hjaiacell_01_nodenames;
shared stringVar array hjaiacell_01_devices;
shared stringVar array hjaiacell_01_locations;
shared numberVar array hjaiacell_01_event_timestamps;
shared stringVar array hjaiacell_01_event_times;
shared stringVar array hjaiacell_01_trap_names;
shared stringVar array hjaiacell_02_ip_addresses;
shared stringVar array hjaiacell_02_nodenames;
shared stringVar array hjaiacell_02_devices;
shared stringVar array hjaiacell_02_locations;
shared numberVar array hjaiacell_02_event_timestamps;
shared stringVar array hjaiacell_02_event_times;
shared stringVar array hjaiacell_02_trap_names;
shared stringVar array hjaiacell_03_ip_addresses;
shared stringVar array hjaiacell_03_nodenames;
shared stringVar array hjaiacell_03_devices;
shared stringVar array hjaiacell_03_locations;
shared numberVar array hjaiacell_03_event_timestamps;
shared stringVar array hjaiacell_03_event_times;
shared stringVar array hjaiacell_03_trap_names;
shared stringVar array hjaiacell_04_ip_addresses;
shared stringVar array hjaiacell_04_nodenames;
shared stringVar array hjaiacell_04_devices;
shared stringVar array hjaiacell_04_locations;
shared numberVar array hjaiacell_04_event_timestamps;
shared stringVar array hjaiacell_04_event_times;
shared stringVar array hjaiacell_04_trap_names;
shared stringVar array hjaiacell_05_ip_addresses;
shared stringVar array hjaiacell_05_nodenames;
shared stringVar array hjaiacell_05_devices;
shared stringVar array hjaiacell_05_locations;
shared numberVar array hjaiacell_05_event_timestamps;
shared stringVar array hjaiacell_05_event_times;
shared stringVar array hjaiacell_05_trap_names;
shared stringVar array hjaiacell_06_ip_addresses;
shared stringVar array hjaiacell_06_nodenames;
shared stringVar array hjaiacell_06_devices;
shared stringVar array hjaiacell_06_locations;
shared numberVar array hjaiacell_06_event_timestamps;
shared stringVar array hjaiacell_06_event_times;
shared stringVar array hjaiacell_06_trap_names;
shared stringVar array hjaiacell_07_ip_addresses;
shared stringVar array hjaiacell_07_nodenames;
shared stringVar array hjaiacell_07_devices;
shared stringVar array hjaiacell_07_locations;
shared numberVar array hjaiacell_07_event_timestamps;
shared stringVar array hjaiacell_07_event_times;
shared stringVar array hjaiacell_07_trap_names;
shared stringVar array hjaiacell_08_ip_addresses;
shared stringVar array hjaiacell_08_nodenames;
shared stringVar array hjaiacell_08_devices;
shared stringVar array hjaiacell_08_locations;
shared numberVar array hjaiacell_08_event_timestamps;
shared stringVar array hjaiacell_08_event_times;
shared stringVar array hjaiacell_08_trap_names;
shared stringVar array hjaiacell_09_ip_addresses;
shared stringVar array hjaiacell_09_nodenames;
shared stringVar array hjaiacell_09_devices;
shared stringVar array hjaiacell_09_locations;
shared numberVar array hjaiacell_09_event_timestamps;
shared stringVar array hjaiacell_09_event_times;
shared stringVar array hjaiacell_09_trap_names;
shared stringVar array hjaiacell_10_ip_addresses;
shared stringVar array hjaiacell_10_nodenames;
shared stringVar array hjaiacell_10_devices;
shared stringVar array hjaiacell_10_locations;
shared numberVar array hjaiacell_10_event_timestamps;
shared stringVar array hjaiacell_10_event_times;
shared stringVar array hjaiacell_10_trap_names;
//HJAIAPCSHIGH ARRAYS
shared stringVar array hjaiapcshigh_01_ip_addresses;
shared stringVar array hjaiapcshigh_01_nodenames;
shared stringVar array hjaiapcshigh_01_devices;
shared stringVar array hjaiapcshigh_01_locations;
shared numberVar array hjaiapcshigh_01_event_timestamps;
shared stringVar array hjaiapcshigh_01_event_times;
shared stringVar array hjaiapcshigh_01_trap_names;
shared stringVar array hjaiapcshigh_02_ip_addresses;
shared stringVar array hjaiapcshigh_02_nodenames;
shared stringVar array hjaiapcshigh_02_devices;
shared stringVar array hjaiapcshigh_02_locations;
shared numberVar array hjaiapcshigh_02_event_timestamps;
shared stringVar array hjaiapcshigh_02_event_times;
shared stringVar array hjaiapcshigh_02_trap_names;
shared stringVar array hjaiapcshigh_03_ip_addresses;
shared stringVar array hjaiapcshigh_03_nodenames;
shared stringVar array hjaiapcshigh_03_devices;
shared stringVar array hjaiapcshigh_03_locations;
shared numberVar array hjaiapcshigh_03_event_timestamps;
shared stringVar array hjaiapcshigh_03_event_times;
shared stringVar array hjaiapcshigh_03_trap_names;
shared stringVar array hjaiapcshigh_04_ip_addresses;
shared stringVar array hjaiapcshigh_04_nodenames;
shared stringVar array hjaiapcshigh_04_devices;
shared stringVar array hjaiapcshigh_04_locations;
shared numberVar array hjaiapcshigh_04_event_timestamps;
shared stringVar array hjaiapcshigh_04_event_times;
shared stringVar array hjaiapcshigh_04_trap_names;
shared stringVar array hjaiapcshigh_05_ip_addresses;
shared stringVar array hjaiapcshigh_05_nodenames;
shared stringVar array hjaiapcshigh_05_devices;
shared stringVar array hjaiapcshigh_05_locations;
shared numberVar array hjaiapcshigh_05_event_timestamps;
shared stringVar array hjaiapcshigh_05_event_times;
shared stringVar array hjaiapcshigh_05_trap_names;
shared stringVar array hjaiapcshigh_06_ip_addresses;
shared stringVar array hjaiapcshigh_06_nodenames;
shared stringVar array hjaiapcshigh_06_devices;
shared stringVar array hjaiapcshigh_06_locations;
shared numberVar array hjaiapcshigh_06_event_timestamps;
shared stringVar array hjaiapcshigh_06_event_times;
shared stringVar array hjaiapcshigh_06_trap_names;
shared stringVar array hjaiapcshigh_07_ip_addresses;
shared stringVar array hjaiapcshigh_07_nodenames;
shared stringVar array hjaiapcshigh_07_devices;
shared stringVar array hjaiapcshigh_07_locations;
shared numberVar array hjaiapcshigh_07_event_timestamps;
shared stringVar array hjaiapcshigh_07_event_times;
shared stringVar array hjaiapcshigh_07_trap_names;
shared stringVar array hjaiapcshigh_08_ip_addresses;
shared stringVar array hjaiapcshigh_08_nodenames;
shared stringVar array hjaiapcshigh_08_devices;
shared stringVar array hjaiapcshigh_08_locations;
shared numberVar array hjaiapcshigh_08_event_timestamps;
shared stringVar array hjaiapcshigh_08_event_times;
shared stringVar array hjaiapcshigh_08_trap_names;
shared stringVar array hjaiapcshigh_09_ip_addresses;
shared stringVar array hjaiapcshigh_09_nodenames;
shared stringVar array hjaiapcshigh_09_devices;
shared stringVar array hjaiapcshigh_09_locations;
shared numberVar array hjaiapcshigh_09_event_timestamps;
shared stringVar array hjaiapcshigh_09_event_times;
shared stringVar array hjaiapcshigh_09_trap_names;
shared stringVar array hjaiapcshigh_10_ip_addresses;
shared stringVar array hjaiapcshigh_10_nodenames;
shared stringVar array hjaiapcshigh_10_devices;
shared stringVar array hjaiapcshigh_10_locations;
shared numberVar array hjaiapcshigh_10_event_timestamps;
shared stringVar array hjaiapcshigh_10_event_times;
shared stringVar array hjaiapcshigh_10_trap_names;
//HJAIAPCSLOW ARRAYS
shared stringVar array hjaiapcslow_01_ip_addresses;
shared stringVar array hjaiapcslow_01_nodenames;
shared stringVar array hjaiapcslow_01_devices;
shared stringVar array hjaiapcslow_01_locations;
shared numberVar array hjaiapcslow_01_event_timestamps;
shared stringVar array hjaiapcslow_01_event_times;
shared stringVar array hjaiapcslow_01_trap_names;
shared stringVar array hjaiapcslow_02_ip_addresses;
shared stringVar array hjaiapcslow_02_nodenames;
shared stringVar array hjaiapcslow_02_devices;
shared stringVar array hjaiapcslow_02_locations;
shared numberVar array hjaiapcslow_02_event_timestamps;
shared stringVar array hjaiapcslow_02_event_times;
shared stringVar array hjaiapcslow_02_trap_names;
shared stringVar array hjaiapcslow_03_ip_addresses;
shared stringVar array hjaiapcslow_03_nodenames;
shared stringVar array hjaiapcslow_03_devices;
shared stringVar array hjaiapcslow_03_locations;
shared numberVar array hjaiapcslow_03_event_timestamps;
shared stringVar array hjaiapcslow_03_event_times;
shared stringVar array hjaiapcslow_03_trap_names;
shared stringVar array hjaiapcslow_04_ip_addresses;
shared stringVar array hjaiapcslow_04_nodenames;
shared stringVar array hjaiapcslow_04_devices;
shared stringVar array hjaiapcslow_04_locations;
shared numberVar array hjaiapcslow_04_event_timestamps;
shared stringVar array hjaiapcslow_04_event_times;
shared stringVar array hjaiapcslow_04_trap_names;
shared stringVar array hjaiapcslow_05_ip_addresses;
shared stringVar array hjaiapcslow_05_nodenames;
shared stringVar array hjaiapcslow_05_devices;
shared stringVar array hjaiapcslow_05_locations;
shared numberVar array hjaiapcslow_05_event_timestamps;
shared stringVar array hjaiapcslow_05_event_times;
shared stringVar array hjaiapcslow_05_trap_names;
shared stringVar array hjaiapcslow_06_ip_addresses;
shared stringVar array hjaiapcslow_06_nodenames;
shared stringVar array hjaiapcslow_06_devices;
shared stringVar array hjaiapcslow_06_locations;
shared numberVar array hjaiapcslow_06_event_timestamps;
shared stringVar array hjaiapcslow_06_event_times;
shared stringVar array hjaiapcslow_06_trap_names;
shared stringVar array hjaiapcslow_07_ip_addresses;
shared stringVar array hjaiapcslow_07_nodenames;
shared stringVar array hjaiapcslow_07_devices;
shared stringVar array hjaiapcslow_07_locations;
shared numberVar array hjaiapcslow_07_event_timestamps;
shared stringVar array hjaiapcslow_07_event_times;
shared stringVar array hjaiapcslow_07_trap_names;
shared stringVar array hjaiapcslow_08_ip_addresses;
shared stringVar array hjaiapcslow_08_nodenames;
shared stringVar array hjaiapcslow_08_devices;
shared stringVar array hjaiapcslow_08_locations;
shared numberVar array hjaiapcslow_08_event_timestamps;
shared stringVar array hjaiapcslow_08_event_times;
shared stringVar array hjaiapcslow_08_trap_names;
shared stringVar array hjaiapcslow_09_ip_addresses;
shared stringVar array hjaiapcslow_09_nodenames;
shared stringVar array hjaiapcslow_09_devices;
shared stringVar array hjaiapcslow_09_locations;
shared numberVar array hjaiapcslow_09_event_timestamps;
shared stringVar array hjaiapcslow_09_event_times;
shared stringVar array hjaiapcslow_09_trap_names;
shared stringVar array hjaiapcslow_10_ip_addresses;
shared stringVar array hjaiapcslow_10_nodenames;
shared stringVar array hjaiapcslow_10_devices;
shared stringVar array hjaiapcslow_10_locations;
shared numberVar array hjaiapcslow_10_event_timestamps;
shared stringVar array hjaiapcslow_10_event_times;
shared stringVar array hjaiapcslow_10_trap_names;
//HJAIAPS-SMR ARRAYS
shared stringVar array hjaiaps_smr_01_ip_addresses;
shared stringVar array hjaiaps_smr_01_nodenames;
shared stringVar array hjaiaps_smr_01_devices;
shared stringVar array hjaiaps_smr_01_locations;
shared numberVar array hjaiaps_smr_01_event_timestamps;
shared stringVar array hjaiaps_smr_01_event_times;
shared stringVar array hjaiaps_smr_01_trap_names;
shared stringVar array hjaiaps_smr_02_ip_addresses;
shared stringVar array hjaiaps_smr_02_nodenames;
shared stringVar array hjaiaps_smr_02_devices;
shared stringVar array hjaiaps_smr_02_locations;
shared numberVar array hjaiaps_smr_02_event_timestamps;
shared stringVar array hjaiaps_smr_02_event_times;
shared stringVar array hjaiaps_smr_02_trap_names;
shared stringVar array hjaiaps_smr_03_ip_addresses;
shared stringVar array hjaiaps_smr_03_nodenames;
shared stringVar array hjaiaps_smr_03_devices;
shared stringVar array hjaiaps_smr_03_locations;
shared numberVar array hjaiaps_smr_03_event_timestamps;
shared stringVar array hjaiaps_smr_03_event_times;
shared stringVar array hjaiaps_smr_03_trap_names;
shared stringVar array hjaiaps_smr_04_ip_addresses;
shared stringVar array hjaiaps_smr_04_nodenames;
shared stringVar array hjaiaps_smr_04_devices;
shared stringVar array hjaiaps_smr_04_locations;
shared numberVar array hjaiaps_smr_04_event_timestamps;
shared stringVar array hjaiaps_smr_04_event_times;
shared stringVar array hjaiaps_smr_04_trap_names;
shared stringVar array hjaiaps_smr_05_ip_addresses;
shared stringVar array hjaiaps_smr_05_nodenames;
shared stringVar array hjaiaps_smr_05_devices;
shared stringVar array hjaiaps_smr_05_locations;
shared numberVar array hjaiaps_smr_05_event_timestamps;
shared stringVar array hjaiaps_smr_05_event_times;
shared stringVar array hjaiaps_smr_05_trap_names;
shared stringVar array hjaiaps_smr_06_ip_addresses;
shared stringVar array hjaiaps_smr_06_nodenames;
shared stringVar array hjaiaps_smr_06_devices;
shared stringVar array hjaiaps_smr_06_locations;
shared numberVar array hjaiaps_smr_06_event_timestamps;
shared stringVar array hjaiaps_smr_06_event_times;
shared stringVar array hjaiaps_smr_06_trap_names;
shared stringVar array hjaiaps_smr_07_ip_addresses;
shared stringVar array hjaiaps_smr_07_nodenames;
shared stringVar array hjaiaps_smr_07_devices;
shared stringVar array hjaiaps_smr_07_locations;
shared numberVar array hjaiaps_smr_07_event_timestamps;
shared stringVar array hjaiaps_smr_07_event_times;
shared stringVar array hjaiaps_smr_07_trap_names;
shared stringVar array hjaiaps_smr_08_ip_addresses;
shared stringVar array hjaiaps_smr_08_nodenames;
shared stringVar array hjaiaps_smr_08_devices;
shared stringVar array hjaiaps_smr_08_locations;
shared numberVar array hjaiaps_smr_08_event_timestamps;
shared stringVar array hjaiaps_smr_08_event_times;
shared stringVar array hjaiaps_smr_08_trap_names;
shared stringVar array hjaiaps_smr_09_ip_addresses;
shared stringVar array hjaiaps_smr_09_nodenames;
shared stringVar array hjaiaps_smr_09_devices;
shared stringVar array hjaiaps_smr_09_locations;
shared numberVar array hjaiaps_smr_09_event_timestamps;
shared stringVar array hjaiaps_smr_09_event_times;
shared stringVar array hjaiaps_smr_09_trap_names;
shared stringVar array hjaiaps_smr_10_ip_addresses;
shared stringVar array hjaiaps_smr_10_nodenames;
shared stringVar array hjaiaps_smr_10_devices;
shared stringVar array hjaiaps_smr_10_locations;
shared numberVar array hjaiaps_smr_10_event_timestamps;
shared stringVar array hjaiaps_smr_10_event_times;
shared stringVar array hjaiaps_smr_10_trap_names;
local numberVar counter:=1;
local booleanVar success:=FALSE;
select {Command.NODENAME}
case 'HJAIACELL' :
(
select {Command.LOCATION}
case '1' :
(
while NOT success AND counter<=ubound(hjaiacell_01_ip_addresses) do
(
if {Command.IP_ADDRESS}=hjaiacell_01_ip_addresses[counter] AND {Command.NODENAME}=hjaiacell_01_nodenames[counter] AND
{Command.DEVICE}=hjaiacell_01_devices[counter] AND {Command.LOCATION}=hjaiacell_01_locations[counter] AND
{Command.EVENT_TIMESTAMP}< hjaiacell_01_event_timestamps[counter] then
success:=TRUE;
if NOT success then counter:=counter+1;
)
)
case '2' :
(
while NOT success AND counter<=ubound(hjaiacell_02_ip_addresses) do
(
if {Command.IP_ADDRESS}=hjaiacell_02_ip_addresses[counter] AND {Command.NODENAME}=hjaiacell_02_nodenames[counter] AND
{Command.DEVICE}=hjaiacell_02_devices[counter] AND {Command.LOCATION}=hjaiacell_02_locations[counter] AND
{Command.EVENT_TIMESTAMP}< hjaiacell_02_event_timestamps[counter] then
success:=TRUE;
if NOT success then counter:=counter+1;
)
)
case '3' :
(
while NOT success AND counter<=ubound(hjaiacell_03_ip_addresses) do
(
if {Command.IP_ADDRESS}=hjaiacell_03_ip_addresses[counter] AND {Command.NODENAME}=hjaiacell_03_nodenames[counter] AND
{Command.DEVICE}=hjaiacell_03_devices[counter] AND {Command.LOCATION}=hjaiacell_03_locations[counter] AND
{Command.EVENT_TIMESTAMP}< hjaiacell_03_event_timestamps[counter] then
success:=TRUE;
if NOT success then counter:=counter+1;
)
)
case '4' :
(
while NOT success AND counter<=ubound(hjaiacell_04_ip_addresses) do
(
if {Command.IP_ADDRESS}=hjaiacell_04_ip_addresses[counter] AND {Command.NODENAME}=hjaiacell_04_nodenames[counter] AND
{Command.DEVICE}=hjaiacell_04_devices[counter] AND {Command.LOCATION}=hjaiacell_04_locations[counter] AND
{Command.EVENT_TIMESTAMP}< hjaiacell_04_event_timestamps[counter] then
success:=TRUE;
if NOT success then counter:=counter+1;
)
)
case '5' :
(
while NOT success AND counter<=ubound(hjaiacell_05_ip_addresses) do
(
if {Command.IP_ADDRESS}=hjaiacell_05_ip_addresses[counter] AND {Command.NODENAME}=hjaiacell_05_nodenames[counter] AND
{Command.DEVICE}=hjaiacell_05_devices[counter] AND {Command.LOCATION}=hjaiacell_05_locations[counter] AND
{Command.EVENT_TIMESTAMP}< hjaiacell_05_event_timestamps[counter] then
success:=TRUE;
if NOT success then counter:=counter+1;
)
)
case '6' :
(
while NOT success AND counter<=ubound(hjaiacell_06_ip_addresses) do
(
if {Command.IP_ADDRESS}=hjaiacell_06_ip_addresses[counter] AND {Command.NODENAME}=hjaiacell_06_nodenames[counter] AND
{Command.DEVICE}=hjaiacell_06_devices[counter] AND {Command.LOCATION}=hjaiacell_06_locations[counter] AND
{Command.EVENT_TIMESTAMP}< hjaiacell_06_event_timestamps[counter] then
success:=TRUE;
if NOT success then counter:=counter+1;
)
)
case '7' :
(
while NOT success AND counter<=ubound(hjaiacell_07_ip_addresses) do
(
if {Command.IP_ADDRESS}=hjaiacell_07_ip_addresses[counter] AND {Command.NODENAME}=hjaiacell_07_nodenames[counter] AND
{Command.DEVICE}=hjaiacell_07_devices[counter] AND {Command.LOCATION}=hjaiacell_07_locations[counter] AND
{Command.EVENT_TIMESTAMP}< hjaiacell_07_event_timestamps[counter] then
success:=TRUE;
if NOT success then counter:=counter+1;
)
)
case '8' :
(
while NOT success AND counter<=ubound(hjaiacell_08_ip_addresses) do
(
if {Command.IP_ADDRESS}=hjaiacell_08_ip_addresses[counter] AND {Command.NODENAME}=hjaiacell_08_nodenames[counter] AND
{Command.DEVICE}=hjaiacell_08_devices[counter] AND {Command.LOCATION}=hjaiacell_08_locations[counter] AND
{Command.EVENT_TIMESTAMP}< hjaiacell_08_event_timestamps[counter] then
success:=TRUE;
if NOT success then counter:=counter+1;
)
)
case '9' :
(
while NOT success AND counter<=ubound(hjaiacell_09_ip_addresses) do
(
if {Command.IP_ADDRESS}=hjaiacell_09_ip_addresses[counter] AND {Command.NODENAME}=hjaiacell_09_nodenames[counter] AND
{Command.DEVICE}=hjaiacell_09_devices[counter] AND {Command.LOCATION}=hjaiacell_09_locations[counter] AND
{Command.EVENT_TIMESTAMP}< hjaiacell_09_event_timestamps[counter] then
success:=TRUE;
if NOT success then counter:=counter+1;
)
)
case '10' :
(
while NOT success AND counter<=ubound(hjaiacell_10_ip_addresses) do
(
if {Command.IP_ADDRESS}=hjaiacell_10_ip_addresses[counter] AND {Command.NODENAME}=hjaiacell_10_nodenames[counter] AND
{Command.DEVICE}=hjaiacell_10_devices[counter] AND {Command.LOCATION}=hjaiacell_10_locations[counter] AND
{Command.EVENT_TIMESTAMP}< hjaiacell_10_event_timestamps[counter] then
success:=TRUE;
if NOT success then counter:=counter+1;
)
)
)
case 'HJAIAPCSHIGH' :
(
select {Command.LOCATION}
case '1' :
(
while NOT success AND counter<=ubound(hjaiapcshigh_01_ip_addresses) do
(
if {Command.IP_ADDRESS}=hjaiapcshigh_01_ip_addresses[counter] AND {Command.NODENAME}=hjaiapcshigh_01_nodenames[counter] AND
{Command.DEVICE}=hjaiapcshigh_01_devices[counter] AND {Command.LOCATION}=hjaiapcshigh_01_locations[counter] AND
{Command.EVENT_TIMESTAMP}< hjaiapcshigh_01_event_timestamps[counter] then
success:=TRUE;
if NOT success then counter:=counter+1;
)
)
case '2' :
(
while NOT success AND counter<=ubound(hjaiapcshigh_02_ip_addresses) do
(
if {Command.IP_ADDRESS}=hjaiapcshigh_02_ip_addresses[counter] AND {Command.NODENAME}=hjaiapcshigh_02_nodenames[counter] AND
{Command.DEVICE}=hjaiapcshigh_02_devices[counter] AND {Command.LOCATION}=hjaiapcshigh_02_locations[counter] AND
{Command.EVENT_TIMESTAMP}< hjaiapcshigh_02_event_timestamps[counter] then
success:=TRUE;
if NOT success then counter:=counter+1;
)
)
case '3' :
(
while NOT success AND counter<=ubound(hjaiapcshigh_03_ip_addresses) do
(
if {Command.IP_ADDRESS}=hjaiapcshigh_03_ip_addresses[counter] AND {Command.NODENAME}=hjaiapcshigh_03_nodenames[counter] AND
{Command.DEVICE}=hjaiapcshigh_03_devices[counter] AND {Command.LOCATION}=hjaiapcshigh_03_locations[counter] AND
{Command.EVENT_TIMESTAMP}< hjaiapcshigh_03_event_timestamps[counter] then
success:=TRUE;
if NOT success then counter:=counter+1;
)
)
case '4' :
(
while NOT success AND counter<=ubound(hjaiapcshigh_04_ip_addresses) do
(
if {Command.IP_ADDRESS}=hjaiapcshigh_04_ip_addresses[counter] AND {Command.NODENAME}=hjaiapcshigh_04_nodenames[counter] AND
{Command.DEVICE}=hjaiapcshigh_04_devices[counter] AND {Command.LOCATION}=hjaiapcshigh_04_locations[counter] AND
{Command.EVENT_TIMESTAMP}< hjaiapcshigh_04_event_timestamps[counter] then
success:=TRUE;
if NOT success then counter:=counter+1;
)
)
case '5' :
(
while NOT success AND counter<=ubound(hjaiapcshigh_05_ip_addresses) do
(
if {Command.IP_ADDRESS}=hjaiapcshigh_05_ip_addresses[counter] AND {Command.NODENAME}=hjaiapcshigh_05_nodenames[counter] AND
{Command.DEVICE}=hjaiapcshigh_05_devices[counter] AND {Command.LOCATION}=hjaiapcshigh_05_locations[counter] AND
{Command.EVENT_TIMESTAMP}< hjaiapcshigh_05_event_timestamps[counter] then
success:=TRUE;
if NOT success then counter:=counter+1;
)
)
case '6' :
(
while NOT success AND counter<=ubound(hjaiapcshigh_06_ip_addresses) do
(
if {Command.IP_ADDRESS}=hjaiapcshigh_06_ip_addresses[counter] AND {Command.NODENAME}=hjaiapcshigh_06_nodenames[counter] AND
{Command.DEVICE}=hjaiapcshigh_06_devices[counter] AND {Command.LOCATION}=hjaiapcshigh_06_locations[counter] AND
{Command.EVENT_TIMESTAMP}< hjaiapcshigh_06_event_timestamps[counter] then
success:=TRUE;
if NOT success then counter:=counter+1;
)
)
case '7' :
(
while NOT success AND counter<=ubound(hjaiapcshigh_07_ip_addresses) do
(
if {Command.IP_ADDRESS}=hjaiapcshigh_07_ip_addresses[counter] AND {Command.NODENAME}=hjaiapcshigh_07_nodenames[counter] AND
{Command.DEVICE}=hjaiapcshigh_07_devices[counter] AND {Command.LOCATION}=hjaiapcshigh_07_locations[counter] AND
{Command.EVENT_TIMESTAMP}< hjaiapcshigh_07_event_timestamps[counter] then
success:=TRUE;
if NOT success then counter:=counter+1;
)
)
case '8' :
(
while NOT success AND counter<=ubound(hjaiapcshigh_08_ip_addresses) do
(
if {Command.IP_ADDRESS}=hjaiapcshigh_08_ip_addresses[counter] AND {Command.NODENAME}=hjaiapcshigh_08_nodenames[counter] AND
{Command.DEVICE}=hjaiapcshigh_08_devices[counter] AND {Command.LOCATION}=hjaiapcshigh_08_locations[counter] AND
{Command.EVENT_TIMESTAMP}< hjaiapcshigh_08_event_timestamps[counter] then
success:=TRUE;
if NOT success then counter:=counter+1;
)
)
case '9' :
(
while NOT success AND counter<=ubound(hjaiapcshigh_09_ip_addresses) do
(
if {Command.IP_ADDRESS}=hjaiapcshigh_09_ip_addresses[counter] AND {Command.NODENAME}=hjaiapcshigh_09_nodenames[counter] AND
{Command.DEVICE}=hjaiapcshigh_09_devices[counter] AND {Command.LOCATION}=hjaiapcshigh_09_locations[counter] AND
{Command.EVENT_TIMESTAMP}< hjaiapcshigh_09_event_timestamps[counter] then
success:=TRUE;
if NOT success then counter:=counter+1;
)
)
case '10' :
(
while NOT success AND counter<=ubound(hjaiapcshigh_10_ip_addresses) do
(
if {Command.IP_ADDRESS}=hjaiapcshigh_10_ip_addresses[counter] AND {Command.NODENAME}=hjaiapcshigh_10_nodenames[counter] AND
{Command.DEVICE}=hjaiapcshigh_10_devices[counter] AND {Command.LOCATION}=hjaiapcshigh_10_locations[counter] AND
{Command.EVENT_TIMESTAMP}< hjaiapcshigh_10_event_timestamps[counter] then
success:=TRUE;
if NOT success then counter:=counter+1;
)
)
)
case 'HJAIAPCSLOW' :
(
select {Command.LOCATION}
case '1' :
(
while NOT success AND counter<=ubound(hjaiapcslow_01_ip_addresses) do
(
if {Command.IP_ADDRESS}=hjaiapcslow_01_ip_addresses[counter] AND {Command.NODENAME}=hjaiapcslow_01_nodenames[counter] AND
{Command.DEVICE}=hjaiapcslow_01_devices[counter] AND {Command.LOCATION}=hjaiapcslow_01_locations[counter] AND
{Command.EVENT_TIMESTAMP}< hjaiapcslow_01_event_timestamps[counter] then
success:=TRUE;
if NOT success then counter:=counter+1;
)
)
case '2' :
(
while NOT success AND counter<=ubound(hjaiapcslow_02_ip_addresses) do
(
if {Command.IP_ADDRESS}=hjaiapcslow_02_ip_addresses[counter] AND {Command.NODENAME}=hjaiapcslow_02_nodenames[counter] AND
{Command.DEVICE}=hjaiapcslow_02_devices[counter] AND {Command.LOCATION}=hjaiapcslow_02_locations[counter] AND
{Command.EVENT_TIMESTAMP}< hjaiapcslow_02_event_timestamps[counter] then
success:=TRUE;
if NOT success then counter:=counter+1;
)
)
case '3' :
(
while NOT success AND counter<=ubound(hjaiapcslow_03_ip_addresses) do
(
if {Command.IP_ADDRESS}=hjaiapcslow_03_ip_addresses[counter] AND {Command.NODENAME}=hjaiapcslow_03_nodenames[counter] AND
{Command.DEVICE}=hjaiapcslow_03_devices[counter] AND {Command.LOCATION}=hjaiapcslow_03_locations[counter] AND
{Command.EVENT_TIMESTAMP}< hjaiapcslow_03_event_timestamps[counter] then
success:=TRUE;
if NOT success then counter:=counter+1;
)
)
case '4' :
(
while NOT success AND counter<=ubound(hjaiapcslow_04_ip_addresses) do
(
if {Command.IP_ADDRESS}=hjaiapcslow_04_ip_addresses[counter] AND {Command.NODENAME}=hjaiapcslow_04_nodenames[counter] AND
{Command.DEVICE}=hjaiapcslow_04_devices[counter] AND {Command.LOCATION}=hjaiapcslow_04_locations[counter] AND
{Command.EVENT_TIMESTAMP}< hjaiapcslow_04_event_timestamps[counter] then
success:=TRUE;
if NOT success then counter:=counter+1;
)
)
case '5' :
(
while NOT success AND counter<=ubound(hjaiapcslow_05_ip_addresses) do
(
if {Command.IP_ADDRESS}=hjaiapcslow_05_ip_addresses[counter] AND {Command.NODENAME}=hjaiapcslow_05_nodenames[counter] AND
{Command.DEVICE}=hjaiapcslow_05_devices[counter] AND {Command.LOCATION}=hjaiapcslow_05_locations[counter] AND
{Command.EVENT_TIMESTAMP}< hjaiapcslow_05_event_timestamps[counter] then
success:=TRUE;
if NOT success then counter:=counter+1;
)
)
case '6' :
(
while NOT success AND counter<=ubound(hjaiapcslow_06_ip_addresses) do
(
if {Command.IP_ADDRESS}=hjaiapcslow_06_ip_addresses[counter] AND {Command.NODENAME}=hjaiapcslow_06_nodenames[counter] AND
{Command.DEVICE}=hjaiapcslow_06_devices[counter] AND {Command.LOCATION}=hjaiapcslow_06_locations[counter] AND
{Command.EVENT_TIMESTAMP}< hjaiapcslow_06_event_timestamps[counter] then
success:=TRUE;
if NOT success then counter:=counter+1;
)
)
case '7' :
(
while NOT success AND counter<=ubound(hjaiapcslow_07_ip_addresses) do
(
if {Command.IP_ADDRESS}=hjaiapcslow_07_ip_addresses[counter] AND {Command.NODENAME}=hjaiapcslow_07_nodenames[counter] AND
{Command.DEVICE}=hjaiapcslow_07_devices[counter] AND {Command.LOCATION}=hjaiapcslow_07_locations[counter] AND
{Command.EVENT_TIMESTAMP}< hjaiapcslow_07_event_timestamps[counter] then
success:=TRUE;
if NOT success then counter:=counter+1;
)
)
case '8' :
(
while NOT success AND counter<=ubound(hjaiapcslow_08_ip_addresses) do
(
if {Command.IP_ADDRESS}=hjaiapcslow_08_ip_addresses[counter] AND {Command.NODENAME}=hjaiapcslow_08_nodenames[counter] AND
{Command.DEVICE}=hjaiapcslow_08_devices[counter] AND {Command.LOCATION}=hjaiapcslow_08_locations[counter] AND
{Command.EVENT_TIMESTAMP}< hjaiapcslow_08_event_timestamps[counter] then
success:=TRUE;
if NOT success then counter:=counter+1;
)
)
case '9' :
(
while NOT success AND counter<=ubound(hjaiapcslow_09_ip_addresses) do
(
if {Command.IP_ADDRESS}=hjaiapcslow_09_ip_addresses[counter] AND {Command.NODENAME}=hjaiapcslow_09_nodenames[counter] AND
{Command.DEVICE}=hjaiapcslow_09_devices[counter] AND {Command.LOCATION}=hjaiapcslow_09_locations[counter] AND
{Command.EVENT_TIMESTAMP}< hjaiapcslow_09_event_timestamps[counter] then
success:=TRUE;
if NOT success then counter:=counter+1;
)
)
case '10' :
(
while NOT success AND counter<=ubound(hjaiapcslow_10_ip_addresses) do
(
if {Command.IP_ADDRESS}=hjaiapcslow_10_ip_addresses[counter] AND {Command.NODENAME}=hjaiapcslow_10_nodenames[counter] AND
{Command.DEVICE}=hjaiapcslow_10_devices[counter] AND {Command.LOCATION}=hjaiapcslow_10_locations[counter] AND
{Command.EVENT_TIMESTAMP}< hjaiapcslow_10_event_timestamps[counter] then
success:=TRUE;
if NOT success then counter:=counter+1;
)
)
)
case 'HJAIAPS-SMR' :
(
select {Command.LOCATION}
case '1' :
(
while NOT success AND counter<=ubound(hjaiaps_smr_01_ip_addresses) do
(
if {Command.IP_ADDRESS}=hjaiaps_smr_01_ip_addresses[counter] AND {Command.NODENAME}=hjaiaps_smr_01_nodenames[counter] AND
{Command.DEVICE}=hjaiaps_smr_01_devices[counter] AND {Command.LOCATION}=hjaiaps_smr_01_locations[counter] AND
{Command.EVENT_TIMESTAMP}< hjaiaps_smr_01_event_timestamps[counter] then
success:=TRUE;
if NOT success then counter:=counter+1;
)
)
case '2' :
(
while NOT success AND counter<=ubound(hjaiaps_smr_02_ip_addresses) do
(
if {Command.IP_ADDRESS}=hjaiaps_smr_02_ip_addresses[counter] AND {Command.NODENAME}=hjaiaps_smr_02_nodenames[counter] AND
{Command.DEVICE}=hjaiaps_smr_02_devices[counter] AND {Command.LOCATION}=hjaiaps_smr_02_locations[counter] AND
{Command.EVENT_TIMESTAMP}< hjaiaps_smr_02_event_timestamps[counter] then
success:=TRUE;
if NOT success then counter:=counter+1;
)
)
case '3' :
(
while NOT success AND counter<=ubound(hjaiaps_smr_03_ip_addresses) do
(
if {Command.IP_ADDRESS}=hjaiaps_smr_03_ip_addresses[counter] AND {Command.NODENAME}=hjaiaps_smr_03_nodenames[counter] AND
{Command.DEVICE}=hjaiaps_smr_03_devices[counter] AND {Command.LOCATION}=hjaiaps_smr_03_locations[counter] AND
{Command.EVENT_TIMESTAMP}< hjaiaps_smr_03_event_timestamps[counter] then
success:=TRUE;
if NOT success then counter:=counter+1;
)
)
case '4' :
(
while NOT success AND counter<=ubound(hjaiaps_smr_04_ip_addresses) do
(
if {Command.IP_ADDRESS}=hjaiaps_smr_04_ip_addresses[counter] AND {Command.NODENAME}=hjaiaps_smr_04_nodenames[counter] AND
{Command.DEVICE}=hjaiaps_smr_04_devices[counter] AND {Command.LOCATION}=hjaiaps_smr_04_locations[counter] AND
{Command.EVENT_TIMESTAMP}< hjaiaps_smr_04_event_timestamps[counter] then
success:=TRUE;
if NOT success then counter:=counter+1;
)
)
case '5' :
(
while NOT success AND counter<=ubound(hjaiaps_smr_05_ip_addresses) do
(
if {Command.IP_ADDRESS}=hjaiaps_smr_05_ip_addresses[counter] AND {Command.NODENAME}=hjaiaps_smr_05_nodenames[counter] AND
{Command.DEVICE}=hjaiaps_smr_05_devices[counter] AND {Command.LOCATION}=hjaiaps_smr_05_locations[counter] AND
{Command.EVENT_TIMESTAMP}< hjaiaps_smr_05_event_timestamps[counter] then
success:=TRUE;
if NOT success then counter:=counter+1;
)
)
case '6' :
(
while NOT success AND counter<=ubound(hjaiaps_smr_06_ip_addresses) do
(
if {Command.IP_ADDRESS}=hjaiaps_smr_06_ip_addresses[counter] AND {Command.NODENAME}=hjaiaps_smr_06_nodenames[counter] AND
{Command.DEVICE}=hjaiaps_smr_06_devices[counter] AND {Command.LOCATION}=hjaiaps_smr_06_locations[counter] AND
{Command.EVENT_TIMESTAMP}< hjaiaps_smr_06_event_timestamps[counter] then
success:=TRUE;
if NOT success then counter:=counter+1;
)
)
case '7' :
(
while NOT success AND counter<=ubound(hjaiaps_smr_07_ip_addresses) do
(
if {Command.IP_ADDRESS}=hjaiaps_smr_07_ip_addresses[counter] AND {Command.NODENAME}=hjaiaps_smr_07_nodenames[counter] AND
{Command.DEVICE}=hjaiaps_smr_07_devices[counter] AND {Command.LOCATION}=hjaiaps_smr_07_locations[counter] AND
{Command.EVENT_TIMESTAMP}< hjaiaps_smr_07_event_timestamps[counter] then
success:=TRUE;
if NOT success then counter:=counter+1;
)
)
case '8' :
(
while NOT success AND counter<=ubound(hjaiaps_smr_08_ip_addresses) do
(
if {Command.IP_ADDRESS}=hjaiaps_smr_08_ip_addresses[counter] AND {Command.NODENAME}=hjaiaps_smr_08_nodenames[counter] AND
{Command.DEVICE}=hjaiaps_smr_08_devices[counter] AND {Command.LOCATION}=hjaiaps_smr_08_locations[counter] AND
{Command.EVENT_TIMESTAMP}< hjaiaps_smr_08_event_timestamps[counter] then
success:=TRUE;
if NOT success then counter:=counter+1;
)
)
case '9' :
(
while NOT success AND counter<=ubound(hjaiaps_smr_09_ip_addresses) do
(
if {Command.IP_ADDRESS}=hjaiaps_smr_09_ip_addresses[counter] AND {Command.NODENAME}=hjaiaps_smr_09_nodenames[counter] AND
{Command.DEVICE}=hjaiaps_smr_09_devices[counter] AND {Command.LOCATION}=hjaiaps_smr_09_locations[counter] AND
{Command.EVENT_TIMESTAMP}< hjaiaps_smr_09_event_timestamps[counter] then
success:=TRUE;
if NOT success then counter:=counter+1;
)
)
case '10' :
(
while NOT success AND counter<=ubound(hjaiaps_smr_10_ip_addresses) do
(
if {Command.IP_ADDRESS}=hjaiaps_smr_10_ip_addresses[counter] AND {Command.NODENAME}=hjaiaps_smr_10_nodenames[counter] AND
{Command.DEVICE}=hjaiaps_smr_10_devices[counter] AND {Command.LOCATION}=hjaiaps_smr_10_locations[counter] AND
{Command.EVENT_TIMESTAMP}< hjaiaps_smr_10_event_timestamps[counter] then
success:=TRUE;
if NOT success then counter:=counter+1;
)
)
);
//check.
if NOT success then counter:=-1;
//return.
counter
//'ubound : '&ubound(ip_addresses)