
83 Ill.2d 537 (1981)
416 N.E.2d 259
THE PEOPLE ex rel. BERNARD CAREY, State's Attorney, Petitioner,
v.
VINCENT BENTIVENGA, Judge, et al., Respondents.
No. 53850.
Supreme Court of Illinois.
Opinion filed January 20, 1981.
*538 *539 Bernard Carey, State's Attorney, of Chicago (Marcia B. Orr, Adrienne Noble Nacev and Adam N. Stillo, Jr., Assistant State's Attorneys, of counsel), for the People.
James J. Doherty, Public Defender, of Chicago (Timothy K. McMorrow, Assistant Public Defender, of counsel), for respondent Siedlecki.
Writ awarded.
MR. JUSTICE MORAN delivered the opinion of the court:
This original proceeding for the issuance of a writ of mandamus is brought by the State's Attorney for Cook County (petitioner) to compel Judge Vincent Bentivenga of the circuit court of Cook County (respondent) to expunge an order entered by him in a criminal proceeding. The order granted William Siedlecki (defendant) probation upon being found guilty of burglary by respondent in a bench trial.
The portions of the statutes with which we are concerned read as follows:
"A period of probation, a term of periodic imprisonment or conditional discharge shall not be imposed for the following offenses. The court shall sentence the offender to not less than the minimum term of imprisonment set forth in this Code for the following offenses, and may order a fine or restitution or both in conjunction with such term of imprisonment:
*   *   *
A Class 2 or greater felony if the offender had been convicted of a Class 2 or greater felony within ten years of *540 the date on which he committed the offense for which he is being sentenced." (Ill. Rev. Stat. 1979, ch.  38, par. 1005-5-3(c)(2)(F).)
"Sentence of imprisonment for felony.
(a) A sentence of imprisonment for a felony shall be a determinate sentence set by the court under this Section, according to the following limitations:
*   *   *
(5) for a Class 2 felony, the sentence shall be not less than 3 years and not more than 7 years." Ill. Rev. Stat. 1979, ch. 38, par. 1005-8-1(a)(5).
The issue to be resolved is whether the respondent had a statutory duty to sentence the defendant in accordance with the cited statute. Petitioner argues that because defendant, at the time of sentencing, had a previous conviction for burglary (a Class 2 felony) within 10 years he was not eligible for probation and that the order was therefore void. Defendant argues (1) that the court should stay the mandamus proceeding to permit defendant to file a section 72 petition (Ill.  Rev. Stat. 1979, ch. 110, par. 72) in the trial court; (2) that the sentencing statute is unconstitutional as applied to the facts of his case; and (3) that this court should, under Supreme Court Rule 615 (73 Ill.2d R.  615), reduce defendant's sentence from burglary to criminal trespass to land.
After a bench trial before respondent, the defendant was found guilty of burglary, a Class 2 felony. The evidence showed that he unlawfully entered an auto parts store and took one can of oil having a retail value of $1.55. A sentencing hearing was held in which the State informed respondent that the defendant had previously been convicted of burglary on October 9, 1975. Respondent sentenced defendant to two years' felony probation, the first five months of which were to be served in the Cook County jail. The State objected that the sentence was improper due to the fact that the defendant had been previously convicted of another Class 2 felony within 10 *541 years of the commission of the instant offense. The State pointed out that the defendant was, therefore, not qualified to receive probation.
The defendant first urges this court to stay the proceeding for original mandamus to allow the defendant to file a section 72 petition in the trial court. The purpose of a section 72 proceeding is to allow the correction of errors which occurred during trial which were unknown to both the court and the parties and which would have changed the disposition of the case if known. (People v. Berland (1978), 74 Ill.2d 286, 314, cert. denied (1979), 444 U.S. 833, 62 L.Ed.2d 42, 100 S.Ct. 64.) Although the defendant does not expressly state the basis of the claimed error, we assume it relates to defendant's claim that at the time of sentencing respondent was unaware of the sentencing statute here relied on by the petitioner. After sentencing, the following colloquy occurred:
"MR. DAVY [Assistant State's Attorney]: Judge, I would ask that the case be recalled. I believe that was an improper sentence under the statute.
THE COURT: Bring out the defendant again, please.
*   *   *
THE COURT: Mr. Davy, you wish to make some objections to the Court's authority to place the defendant on probation because he had a previous conviction for burglary?
MR. DAVY: That is correct.
*   *   *
MR. DAVY: Under the statute I believe that this defendant is not qualified for a sentence of probation.
THE COURT: Mr. Knutz [defense attorney], are you aware of the section of the statute he is citing?"
Contrary to the argument of defendant, we find from the above cited language that the judge, in sentencing the defendant, was well aware of the statutory provision found in section 5-5-3(c)(2)(F) of the Unified Code of Corrections (Ill. Rev. Stat. 1979, ch. 38, par. 1005-5-3(c)(2)(F)). We consequently find no merit to *542 defendant's argument that a section 72 petition would be an appropriate remedy.
The defendant does not challenge the fact that the sentencing statute mandates the imposition of a three-year term of imprisonment. In a similar case, People ex rel. Hanrahan v. Wilson (1971), 48 Ill.2d 30, a defendant was found guilty of possession of heroin. He had a history of prior convictions, including one for possession of heroin. The applicable statute prohibited the granting of probation to "any violator who has been convicted of any subsequent offense." (Ill. Rev. Stat. 1967, ch. 38, par. 22-40.) The statute required that, for any subsequent offense, the minimum penalty to be imposed was five years' imprisonment. Nonetheless, the trial court granted the defendant probation for five years, the first year to be served in the House of Correction. This court held that such provision by the legislature was mandatory, prohibited the granting of probation, and required the imposition of the minimum sentence of five years' imprisonment. In the present case, the legislature has clearly made the judgment that probation may not be given to a repeat offender.
The defendant, however, argues that the sentencing statute is unconstitutional as applied. The defendant contends that the imposition of a three-year minimum term under the facts of this case would "shock the moral sense of the community" so as to render the sentencing statute unconstitutional. He points out that the burglary consisted of the taking of an article with a value of only $1.55.
It is a settled rule of law that the legislature has the authority to set the nature and extent of penalties. Courts will not interfere with such legislation unless the challenged penalty is clearly in excess of the very broad and general constitutional limitations applicable. People v. Landers (1927), 329 Ill. 453, 457; People v. Smith (1958), 14 Ill.2d 95, 97.
In Rummel v. Estelle (1980), 445 U.S. 263, 63 L. *543 Ed.2d 382, 100 S.Ct. 1133, the Supreme Court examined the Texas recidivist statute. The defendant had received a mandatory life sentence under the statute after his conviction for obtaining $120.75 by false pretenses following two previous felony convictions which involved a total of $108.36. The court upheld the constitutionality of this sentence as applied. As in the case before us, the defendant in Rummel did not challenge the constitutionality of the statute per se but rather attacked the statute as applied to the facts in his case. He argued that his sentence was grossly disproportionate to his offense. The court found unpersuasive defendant's argument that the amount of money involved was "petty" and should therefore not subject him to the recidivist statute. The court found:
"[T]he interest of the State of Texas here is not simply that of making criminal the unlawful acquisition of another person's property; it is in addition the interest, expressed in all recidivist statutes, in dealing in a harsher manner with those who by repeated criminal acts have shown that they are simply incapable of conforming to the norms of society as established by its criminal law.
*   *   *
This segregation and its duration are based not merely on that person's most recent offense but also on the propensities he has demonstrated over a period of time during which he has been convicted of and sentenced for other crimes. Like the line dividing felony theft from petty larceny, the point at which a recidivist will be deemed to have demonstrated the necessary propensities and the amount of time the recidivist will be isolated from society are matters largely within the discretion of the punishing jurisdiction." Rummel v. Estelle (1980), 445 U.S. 263, 276-85, 63 L.Ed.2d 382, 392-97, 100 S.Ct. 1133, 1140-45.
*544 In the present case, the Illinois legislature has determined that a repeat offender should be dealt with more harshly. The crux of this decision is not the magnitude of a particular offense for which he is convicted but rather is the failure of the recidivist to change his pattern of nonconforming behavior. We, therefore, do not agree with defendant's view that a sentence of three years "shocks the moral sense of the community." The defendant has committed two serious felonies and must be treated accordingly. We find no merit to defendant's contention that the statute is unconstitutional as applied.
The defendant also urges this court to reduce defendant's offense of burglary to that of criminal trespass to land under Supreme Court Rule 615 (73 Ill.2d R. 615). However, Supreme Court Rule 615 is limited to actions which are before the reviewing court on appeal. Since this is a mandamus action, we will not examine factual matters to decide the propriety of reducing the charge against defendant. In a mandamus action the court is limited to deciding matters of law only. Touhy v. State Board of Elections (1976), 62 Ill.2d 303, 312.
For the reasons above stated a writ of mandamus shall issue directing the respondent judge to vacate the order granting defendant probation and to enter sentence in accordance with law.
Writ awarded.
MR. JUSTICE SIMON took no part in the consideration or decision of this case.
