EXHIBIT 99.18

      Written Compensation Agreement between Registrant and Mr. Ercanbrack

                             COMPENSATION AGREEMENT

                  Agreement dated as of the 18th day of June 1997 by and between
Ron L. Ercanbrack  ("Optionee") and FileNet Corporation,  a Delaware corporation
("Corporation").

                               W I T N E S S E T H

                  WHEREAS,   the  Corporation  deems  it  advisable  to  provide
Optionee with a special  equity  incentive to attract and retain his services as
Senior Vice President, International, of the Corporation.

                  NOW, THEREFORE, the parties hereto agree as follows:

                  1. On June  18,  1997,  Optionee  was  granted  an  option  to
purchase 80,000 shares of the Corporation's Common Stock (the "Option") upon the
terms and  conditions  set  forth in the Stock  Option  Agreement  (the  "Option
Agreement") attached hereto as Exhibit A.

                  2.  Corporation  and Optionee  acknowledge  and agree that the
Option is granted as  compensation  for the  services  Optionee  is to render as
Senior  Vice  President,  International,  of the  Corporation  and  not  for any
capital-raising purposes or in connection with any capital-raising activities.

                  3.  This   agreement  is  intended  to  constitute  a  written
compensation  contract  for purposes of  registering  the shares of Common Stock
issuable under the Option on a Form S-8 registration  statement to be filed with
the Securities and Exchange Commission.

                  4. Nothing in this  agreement or in the attached  Stock Option
Agreement shall confer upon Optionee any right to continue in the  Corporation's
service  for any period of  specific  duration or  interfere  with or  otherwise
restrict in any way the rights of the  Corporation or of Optionee,  which rights
are hereby expressly reserved by each party, to terminate  Optionee's service at
any time for any reason, with or without cause.

     IN WITNESS  WHEREOF,  the parties hereto have executed this agreement as of
the date first above written.

OPTIONEE:                                FILENET CORPORATION

__________________________               By:___________________________________
Ron L. Ercanbrack
                                         Title:  _______________________________