
222 N.W.2d 453 (1974)
STATE of Iowa, Appellee,
v.
David Hugh JOHNSON, Appellant.
No. 56930.
Supreme Court of Iowa.
October 16, 1974.
*454 Archerd & Johnson by Robert W. Brinton, Clarion, for appellant.
Richard C. Turner, Atty. Gen., Darby Maria Coriden, Asst Atty. Gen., and William A. Long, County Atty., for appellee.
Heard before MOORE, C. J., and MASON, RAWLINGS, LeGRAND and REYNOLDSON, JJ.
RAWLINGS, Justice.
Defendant, David Hugh Johnson, appeals from an ex parte substitute judgment on his previously entered guilty plea. We reverse.
October 25, 1973, an information was filed in Wright County charging Johnson had committed robbery with aggravation, The Code 1973, Section 711.2.
November 7th defendant pled guilty to the above charge.
The same day, with leave granted by trial court upon the county attorney's request, said information was amended to charge robbery without aggravation, Code § 711.3.
Defendant then withdrew his prior plea and, in relevant part, this dialogue ensued:
"THE COURT: All right. Stand up! How do you plead to this amended information? THE WITNESS: Guilty.
"THE COURT: Is that voluntary? THE WITNESS: Yes, sir.
"THE COURT: Do  THE WITNESS: Yes, it's a voluntary plea.
"THE COURT:  Do you know  you know the maximum and minimum sentence, that's been explained to you? THE WITNESS: Yes, sir.
"THE COURT: And have you been coerced or threatened? THE WITNESS: No, sir.
"THE COURT: Have you two guys made any promises to this man? MR. BRINTON: Not on my behalf. MR. LONG: Not on my behalf, Your Honor.
"THE COURT: Even if you did, the Court wouldn't have to follow it. Do you understand that? THE WITNESS: Yes, sir.
"* * *
"THE COURT: I'll accept your plea of guilty. I'll ask you later, if you want to say anything to the Court. Right now, I'll hear from the attorneys. THE WITNESS: Okay.
"* * *
"THE COURT: David, stand up and come forward! Do you want to say anything to the Court? THE WITNESS: I would just like to say, I know I have done something very serious; that I'm sorry for it, I'm really sorry. I believe, that what I've done, I should be punished.
"THE COURT: If I punish you, will you use that as a guide line for the rest of your life? THE WITNESS: Yes 
"THE COURT: Don't get in it again. I wish the law provided that I could take *455 you home and use a whip on your back, but it doesn't. I think with some help, you can be a good man. You were charged with a crime that provided for 25 years, do you realize that? THE WITNESS: Yes, sir.
"THE COURT: * * * It's hard for me to pass this sentence; it hurts down deeper than you know, because you don't know what hurt is. For your own good, I'm going to sentence you for three years at Anamosa Reformatory at Anamosa and recommend that he be sent down to Oakdale. I'll give you credit for the time you've spent in jail. The rest of it is not going to be easy, just like it's not easy for me to pass this sentence. It's the hardest thing that I have to do as a judge. But, I got to do it. I asked for the job. With the order of the sentence, I'm going to recommend that an early parole be given to you. When you get out, don't get in trouble again? THE WITNESS: No, sir."
November 8th trial court entered this judgment:
"IT IS ORDERED, ADJUDGED AND DECREED by the Court as follows:
"1. That the attorney, Robert Brinton, is appointed to represent the Defendant at county expense.
"IT IS FURTHER ORDERED, ADJUDGED AND DECREED by the Court that the Defendant is hereby sentenced to three (3) years in the State Institution at Anamosa, Iowa, with a recommendation that he be sent to the Oakdale facilities for treatment, and that it is the recommendation of this Court that the Defendant be considered for early parole. Wright County Sheriff's Department shall provide transportation at their earliest convenience.
"IT IS FURTHER ORDERED, ADJUDGED AND DECREED by the Court that the Defendant be given credit for the time already spent in the Wright County Jail being from the 10th day of October, 1973.
"IT IS FURTHER ORDERED that the Defendant shall pay the costs of this action and that the appeal bond is set in the sum of $1,000.00."
November 28th, without notice to defendant and in his absence, this judgment was entered:
"IT IS ORDERED, ADJUDGED AND DECREED by the Court as follows:
"1. That the attorney, Robert Brinton, is appointed to represent the Defendant at county expense.
"IT IS FURTHER ORDERED, ADJUDGED AND DECREED by the Court that the Defendant is hereby sentenced not to exceed ten (10) years in the State Institution at Anamosa, Iowa, with a recommendation that he be sent to the Oakdale facilities for treatment, and that it is the recommendation of this Court that the Defendant be considered for early parole. Wright County Sheriff's Department shall provide transportation at their earliest convenience.
"IT IS FURTHER ORDERED, ADJUDGED AND DECREED by the Court that the Defendant be given credit for the time already spent in the Wright County Jail being from the 10th day of October, 1973. 31 days.
"IT IS FURTHER ORDERED that the Defendant shall pay the costs of this action and that the appeal bond is set in the sum of $1,000.00."
The sole issue presented is whether defendant's absence at time of the aforesaid resentencing vitiates the above quoted November 28th judgment.
I. Both defense counsel and county attorney have filed affidavits in this court, separate and apart from the record.
These instruments indicate the aforesaid dialogue was preceded by other relevant but unrecorded negotiations or proceedings. See in this regard State v. Reppert, 215 N.W.2d 302, 306-307 (Iowa 1974); State v. Sisco, 169 N.W.2d 542, 549-550 (Iowa 1969); *456 Recommendations of the National Advisory Commission on Criminal Justice Standards and Goals, Standard 3.2 (14 Crim.L. 3001, 3003).
Among other things the above noted affidavits intimate the presiding judge indulged in plea bargaining during which defendant was advised a three year sentence would be imposed in event he entered a guilty plea. See in this regard ABA Standards Relating to Pleas of Guilty, § 3.3 and Commentary at 72-77 (Approved Draft 1968); ABA Standards Relating to the Function of the Trial Judge, § 4.1 and Commentary at 53-60 (Approved Draft 1972); Recommendations of the National Advisory Commission on Criminal Justice Standards and Goals, Standard 3.7 (14 Crim.L. 3001, 3004-3005).
In the processing of this appeal, however, no recognition is accorded said affidavits. See In re Adoption of Blanchard, 179 N.W.2d 441, 442 (Iowa 1970); State v. Houston, 261 Iowa 1369, 158 N.W.2d 158, 161 (1968); Code § 793.17; Iowa R.Civ.P. 340(a).
II. We turn now to the November 8th judgment, quoted above.
Code § 711.3 provides, in essence, a person committing robbery without aggravation shall be imprisoned for not to exceed ten years. And our indeterminate sentence statute, § 789.13, declares:
"When any person over sixteen years of age is convicted of a felony, except the crime of escape, treason, murder, or any other crime the maximum penalty for which is life imprisonment, the court imposing a sentence of confinement in the penitentiary, men's or women's reformatory shall not fix the limit or duration of the same, but the term of such imprisonment shall not exceed the maximum term provided by law for the crime of which the prisoner was convicted."
As to that enactment, this court observed in Adams v. Barr, 154 Iowa 83, 86, 134 N.W. 564 (1912):
"[I]n imposing judgment of imprisonment, in the penitentiary in cases of the kind therein described, the court `shall not fix the limit or duration of the same.' In other words, in such cases a judgment or sentence that the defendant `be imprisoned in the penitentiary according to law' is all that is required, and whatever is added thereto is unauthorized and may be ignored as void or mere surplusage. No reference whatever need be or should be made to a minimum or maximum period. When the record shows the offense of which he has been convicted, and that he is adjudged to suffer imprisonment in the penitentiary, the statute controls the period or term of his restraint, and it is to this statute, and not to the mittimus, to which the warden must look to ascertain the period of time for which he may keep him in custody."
See also Bernklau v. Bennett, 162 N.W.2d 432, 437 (Iowa 1968); State v. Kulish, 260 Iowa 138, 145, 148 N.W.2d 428 (1967).
It is thus evident trial court had no right, power or authority to do other than impose imprisonment for not to exceed the maximum term specified in § 711.3, supra. See State v. Wiese, 201 N.W.2d 734, 737-738 (Iowa 1972). See also State v. Kulish, supra.
Consequently the November 8th judgment was a nullity. See State v. Shilinsky, 248 Iowa 596, 603, 81 N.W.2d 444 (1957). See also State v. Wiese, 201 N.W.2d at 737; State v. Taylor, 258 Iowa 94, 96, 137 N.W.2d 688, 689 (1965); 21 Am.Jur.2d, Criminal Law, § 535; cf. State v. Hopp, 190 N.W.2d 836, 837-838 (Iowa 1971).
III. Therefore, as previously noted, the basic question posed is whether the November 28th judgment, entered without prior notice to defendant and in his absence, constitutes a valid adjudication.
Noticeably, trial court's inherent authority to resentence defendant is not and could not be effectively disputed.
In State v. Wiese, 201 N.W.2d at 736, we said:

