
203 P.3d 276 (2009)
226 Or. App. 167
Patrick Dean CULLOP, Plaintiff-Appellant,
v.
OFFENDER INFORMATION AND SENTENCE COMPUTATION CENTER, a division of the Oregon Department of Corrections, Defendant-Respondent.
07C16109, A136324.
Court of Appeals of Oregon.
Submitted January 2, 2009.
Decided February 25, 2009.
*277 Patrick Dean Cullop filed the brief pro se.
Hardy Myers, Attorney General, Mary H. Williams, Solicitor General, and Nick M. Kallstrom, Assistant Attorney General, filed the brief for respondent.
Before HASELTON, Presiding Judge, and ARMSTRONG, Judge, and ROSENBLUM, Judge.
HASELTON, P.J.
Relator, an inmate in the custody of the Department of Corrections (DOC), appeals from the trial court's sua sponte dismissal of his petition for an alternative writ of mandamus. ORS 34.240. In his petition, relator sought to have the trial court order defendantthe division of the DOC that computes sentencesto compute correctly the maximum sentence expiration dates for his sentences. The trial court entered the dismissal based on, inter alia, its conclusion that relator was not eligible for mandamus relief because he had a plain, speedy, and adequate remedy in the ordinary course of the law. ORS 34.110. On appeal, defendant does not attempt to justify that basis for the trial court's dismissal of the petition for the writ but, instead, argues that dismissal was warranted in all events because relator's sentence was, in fact, calculated correctly. As explained below, we conclude that it is necessary under the circumstances to reverse and remand.
The material facts are entirely procedural. On June 22, 2007, relator filed a petition for an alternative writ of mandamus, alleging in pertinent part that defendant had erroneously computed his sentences pursuant to various administrative rules, and sought to have the court order defendant to recalculate his maximum sentence expiration dates, or to show cause why the relief should not be granted. At the same time, relator submitted a memorandum of law in support of his petition.
The trial court did not issue an alternative writ. Consequently, defendant never appeared in the trial court. On July 9, 2007, the trial court entered a judgment of dismissal denying issuance of the alternative writ, stating that the petition was not well taken, and denying relief on the following grounds:
"Defendant performed the act the law specifically enjoined, however, Relator did not agree with the outcome. The Relator had a plain, adequate and speedy remedy to challenge the decision of the defendant. An appeal of the Board's decision or the filing of a Writ of Habeas Corpus are the remedies available to the Relator."
Relator appeals, challenging the trial court's bases for dismissal. Defendant's sole response on appeal is to refer to various documents that relator attached to his petition and memorandum in the trial court, and to argue that those documents demonstrate that defendant had, in fact, calculated relator's sentence correctly. As explained below, *278 we conclude that the trial court's dismissal was incorrect, because relator did not have a plain, speedy, and adequate alternative remedy as described by the trial court, and because any determination of the merits of the petition was premature.
As a general matter, mandamus is an appropriate remedy when a person seeks to compel state actors to carry out their duties properly, unless the person has a "plain, speedy and adequate remedy in the ordinary course of the law." ORS 34.110.
We turn first to the procedural posture of this case. Under ORS 34.130, if a relator petitions for an alternative writ in a court that has jurisdiction over the defendant and service has occurredwhich are not disputed in this casethen "the writ shall be allowed by the court or judge thereof on the petition." ORS 34.130(3) (emphasis added). The alternative writ is to command the defendant to return the writ and either to perform the act relator wants, or to "[s]how cause before the court or judge thereof, by whom the writ was allowed * * * why the defendant has not done so[.]" ORS 34.150(2)(b). The defendant then, by way of return of the writ, "may show cause by motion to dismiss or answer to the writ, in the same manner as to a complaint in an action." ORS 34.170. Here, as noted, the trial court did not issue the alternative writ, and defendant did not move to dismiss or file an answer. Rather, the trial court sua sponte decided not to issue the alternative writ.
Thus, the initial question here would seem to be whether a trial court has authority to dismiss a petition for an alternative writ sua sponte, in light of the provision of ORS 34.130(3) that, absent a problem with jurisdiction over the defendant or with service of process, "the writ shall be allowed." It may be arguable (although defendant is not making that argument here), that that provision of ORS 34.130(3) is qualified by the provision of ORS 34.110, that a "writ shall not be issued in any case where there is a plain, speedy and adequate remedy in the ordinary course of the law." However, we need not decide here whether a trial court can ever sua sponte dismiss a mandamus petition, because, even assuming for the sake of argument that a trial court does have the ability to make a sua sponte determination as to whether a relator petitioning for an alternative writ of mandamus has a different plain, speedy, and adequate remedy in the course of the law, we agree with relator that, on the record in this case, the trial court erred in making that determination here.
The trial court first suggested that relator had a remedy in the form of "appeal of the Board's decision." In context, in light of what relator had argued in his memorandum in support of his petition for issuance of an alternative writ, it appears that the trial court's reference to "the Board" likely was a reference to the Board of Parole and Post-Prison Supervision. The difficulty, however, is that the gravamen of relator's complaint was not that the board had erred but, rather, that defendantwhich is a division of the DOC and not of the boardhad erroneously failed to calculate his sentence correctly in accordance with certain orders issued by the board.[1]
In sum, it appears from the face of his petition and his supporting memorandum that relator was not complaining about any of the board's orders, but, instead, about defendant's implementation of those orders. Judicial review of a board order could, at best, remedy only a problem with the order; it could not remedy a problem with a different entity's interpretation or implementation of that order. We thus conclude that the trial court incorrectly determined that relator had a plain, speedy, and adequate remedy in the ordinary course of the law because he could have sought judicial review of a board order.
The trial court further stated that relator had a plain, speedy, and adequate remedy in the ordinary course of law by way of a writ of habeas corpus. The only type of *279 habeas claim that has any potential application here is the type described in ORS 34.610(2), by which an inmate is entitled to discharge if his or her "original imprisonment was lawful," but "by some act, omission or event which has taken place afterwards, the party has become entitled to be discharged." Relator is correct that a habeas remedy is not available to him under that statute because he is not alleging that, due to defendant's asserted error in calculating his sentence, he "has become entitled to be discharged." ORS 34.610(2). Rather, he alleges that, due to defendant's asserted error, it has incorrectly calculated the date on which he will become entitled to be discharged. That is, relator cannot state a claim for habeas corpus relief in this type of case unless he can allege that he is entitled to immediate releaseand here, he does not, and cannot, make such a claim. Thus, the trial court erred in concluding that habeas corpus provided a plain, speedy, and adequate remedy in the ordinary course of law for the alleged miscalculation of relator's sentence.
We turn to the trial court's remaining stated reason for dismissing the petition for the alternative writviz., that "Defendant performed the act the law specifically enjoined, however, Relator did not agree with the outcome." The court's statement is in reference to the following provision of ORS 34.110:
"A writ of mandamus may be issued to any inferior court, corporation, board, officer or person, to compel the performance of an act which the law specially enjoins, as a duty resulting from an office, trust or station; but though the writ may require such court, corporation, board, officer or person to exercise judgment, or proceed to the discharge of any functions, it shall not control judicial discretion."
To the extent that the trial court concluded that mandamus does not lie because defendant already had calculated relator's sentenceregardless of the correctness of that calculationthat conclusion simply is incorrect. If defendant erroneously calculated relator's sentence, relator can, through mandamus, compel defendant to recalculate his sentence correctly. See, e.g., State ex rel Huddleston v. Sawyer, 324 Or. 597, 932 P.2d 1145, cert. den., 522 U.S. 994, 118 S.Ct. 557, 139 L.Ed.2d 399 (1997) (mandamus remedy was available to require judge who had imposed unlawful sentence to impose lawful sentence).
Further, to the extent that the trial court's dismissal may have been predicated on some determination that defendant had already correctly calculated relator's sentence, such a conclusion was premature. As noted above, to the extent that a trial court may have any ability to dismiss a petition for an alternative writ sua sponte, that ability would appear to be limited to the circumstances listed in ORS 34.110 and ORS 34.130that is, to jurisdiction and service problems. The statutes do not contemplate sua sponte dismissals of petitions based on assessment or determination of the merits before the return of the writ by defendant. See ORS 34.170 (defendant may answer and move to dismiss "[o]n the return day of the alternative writ, or such further day as the court or judge thereof may allow").[2] Rather, ORS 34.170, as noted, contemplates that dismissals will occur in the ordinary course, "in the same manner as to a complaint in an action." ORCP 21, which governs dismissals in actions, does not contemplate that dismissals for failure to state a claim may be entered sua sponte in the absence of any such motion by a defendant. See ORCP 21 A(8).
In sum, none of the reasons set forth by the trial court for its sua sponte dismissal of relator's petition for an alternative writ of mandamus withstands scrutiny.[3]
Reversed and remanded.
NOTES
[1]  We emphasize that we express no opinion as to whether relator's assertions concerning the board's orders or defendant's implementation of those orders are correct. Rather, in assessing the propriety of dismissal, the trial court is limited to the face of the complaint. ORCP 21; ORS 34.170 (in ruling on motion to dismiss in mandamus, court is to proceed "in the same manner as to a complaint in an action").
[2]  ORS 34.370(6) and (7) provide for a trial court to dismiss a petition for a writ of habeas corpus sua sponte under some circumstances. Those provisions are not applicable to petitions for writs of mandamus.
[3]  We emphasize that nothing in this opinion should be construed as limiting in any way the legal or factual issues that defendant may raise by way of answer or motion to dismiss pursuant to ORS 34.170 after our remand.
