Opinion by
Me. Justice Wolverton.This case was argued and submitted with the case of Shattuck v. Kincaid, just decided, 31 Or. 379 (49 Pac. 758), and upon the same briefs. The claim involved is one preferred against the state by plaintiff for supplies furnished at the instance and request of the superintendent of the state penitentiary, for the use of said institution, which are alleged to be of the reasonable value of $20. The bill constituting the claim, was itemized and sworn to by the claimant, certified to as correct by the superintendent, and presented to the secretary of state with a request that he audit and allow the same and draw his warrant upon the treasury for the amount, which being denied, this proceeding was instituted to compel him to do so. A demurrer was interposed to the alternative writ of mandamus, and, being sustained, judgment was entered dismissing the proceedings, from which plaintiff appeals.
Section 3877, Hill’s Ann. Laws, is pertinent to the inquiry here, and is as follows: “All accounts for supplies for the penitentiary or prisoners shall specify the items, and be certified to by the superintendent, and presented to the secretary of state, who shall audit the same and issue warrants on the treasurer for the payment of said claims, and no money shall be *447paid for any purpose on account of said penitentiary except upon said warrants.” The questions presented are (1) whether this section makes an appropriation of funds out of the treasury for the payment of the class of claims against the state contemplated thereby; and (2) whether, in case it does not effectuate an appropriation, the secretary can be required to audit the account and draw his warrant on the treasurer for the payment of the same.
We are satisfied that under the law, as ascertained and applied in the case of Shattuck v. Kincaid, 31 Or. 379 (49 Pac. 758), the section quoted does not constitute an appropriation of money in the treasury to the payment of the class of claims contemplated thereby, and this disposes of the first question.
Under the constitution, the secretary of state is the auditor of public accounts, and by law he is charged with the duty of superintending the fiscal concerns of the state, and it was no doubt because of the functions thus delegated to and pertaining to his office that the legislature referred to him claims of the class involved to be audited. We have seen (Shattuck v. Kincaid, 31 Or. 379, 49 Pac. 758), “that when the nature and amount of services rendered the state are definitely fixed and ascertained, and the compensation therefor is regulated by law, such as the salaries of public officers, the duty of auditing or allowing the account or claim for such services becomes a mere ministerial act, the performance of which may be required by mandamus.” See cases therein cited. Such is not the case, however, when the duty is one which necessarily involves the exercise of discretion and judg*448ment, and mandamus will not lie to direct or control the decision or determination of the fuctionary to whom the discharge of such duty is confided; and this is so because it is the discretion and judgment of that functionary, not that of the court, which is to be exercised. But, while courts will not direct and control discretion and judgment, they will require its exercise, not with a view to any particular result, but that the officer shall proceed in the discharge of his duty, and determine matters proper for his cognizance, and declare, according to his own judgment, the result of his consideration: Miller v. County Court, 34 W. Va. 285 (12 S. E. 702); State v. Oliver, 116 Mo. 188 (22 S. W. 637); Wailes v. Smith, 76 Md. 469 (25 Atl. 922); Burton v. Furman, 115 N. C. 166 (20 S. E. 443); State v. Doyle, 38 Wis. 92; People v. Board of Supervisors, 26 Barb. 118; Dechert v. Commonwealth, 113 Pa. St. 229 (6 Atl. 229); People v. Auditor, 2 Colo. 97; Spelling on Extraordinary Relief, § 1459. But the remedy thus invoked must not be extended beyond its legitimate purposes, so as to take the place of a suit against the state by its consent to establish demands which are uncertain or unliquidated, and which properly fall within the legislative cognizance: Swan v. Buck, 40 Miss. 268, 291; Rice v. State, 95 Ind. 33.
Construing section 3877 with section 2208, Hill’s Ann. Laws, whereby the secretary is charged with the express duty of examining and determining the claims of all persons against the state, it would seem that he is required to audit and allow or disallow claims of the nature involved here as well as those of a general *449character, with this difference in the manner of proof only, that the certificate of the superintendent of the penitentiary is made a necessary adjunct to the presentation of the claim or demand. The plaintiff’s claim is an unliquidated demand for supplies furnished the superintendent, and the secretary is required to determine the amount and validity thereof under the law and evidence, and this calls for the exercise of judgment such as the courts will not control, but they will, under the authorities, compel its exercise: Wailes v. Smith, 76 Md. 469 (25 Atl. 922). The issuance of the warrant in pursuance of section 3877 is made the direct and legitimate result of the auditing or allowance, and is to be considered as part of one and the same act, as under the general provisions, so that in the event of an allowance the warrant must issue. In the light of these considerations, the allegations of the complaint being admitted by the demurrer, it is manifestly proper that the secretary should exercise his discretion and pass upon plaintiff’s claim, and, if allowed, draw his warrant therefor. The judgment of the court below will therefore be reversed, and the cause remanded with directions to overrule the demurrer.
Reversed.