*457 "[J]urisdiction of subject matter must derive from law rather than from consent of the parties, and we are required to consider the issue even when not raised in order to avoid unwarranted exercise of judicial authority. City of Clinton v. Owners of Property, etc., 191 N.W.2d 671, 677 (Iowa 1971), and citations; Lynch v. Uhlenhopp, 248 Iowa 68, 80, 78 N.W.2d 491, 498-499 (1956)."
Moreover, this court further stated in Wiese, supra, at 737: "[A] trial court does not exhaust its jurisdiction until a valid judgment is entered. State v. Shilinsky, 248 Iowa 596, 81 N.W.2d 444 (1957)." See also State v. Deets, 195 N.W.2d 118, 125 (Iowa 1972); State v. Taylor, cited above.
But the foregoing does not alone resolve the problem now before us.
IV. Further, by way of exclusion, we are not here concerned with the correction of a mere clerical error or omission. In other words, the situation instantly involved would not permit entry of a nunc pro tunc order to make the record show truthfully what judgment was actually intended. See Headley v. Headley, 172 N.W.2d 104, 108 (Iowa 1969); Jersild v. Sarcone, 163 N.W.2d 78, 81 (Iowa 1968); State v. Frey, 206 Iowa 981, 982-984, 221 N.W. 445 (1928); Parenti v. District Court, 198 Iowa 560, 563-564, 199 N.W. 259 (1924).
In the same vein, this court is not here concerned with a mere correction regarding place of commitment as in Cummings v. Bennett, 324 F.2d 1 (8th Cir. 1963).
Rather, we are confronted with a totally new and different judgment, i. e., a change of penal substance. See State v. Gregory, 198 Iowa 316, 320-321, 198 N.W. 58 (1924); State v. Davis, 105 Ariz. 498, 467 P.2d 743, 747-748 (1970); cf. Cummings v. Bennett, 324 F.2d at 3.
V. At this point Code § 789.3 comes into play. It provides: "When judgment is pronounced, if the conviction be for a felony, the defendant must be personally present; if for a misdemeanor, he need not."
The meaning and purpose of this enactment is self-evident as applied to the imposition of an original valid sentence.
But we have not had prior occasion to squarely determine whether a felony-charged defendant is entitled to notice and opportunity to be present at time of resentencing where the original judgment was void.
Touching on the subject, however, is State v. Kamerling, 259 Iowa 177, 143 N.W.2d 359 (1966). There the accused was sentenced "to pay a fine of $____ together with costs and in default of payment that he be confined in the County jail for a period of 30 days." On appeal this court said, 259 Iowa at 178, 143 N.W.2d at 359:
"We find the above sentence, with the amount of the fine  if one was intended  left blank, is too indefinite to be permitted to stand. We think the case should be reversed and remanded to the trial court with directions, after notice and opportunity to be heard, to impose a proper sentence and it is so ordered." (Emphasis supplied).
A case closely akin to that now before us is Roberts v. State, 197 Kan. 687, 421 P.2d 48 (1966). There the defendant pled guilty to charges of burglary and grand larceny. He was thereupon sentenced to imprisonment for terms, respectively, in excess of applicable statutory limits. After defendant's resultant incarceration and setting aside of the original sentences, new statutorily proper judgments were entered. Defendant contested such resentencing because he was not then present. This challenge was apparently premised upon K.S.A. 62-1507 which states, in part: "For the purpose of judgment, if the conviction be for an offense punishable by imprisonment, the defendant must be personally present; * * *." Compare Iowa Code § 789.13, quoted above.
The Kansas Supreme Court disposed of the issue before it with this apt statement, 421 P.2d at 50-51:

