#! /usr/local/bin/perl-w # A perl program to do read the notifAlarmTable use FileHandle; use IPC::Open2; use Symbol; # use Tk; use Sybase::CTlib; use Time::Local; use strict; my $dbAlarm=new Sybase::CTlib 'harmless','harmless','OPSYB1',''; $dbAlarm->ct_sql("use TomTest"); my $sql = "SELECT * from notifAlarmEntry ORDER BY datetime" ; my(@records) = $dbAlarm->ct_sql($sql); my($record, $StartWarn, $StopOK); foreach $record (@records) { #build history record 4 each entry in notifAlarmEntry #Fields:Sequence,UnixTime,DateTime,Source,Process,Category,Topic,Message #this is were I will look for WARNING and OK NOW MESSAGES #to put in Table #Category contains either WARNING or OK NOW #Topic contains the PS Name print "$record->[0], $record->[1], $record->[2], $record->[3], $record->[4], $record->[5], $record->[6], $record->[7]\n" }