
802 N.E.2d 381 (2003)
345 Ill. App.3d 175
280 Ill.Dec. 456
The PEOPLE of the State of Illinois, Plaintiff-Appellee,
v.
Daniel R. SHELLSTROM, Defendant-Appellant.
No. 2-02-0618.
Appellate Court of Illinois, Second District.
December 30, 2003.
*383 G. Joseph Weller, Deputy Defender, and Paul Alexander Rogers (Court-appointed), Office of the State Appellate Defender, Elgin, for Daniel R. Shellstrom.
Joseph E. Birkett, DuPage County State's Attorney, Wheaton, Martin P. Moltz, Deputy Director, Diane L. Campbell, State's Attorneys Appellate Prosecutor, Elgin, for the People, Donald N. Snyder.
Presiding Justice HUTCHINSON delivered the opinion of the court:
Defendant, Daniel R. Shellstrom, appeals the trial court's summary dismissal of his mandamus complaint. He contends that, in dismissing his complaint, the trial court improperly characterized the action as a postconviction petition. We reverse and remand.
Defendant was charged with three counts of home invasion (720 ILCS 5/12-11(a)(2) (West 1994)), three counts of aggravated criminal sexual assault (720 ILCS 5/12-14(b) (West 1994)), and two counts of residential burglary (720 ILCS 5/19-3(a) (West 1994)). He pleaded guilty to two counts of aggravated criminal sexual assault and one count of home invasion in exchange for the State's dismissal of the remaining counts. The trial court sentenced defendant to consecutive sentences of 6 years' imprisonment for each of the aggravated criminal sexual assault charges and 13 years' imprisonment for the home invasion charge, and 3 years' mandatory supervised release (MSR). Defendant moved to reduce his sentence. The trial court denied the motion. On direct appeal, we affirmed defendant's convictions and sentence. People v. Shellstrom, No. 2-95-0794, 294 Ill.App.3d 1114, 242 Ill.Dec. 579, 721 N.E.2d 858 (1998) (unpublished order under Supreme Court Rule 23).
In May 2002, defendant filed, pro se, a document entitled, "Motion to Reduce Sentence, Alternatively, Petition for Writ of Mandamus to Order Strict Compliance with Terms of Guilty Plea." The pleading was captioned, "Daniel R. Shellstrom, Petitioner, v. Donald N. Snyder, Director of Illinois Department of Corrections and Prison Review Board, Respondents," and made explicit reference to the mandamus statute (735 ILCS 5/14-101 et seq. (West 2002)). In the pleading, defendant alleged that he had not been advised of the threeyear term of MSR and that the MSR term did not appear on the judgment order. The trial court treated the pleading as a post conviction petition pursuant to the Post-Conviction Hearing Act (the Act) (725 ILCS 5/122-1 et seq. (West 2002)) and summarily dismissed it as patently without merit. See 725 ILCS 5/122-2.1(a)(2) (West 2002). Defendant was not present at the hearing and had no notice and no opportunity to respond to the trial court's dismissal of his complaint. Defendant timely appealed.
Defendant contends that the trial court erred in treating his pleading as a postconviction petition and summarily dismissing it. Whether the trial court complied with the applicable statutory procedure is a question of law and our review is de novo. See Woods v. Cole, 181 Ill.2d 512, 516, 230 Ill.Dec. 204, 693 N.E.2d 333 (1998).
In People v. Gaines, 335 Ill.App.3d 292, 269 Ill.Dec. 350, 780 N.E.2d 822 (2002), we addressed this same procedural issue in a related context. In Gaines, the defendant filed a petition seeking relief from judgment pursuant to section 2-1401 of the Code of Civil Procedure (the Code) (735 ILCS 5/2-1401 (West 2002)). The State urged the trial court to treat the petition like a postconviction petition and make an initial determination before requiring the *384 State to respond. The trial court followed the State's suggestion and dismissed the petition in a manner resembling a summary dismissal under the Act. The defendant appealed and we reversed. We held that the "particular statutory procedures applicable to petitions under the Act do not apply to section 2-1401 proceedings." Gaines, 335 Ill.App.3d at 295, 269 Ill.Dec. 350, 780 N.E.2d 822. We reasoned that while the Act allows the trial court to independently consider and summarily dismiss a postconviction petition, "section 2-1401 has no corresponding provision for independent examination by the trial court, nor is the trial court authorized to summarily dismiss a section 2-1401 petition." Gaines, 335 Ill.App.3d at 296, 269 Ill.Dec. 350, 780 N.E.2d 822. We also noted that a section 2-1401 petition is similar to a complaint in a civil action, and hence the opponent must either move to dismiss it or file an answer. Gaines, 335 Ill.App.3d at 296, 269 Ill.Dec. 350, 780 N.E.2d 822.
The reasoning in Gaines applies with equal force here. The mandamus statute, which is contained within the provisions of the Code, does not authorize the trial Court to summarily dismiss a complaint for mandamus. Rather, it provides a clear procedural framework that the trial court must follow when a mandamus complaint is filed. The statute provides that following the filing of a complaint for mandamus, the clerk of the court shall issue a summons to the defendant. 735 ILCS 5/14-102 (West 2002). The defendant is then required to answer orotherwise plead before the return day of the summons. 735 ILCS 5/14-103 (West 2002). The plaintiff may then reply or otherwise plead in response to the answer. 735 ILCS 5/14-404 (West 2002). The statute also provides that "[t]he proceedings for mandamus shall not be dismissed nor the relief denied because the plaintiff may have another judicial remedy, even where such other remedy will afford proper and sufficient relief; and amendments may be allowed as in other civil cases." 735 ILCS 5/14-108 (West 2002). The trial court committed reversible error when it failed to follow these statutory provisions and instead summarily dismissed defendant's complaint.
Additionally, the trial court contravened the provisions of the Code in dismissing defendant's complaint sua sponte. Section 2-612(a) of the Code provides that if "any pleading is insufficient in substance or form the court may order a fuller or more particular statement. If the pleadings do not sufficiently define the issues the court may order other pleadings prepared." 735 ILCS 5/2-612(a) (West 2002). Accordingly, the trial court could have struck defendant's complaint and ordered other pleadings prepared if it found defendant's complaint insufficient. It could not, however, dismiss the complaint on its own motion. See Mitchell v. Norman James Construction Co., Inc., 291 Ill.App.3d 927, 938, 225 Ill.Dec. 881, 684 N.E.2d 872 (1997).
Finally, defendant was given neither notice nor an opportunity to be heard on the issues upon which the trial court based its dismissal. In People v. Kitchen, 189 Ill.2d 424, 434-35, 244 Ill.Dec. 890, 727 N.E.2d 189 (1999), our supreme court vacated the trial court's denial of the defendant's postconviction petition. The order was vacated because "[t]he decision to deny the petition was made without notice to the parties and without the benefit of argument from either defendant or the State." Kitchen, 189 Ill.2d at 435, 244 Ill.Dec. 890, 727N.E.2d 189. In Peterson v. Randhava, 313 Ill.App.3d 1, 11-12, 246 Ill.Dec. 75, 729 N.E.2d 75 (2000), the trial court granted summary judgment sua *385 sponte without giving the plaintiff an opportunity to respond. The reviewing court vacated the trial court's order, observing that proceeding in this manner "not only may waste judicial resources, through producing unnecessary appeals and remands that may have been avoided, but it deprives the plaintiff of an opportunity to conduct discovery on the relevant issues, present evidence and argue against dismissal." Peterson, 313 Ill.App.3d at 12, 246 Ill.Dec. 75, 729 N.E.2d 75. We face a similar situation here.
The State argues that we should follow Mason v. Snyder, 332 Ill.App.3d 834, 266 Ill.Dec. 351, 774 N.E.2d 457 (2002). In Mason, the defendant filed a pro se mandamus complaint. The trial court dismissed it sua sponte. The Appellate Court, Fourth District, held that a trial court may evaluate and dismiss sua sponte a mandamus complaint. The court reasoned:
"[T]rial courts may evaluate such petitions to determine their sufficiency, particularly when filed by DOC inmates. In so concluding, we take judicial notice of our own records, which show an ever-increasing number of appeals brought by inmates in such cases, as well as the fact that DOC currently houses over 46,000 inmates. The potential to overwhelm the courts and the civil justice system by the filing of groundless DOC inmate mandamus petitions is clear and real, and one first step to deal with this situation is to recognize the trial court's authority to evaluate such petitions for their sufficiency." Mason, 332 Ill. App.3d at 840, 266 Ill.Dec. 351, 774 N.E.2d 457.
We disagree with the court's holding in Mason. The primary basis for that holding is the difficulty of dealing with the volume of mandamus complaints filed by Department of Corrections (DOC) inmates. See Mason, 332 Ill.App.3d at 840, 842, 266 Ill.Dec. 351, 774 N.E.2d 457. While this is a real concern for trial courts, we should not attempt to remedy this concern by reading into the mandamus statute a summary dismissal procedure that is not there. The procedural framework of mandamus actions is not a policy issue for the courts to decide but, rather, a legislative decision to be made by the General Assembly. Accordingly, it is the province of the legislature, not the judiciary, to amend the statute to allow for summary dismissals.
The State additionally argues that even if the trial court erred in construing the complaint as a postconviction petition, the trial court correctly dismissed the complaint because it was meritless. The State appears to be arguing that the trial court's incorrect treatment of the complaint did not prejudice defendant. However, a trial court's failure to give a nonmovant notice and an opportunity to respond to a dispositive motion is inherently prejudicial. See Mizell v. Passo, 147 Ill.2d 420, 428, 168 Ill.Dec. 812, 590 N.E.2d 449 (1992); Valdovinos v. Luna-Manalac Medical Center, Ltd., 328 Ill.App.3d 255, 267-68, 262 Ill.Dec. 147, 764 N.E.2d 1264 (2002); Peterson, 313 Ill.App.3d at 12, 246 Ill.Dec. 75, 729 N.E.2d 75. Accordingly, even if defendant's mandamus complaint is meritless, the trial court's error nevertheless prejudiced defendant, who had no notice and no opportunity to respond to the trial court's sua sponte dismissal of his complaint.
The Code, including the mandamus statute, provides a clear procedural framework that applies regardless of the merits of the allegations in the complaint. Accordingly, the fact that a mandamus complaint appears meritless does not excuse compliance with the procedural provisions of the Code. Additionally, the fact that a mandamus plaintiff is a DOC inmate *386 in no way invests the trial court with the discretion to bypass clear statutory rules.
The judgment of the circuit court of Du Page County is reversed, and the cause is remanded.
Reversed and remanded.
BYRNE and GILLERAN JOHNSON, JJ., concur.
