
294 N.W.2d 824 (1980)
STATE of Iowa, Appellee,
v.
Gregory A. WILSON, Appellant.
No. 64103.
Supreme Court of Iowa.
July 16, 1980.
Fred J. Kreykes, Pella, for appellant.
Thomas J. Miller, Atty. Gen., Douglas F. Staskal, Asst. Atty. Gen., and Terry L. Wilson, Marion County Atty., for appellee.
Considered by REYNOLDSON, C. J., and LeGRAND, ALLBEE, McGIVERIN and LARSON, JJ.
LARSON, Justice.
This appellant challenges the sentencing proceedings in his case on the ground the trial court failed to state the reasons for the sentence imposed as required by Iowa R.Crim.P. 22(3)(d). The State concedes that the sentence must be vacated and the case remanded for resentencing for that reason and for the additional reason that the sentencing court erroneously imposed an indeterminate sentence rather than one for a specific term as required by section 903.1, The Code. While conceding error here, the State urges us to require in all future cases that a defendant raise any alleged sentencing defect in the trial court in order to preserve his right of appeal on that ground. We decline to adopt the waiver rule advocated by the State and, therefore, vacate the sentence and remand for resentencing.
The facts in the case are undisputed. Defendant was sentenced to "a term not to exceed two years" for the offense of assault with intent to inflict serious injury, an aggravated misdemeanor under section 708.2(1), The Code. No reasons for imposition of the sentence were stated on the record as required by Iowa R.Crim.P. 22(3)(d) ("the court shall state on the record its reasons for selecting the particular sentence"). We held in State v. Luedtke, 279 N.W.2d 7, 8 (Iowa 1979), that such a statement is mandatory and failure to provide it requires vacation of the sentence and remand for resentencing. The issue of preservation of error, however, was not raised in Luedtke.
*825 In State v. Marti, 290 N.W.2d 570 (Iowa 1980), we considered whether an objection at the time of sentencing was required to preserve error when a trial court failed to comply with rule 22(3)(d). We said that:
Contrary to the State's assertion, we do not believe trial court's error in failing to state reasons for the sentence was waived by defendant's not alerting trial court to the matter. Defendant had no way of knowing before the court entered the judgment whether or not reasons would be stated in the record. . . . As defendant had no opportunity to preserve error, we could not, in fairness, hold that he waived it.

290 N.W.2d at 589 (emphasis added). The State argues in the present case that a defendant does have an opportunity to preserve error by filing a post-judgment motion under Iowa R.Crim.P. 23(5)(a) for correction of the sentence. That rule provides simply that "[t]he court may correct an illegal sentence at any time." If any rule provides post-judgment relief under these circumstances, it would appear to be this one.
We had occasion recently to discuss the scope of rule 23(5)(a) in State v. Young, 292 N.W.2d 432, 435 (Iowa 1980). Young concerned alleged error by the trial court in considering the fact that the defendant could have been convicted of a higher offense and in refusing to give credit on the sentence for the time served in jail. The State urged that a motion to correct the sentence under rule 23(5)(a) was a prerequisite to appeal. We concluded the rule merely embodied the long standing practice in the state of correcting sentences which were illegal, most of them apparently on the basis that they were beyond the power of the court to impose. We concluded in Young that a motion under rule 23(5)(a) was not required before sentencing errors could be raised on appeal.
Hill v. United States, 368 U.S. 424, 82 S.Ct. 468, 7 L.Ed.2d 417 (1962), considered an identical federal rule then in effect. In Hill the defendant was not given an opportunity at sentencing to make a statement in his own behalf. While noting this was error, the Supreme Court held that such defect in the sentencing procedure could not be raised under federal rule 35. The Court said:
[A]s the Rule's language and history make clear, the narrow function of rule 35 is to permit correction at any time of an illegal sentence, not to re-examine errors occurring at the trial or other proceedings prior to the imposition of the sentence. The sentence in this case was not illegal. The punishment meted out was not in excess of that proscribed by the relevant statutes, multiple terms were not imposed for the same offense, nor were the terms of the sentence itself legally or constitutionally invalid in any other respect.
368 U.S. at 430, 82 S.Ct. at 472, 7 L.Ed.2d at 422 (emphasis in original).
The Iowa rule (as did federal rule 35 before 1966) provides that the correction may be made "at any time," strongly suggesting it is directed to excision of sentences insofar as they were beyond the jurisdiction of the court and therefore void. If we were to expand that concept to encompass redress for underlying procedural defects, as well, it would open up a virtual Pandora's box of complaints with no statutorily prescribed procedures for their disposition nor any time limits for their implementation. We do not believe the legislature intended such result. We note that federal rule 35 was amended in 1966 to provide a means for objecting to the procedure as well as the sentence itself, within prescribed time limits. We have no such provision in our rule 23(5)(a) and we may not add it by statutory construction. In short, a defective sentencing procedure does not constitute an "illegal sentence" under Iowa R.Crim.P. 23(5)(a).
The State argues that other "duties" of the trial court, such as instructing the jury under Iowa R.Crim.P. 18(5)(f), are waived by failing to object and cites the cases of State v. Tomlinson, 243 N.W.2d 551, 553 (Iowa 1976); State v. Williams, 288 N.W.2d 907 (Iowa 1980) and State v. Sallis, *826 262 N.W.2d 240, 248 (Iowa 1978). The "duty" of the court in instructing the jury, however, is distinguishable; in the case of instructions, a defendant may raise the matter by objection in the trial court. In the case at hand, there is no procedure under our existing rules for a defendant to raise the issue at the trial court level. He may not be held to have waived his objection by failing to raise it at the sentencing because he had no way to know then that the judge would leave it out of the subsequent judgment. Marti, 290 N.W.2d at 589. He has no way to raise the defect after judgment because, as we have discussed, a motion to "correct" an illegal sentence under rule 23(5)(a) is the only rule which could be a basis for relief in the trial court, and it is inapplicable here. A defendant without a procedure for raising an issue in the trial court obviously cannot be held to have waived his right to appeal. Id.
The indeterminate sentence.
The trial court sentenced the defendant to a term "not to exceed two years," notwithstanding section 903.1, The Code, which mandates that, when a person is convicted of a misdemeanor for which no specific penalty is provided the trial court "shall determine the sentence, and shall fix the period of confinement . . .." The indeterminate sentence provisions of our law are therefore inapplicable in this case, and upon remand the court should, in accordance with section 903.1, determine the length of sentence within the maximum of two years.
The sentence must be vacated and the case remanded for resentencing. The rule advocated by the State concerning waiver of errors is rejected.
SENTENCE VACATED; CASE REMANDED FOR RESENTENCING.
