next up previous
Next: Searching for records Up: Module irpr_kappa(irpr_kappa.kl1) Previous: Irpr system server

Execution of messages

The first arguments of exec/5 shown below are the messages.

exec(search_current_data(Search_cond,ComStatus),_Mode,Status)-IFP :-
    search_data(current,Search_cond,ComStatus,Status)-IFP.
    % searches the current data
exec(search_history_data(Search_cond,ComStatus),_Mode,Status)-IFP :-
    search_data(history,Search_cond,ComStatus,Status)-IFP.
    % searches the historical data
exec(search_all_data(Search_cond,ComStatus),_Mode,Status)-IFP :-
    search_data(all,Search_cond,ComStatus,Status)-IFP.
    % searches both the current and the historical data
exec(add_new_member(Member_info, ComStatus),update,Status)-IFP :-
    get_table_list(update, Tables),
    IFP <= begin_transaction(Tables,[],Status1),
    add_new_member(Status1,Member_info,ComStatus)-IFP,
    IFP <= close(Status).
    % adds the member information
exec(modify_member(Member_info, ComStatus),update,Status)-IFP :-
    get_table_list(update, Tables),
    IFP <= begin_transaction(Tables,[],Status1),
    modify_member(Status1,Member_info,modify,ComStatus)-IFP,
    IFP <= close(Status).
    % modifies the member information
exec(delete_member(Member_info, ComStatus),update,Status)-IFP :-
    get_table_list(update, Tables),
    IFP <= begin_transaction(Tables,[],Status1),
    modify_member(Status1,Member_info,delete,ComStatus)-IFP,
    IFP <= close(Status).
    % deletes the member information
otherwise.
exec(MSG,_Mode,Status)-IFP :-
        functor(MSG, _P, A), arg(A, MSG, ComStatus) |
    ComStatus = abnormal({"Illegal Message or You can not update"},end),
    Status = normal.