Argued and submitted April 8,

affirmed July 13,

petition for review denied October 18, 1994 (320 Or 272)

#### THE COMMERCIAL BANK, an Oregon banking corporation, *Respondent, v.*PRIDE FURNITURE, INC., an Oregon corporation; Seattle First National Bank, a national banking corporation; Colonial Pacific Leasing Corp., an Oregon corporation; A.R. Finance, Inc., a Washington corporation; and Financial Pacific, Inc., an Idaho corporation, *Defendants,*LUMBER PRODUCTS, an Oregon corporation, *Appellant, and*UNITED STATES OF AMERICA, INTERNAL REVENUE SERVICE, *Respondent.*

(CV92-344; CA A80634)

877 P2d 1222

*138Bruce H. Orr argued the cause for appellant. With him on the opening brief was Tarlow, Jordan & Schrader; with him on the reply brief was Meyer & Wyse.

Kris Jon Gorsuch argued the cause for respondent The Commercial Bank. On the brief were Gina Anne Johnnie and Saalfeld, Griggs, Gorsuch, Alexander & Emerick, P.C.

Gary R. Allen waived appearance for respondent United States of America, Internal Revenue Service.

Before Rossman, Presiding Judge, and De Muniz and Leeson, Judges.

LEESON, J.

*140LEESON, J.

Defendant, Lumber Products, Inc., appeals from a judgment of foreclosure in favor of plaintiff, The Commercial Bank.1 It assigns error to the trial court’s ruling that proceeds from the judicial foreclosure sale of collateral of Pride Furniture (debtor) be distributed to plaintiff before any distribution is made to defendant.2 We affirm.

The facts are not disputed. On November 20, 1989, debtor signed a security agreement granting plaintiff a security interest in:

> “All equipment, together with all accessories, substitutions, additions, replacements, parts and accessories affixed or used in connection therewith, and all general intangibles, whether now owned or hereafter acquired or arising, and *the proceeds and products thereof,*and wherever located.” (Emphasis supplied.)

Plaintiff perfected that security interest on December 6, 1989.

In 1990, plaintiff partially released its perfected security interest by filing the following statement:

> “Eliminate the words: 'and the proceeds and products thereof.’ ”

On March 18, 1991, debtor signed a security agreement granting defendant a security interest in “[a]ll equipment (see Exhibit A) now or hereinafter acquired and the proceeds thereof.” Defendant perfected that security interest on March 20,1991.

Debtor defaulted on notes issued by both plaintiff and defendant. Plaintiff brought this action for judicial foreclosure of its security interest in debtor’s collateral. Defendant subsequently filed a counterclaim and cross-claim to foreclose its security interest in the collateral. Both parties moved for summary judgment on the ground that their *141security interests entitled them to the proceeds from judicial sale of the collateral. The trial court denied defendant’s motion and granted plaintiffs motion, concluding that plaintiff had priority in the collateral because it had perfected first.

On appeal, defendant argues that it should have had first priority in the proceeds from the judicial foreclosure sale, because plaintiff had released its interest in proceeds in 1990. It asserts that “proceeds” has the same meaning in ORS 88.050 and ORS 79.3060(1), and that “ORS 88.050 requires circuit courts to determine the distribution of proceeds by looking at the priority of the parties’ respective interests *in the proceeds.”*(Emphasis in original.)

3,4. In interpreting a statute, the court’s task is to discern the intent of the legislature. The first level of analysis is to examine both the text and context of the statute. *PGE v. Bureau of Labor and Industries,*317 Or 606, 610-11, 859 P2d 1143 (1993).

ORS 88.050 is part of the procedural statutory scheme for the foreclosure of liens generally. ORS 88.010 *et seq.*It applies to judicial foreclosure of security interests arising under the Uniform Commercial Code (UCC), as well as to the foreclosure of liens on real or personal property, whether created by mortgage or otherwise. ORS 88.010. ORS 88.050 provides, in part:

> “When a decree is given foreclosing two or more liens *upon the same property or any portion thereof*in favor of different persons not united in interest, the decree shall specify the order, according to their priority, in which the debts secured by such liens shall be satisfied out of the proceeds of the sale of the property.” (Emphasis supplied.)

ORS 79.3060(1) defines “proceeds” within the context of the UCC rules establishing the priority of security interests. It provides, in relevant part:

> “ ‘Proceeds’ includes whatever is received upon the sale, exchange, collection or other disposition of collateral or proceeds. * * * Money, checks, deposit accounts, and the like are ‘cash proceeds.’ All other proceeds are ‘noncash proceeds.’ ”

Defendant’s interpretation of ORS 88.050 assumes that priority among security interests should be determined *142only after property has been sold and has become “proceeds.” That interpretation strains the meaning of ORS 88.050 and its companion statutes by ignoring the priority of respective creditors in the collateral property being judicially foreclosed. ORS 88.050 provides a procedure when there are two or more liens on *property.*It follows that the priority must be measured by the form of the *property*at the time of foreclosure, not by the form property takes following a judicial sale.

Our construction of ORS 88.050 is consistent with the other foreclosure provisions contained in the UCC. Defendant concedes that plaintiff was the first creditor to perfect its security interest in the debtor’s collateral, and, thus, was the first in priority for the collateral. *See*ORS 79.3120. Had plaintiff chosen to do so, it could have taken possession of the collateral property when debtor defaulted, *see*ORS 79.5030, and it could have sought to retain that collateral in full satisfaction of the debt. *See*ORS 79.5050. It also could have disposed of the collateral property, through a non-judicial sale, and retained the proceeds. *See*ORS 79.5040.3 If we were to accept defendant’s interpretation of ORS 88.050, then a creditor whose security interest was limited to the debtor’s collateral could exercise any of the above self-help remedies and apply the resulting proceeds in full or partial satisfaction of the debt. However, if the creditor sought the remedy of judicial foreclosure, it would be unable to receive the proceeds of its security interest in that property. We do not think that the legislature intended such an anomalous result.

Based on the language of ORS 88.050, its companion statutes, and the applicable provisions of the UCC, we hold that ORS 88.050 requires a court to specify the order of debt satisfaction by determining creditors’ priority in *property*at the time of a judicial foreclosure. That order will then control the distribution of proceeds from the judicial foreclosure sale of that property.

*143The trial court did not err in ruling that proceeds from the foreclosure sale are to be applied first to plaintiffs debt and then to defendant’s.4

Affirmed.

1

 Although a named party, the United States Internal Revenue Service informed the court that it would not participate in this appeal.

2

 On appeal, defendant makes three separate assignments of error to raise the same issue of priority in the proceeds from a judicial sale. We therefore address them as one issue.

3

 We note that ORS 79.5040 uses the term “proceeds” in a similar manner to ORS 88.050 to describe the order in which “proceeds of the disposition shall be applied.” It looks to the creditors’ priority in the collateral rather than their priority in the proceeds.

4

 We emphasize that this decision is based on the form of the property at the time of its foreclosure. If, at the time of the judicial foreclosure, the property itself had been in the form of “proceeds,” as defined by ORS 79.3060, then plaintiffs partial release of its security interest in proceeds would have operated to give defendant priority.