*458 "[I]n a criminal prosecution where an erroneous original sentence of imprisonment has been vacated and set aside, a new sentence imposed in the defendant's absence is void, for, under such circumstances, it is mandatory that the defendant be personally present in court at the time of resentencing. Hence, the judgment of sentence imposed by the district court on December 26, 1963, in petitioner's absence was void."
Also, in State v. Verdugo, 78 N.M. 372, 431 P.2d 750 (1967) trial court vacated an original judgment of imprisonment, then resentenced defendant in absentia. The new sentence was later contested and the appellate court dispositively declared, 431 P.2d at 751:
"It is well settled that at common law a convicted person has a right to be present at the time of sentencing, independent of any constitutional or statutory grant of such right. See Ball v. United States, 140 U.S. 118, 11 S.Ct. 761, 35 L.Ed. 377; Joseph v. State, 236 Ind. 529, 141 N.E.2d 109, 69 A.L.R.2d 824, cert. dismissed 359 U.S. 117, 79 S.Ct. 720, 3 L.Ed.2d 673; State v. Pope, 257 N.C. 326, 126 S.E.2d 126; 21 Am.Jur.2d, Criminal Law, § 304; and 5 Wharton's Criminal Law and Procedure (1967 Supp.) § 2010.
"The state seeks, however, to distinguish this case from the application of the common-law rule by contending that since the defendant had been present when the original sentence was imposed, his presence was not required upon resentencing after the habitual sentence had been vacated. We fail to appreciate the claimed distinction. When a sentence has been set aside, the defendant's presence is as necessary at resentencing as it was at the time of the original sentencing. 21 Am.Jur.2d, Criminal Law, § 307, and 24 C.J.S. Criminal Law § 1591. While the cases cited by these sources base their reasoning somewhat upon statutory provisions that require the defendant's presence at the time of sentencing, e. g., Williamson v. United States, 265 F.2d 236 (5th Cir. 1959), and State ex rel. Boner v. Boles, 148 W.Va. 802, 137 S.E.2d 418, the reasoning seems just as applicable here where the right to be present at the sentencing arises from the common law itself rather than from statutes reflecting the common law."
See also United States v. Behrens, 375 U.S. 162, 164-166, 84 S.Ct. 295, 296-297, 11 L.Ed.2d 224 (1963); State v. Davis, 467 P.2d at 747-748.
VI. In light of the foregoing we conclude and now hold that where an original felony-related judgment is void the defendant must be present with counsel at all proceedings attendant upon imposition of a new and different sentence.
This case must therefore be reversed and remanded with instructions that the judgment or judgments previously entered be set aside and for further appropriate proceedings. In this regard see generally North Carolina v. Pearce, 395 U.S. 711, 89 S.Ct. 2072, 23 L.Ed.2d 656 (1969); State v. Sisco, 169 N.W.2d at 549-550, and citations; Code § 777.15; State v. Bastedo, 253 Iowa 103, 106-107, 111 N.W.2d 255 (1961); People v. Riebe, 40 Ill.2d 565, 241 N.E.2d 313, 314-315 (1968); Recommendations of the National Advisory Commission on Criminal Justice Standards and Goals, Standard 3.7 (14 Crim.L. 3001, 3004-3005); ABA Standards Relating to Pleas of Guilty, § 2.1(a) (Approved Draft 1968).
Reversed and remanded with instructions.
