Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need to suppress Crystal array values

Status
Not open for further replies.

aubie1

Programmer
Jun 30, 2006
9
US
I am working on a report that was created by someone else utlizing many arrays. This array is brining in a datetime value of the time certain systems are back online. Problem is there are some database alerts (HP Openview) that are being automaticallly sent into the DB and causing unneeded downtimes to be automatically entered causing the report to show duration times (formula) that are adding to that total and do not need to be. Example below:

Downtime (Field) Uptime (Array formula),Duration(formula)

05-17-2006 13:06:35,05-17-2006 12:07:18, 0:43
05-22-2006 19:26:14,05-31-2006 18:22:15, 12896:01
05-31-2006 18:21:45,05-31-2006 18:22:15, 0:30

see how the second entry takes care of the 3rd entry timewise? the 3rd entry is already encapsulated in the 2nd entry's time frame. Looks like the array is working right, but the Downtime (Field) is the one that is being entered via the database alert and is adding this unneeded downtime duration.

I need to find a way to suppress the section, these are in the detail section, so that these unneeded duration times are not added. I have tried writing code in the suppression section of the section expert as follows:
downtime <= previous(uptime)
but uptime is an array and Crystal will not recognize this. Can anyone point me in the right direction?

Thanks!
 
Need to suppress records where false Downtimes are reported"

I meant to change the headline of this one to the above.

thanks
 
How do YOU know when the alert is one to be excluded? If you have a field that indicates an automatic alert then use that in your record selection formula to exclude those records.

-LB
 
That's the thing, I have limited access to the database and was told there is a particular field that indicates alert. it's not so much an alert as it is the db creating a new record when it should not. and it does this whenever the admin logs into the system. so i was looking for a way to logically look at the previous UPTIME(array) and if it is <= the current record's value suppress the record. but cannot use the 'previous record' function on arrays.
 
sorry, the first line should say I was told "there is NO particular field that indicates alert.
 
Then again, how do YOU know when the alert is one to be excluded?

-LB
 
Downtime (Field) Uptime (Array formula),Duration(formula)
05-17-2006 13:06:35,05-17-2006 12:07:18, 0:43
05-22-2006 19:26:14,05-31-2006 18:22:15, 12896:01
05-31-2006 18:21:45,05-31-2006 18:22:15, 0:30

this is my initial 3 records, they belong to one group (one node). the third record needs to be excluded because that downtime has already been accounted for in the previous record so there was no actual downtime here and there should not be the 0:30 of extra downtime here raising the sum total of downtime. so i need to get rid of this record somehow. The UPtime (array) looks to be working correctly and is reporting the uptime correctly. Does that answer your ? thanks
 
Okay, maybe try something like this as a detail suppression formula:

downtime >= previous(downtime) and
uptime <= previous(uptime)

I think you would have to add(

if not(
downtime >= previous(downtime) and
uptime <= previous(uptime)
) then...

...into your calculation formula.

-LB



 
that's what I tried from the beginning but Crystal gives an error if you try to use 'previous' or 'next' on the uptime array value.
 
Well, what is your formula? Why are you using an array?

-LB
 
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)
 
Sorry I asked! :)

Let me show you a principle that you can use, rather than me trying to modify the above directly. Let's say you have an array formula like this:

//{@formula1}:
whileprintingrecords;
stringvar array dow := ["Sun","Mon","Tue","Wed","Thur","Fri","Sat"];
numbervar i;
numbervar j := ubound(dow);
stringvar x;
stringvar y := x;

for i := 1 to j do(
if dayofweek({table.date}) = i then
x := dow);
x

This formula would be similar to your first formula above. If you set a variable equal to your array element (in my example x := dow), then if before you calculate x, you set a second variable y equal to x (see above in bold), y will always show the value of the previous row. You could then reference the y value for calculations in a second formula as in:

evaluateafter({@formula1});
whileprintingrecords;
stringvar y;
stringvar x;
numbervar sumz;

if not(
{table.downtime} >= previous({table.downtime}) and
datetime(x) <= datetime(y)
) then
sumz := sumz + datediff("s",{table.downtime},x);

Then in the display formula for sumz you could convert the seconds back to a string display.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top