logo       
Bookmark and Share

RE: Ref: [TEC371] limit for string used in PROLOG list: msg#00486

sysutils.tivoli.tme10

Subject: RE: Ref: [TEC371] limit for string used in PROLOG list

if I recall correctly the limit to the size of a list is the amount of
memory you have available. Now the limit on a Prolog string atom is
something around 32k.

As for a better way of handling the logic as you add more strings to check
it will take longer to process each event.

You could use facts or the recorded database to keep the string lists short,
or even use simple facts to handle the strings. For example:

% Prolog source file to be compiled and loaded at TEC_Start
atompart_match_fact('EVENT_Class','Fatal Exception occurred').
atompart_match_fact('EVENT_Class','IsEvents ERROR
IntegrationServiceException').
atompart_match_fact('EVENT_Class','java.io.IOException: Stream closed').
atompart_match_fact('EVENT_Class2','The maximum number of characters for
this COBOL').
atompart_match_fact('EVENT_Class2','Failure retrieving policy access').


Your TEC rule would now look something like:
reception_action:
(
bo_get_classof(_event,_class),
findall(_match,
(
atompart_match_fact(_class,_match),
atompart(_msg,_match,_,_), !),
[_matched]), /* succeeds if at least one match is found */
drop_received_event,
commit_set
),


-----Original Message-----
From: owner-tme10@xxxxxxxxxxxxxxxx
[mailto:owner-tme10@xxxxxxxxxxxxxxxx]On Behalf Of vpatel@xxxxxxxxx
Sent: Friday, January 28, 2005 9:58 AM
To: tme10@xxxxxxxxxxxxxxxx
Subject: [tme10] Ref: [TEC371] limit for string used in PROLOG list


Hi, List.


I am dropping event if certain string is found in the msg slot. To achieve
this I created a list and the request keeps coming form administrator to
drop events. The list is growing as I add more string to filter events. Is
there any limitation for using list this way? Any one has experienced any
problem? Is there any limit on number of characters that can be used in
list? Is there any better way to accomplish this?
reception_action:
(
_string_list = ['Fatal Exception occurred','IsEvents ERROR
IntegrationServiceException,''java.io.IOException: Stream closed','The
maximum number of characters for this COBOL', 'Failure retrieving policy
access'],
findall(_match,
(
member(_match, _string_list),
atompart(_msg,_match,_,_), !),
[_matched]), /* succeeds if at least one match is found */
drop_received_event,
commit_set
),


Vina Patel
IT Infrastructure,
Tivoli Support
Chubb & Sons, Inc.
Phone: 908-903-5794
vpatel@xxxxxxxxx









<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | Mail Home | sitemap | FAQ | advertise