
242 Cal.App.2d 110 (1966)
In re BILLY EUGENE GRAYSON on Habeas Corpus.
Crim. No. 4016. 
California Court of Appeals. Third Dist.  
May 10, 1966.
 Ralph D. Drayton, under appointment by the District Court of Appeal, for Petitioner.
 Thomas C. Lynch, Attorney General, Doris H. Maier, Assistant Attorney General, Edsel W. Haws and Harold Bradford, Deputy Attorneys General, for Respondent.
 FRIEDMAN, J.
 Habeas corpus, attacking a 1956 conviction of second degree robbery. Like the petitioners in In re Van Brunt (3 Crim. 3996, 4003) ante, p. 96 [51 Cal.Rptr. 136], this day filed, the petitioner appeared without counsel at his preliminary examination and made a courtroom confession. In this case, however, before permitting the accused to take the stand, the magistrate fully and fairly informed him of his right to legal representation, including court-appointed counsel, warned him that any statement could be used against him and ascertained that he did not want an attorney.  [fn. 1] Petitioner then took the witness stand, confessed the robbery but claimed he had only simulated possession of a gun. A prosecution motion to strike the weapon allegation was granted. The magistrate ordered petitioner held to answer.
 Continuing to act without counsel, petitioner appeared in *112 superior court, entered a plea of guilty and sought probation. At the time fixed petitioner appeared without counsel, the court denied probation and imposed sentence of imprisonment. A transcript of the sentencing demonstrates that the court failed to comply with Penal Code section 1200, which requires that at the time of sentencing the court inquire of the defendant whether he has "any legal cause to show" why judgment *113 should not be pronounced.  [fn. 2]
 Petitioner did not appeal from the judgment. He now attacks the preliminary examination, claiming bewilderment and confusion and asserting that the magistrate accepted a waiver of counsel without first ascertaining that he understood the nature and consequences of his waiver. He attacks the conviction on the theory that a criminal judgment pronounced without the statutory allocution should be set aside on habeas corpus when the defendant is not represented by counsel.
 There are two reasons why petitioner's attack on the preliminary examination must fail. [1] In the absence of a motion to set aside the information, any invalidity in the proceedings before commitment was waived. (Pen. Code,  995, 996; People v. Elliot, 54 Cal.2d 498, 503-505 [6 Cal.Rptr. 753, 354 P.2d 225]; In re Tedford, 31 Cal.2d 693, 694 [192 P.2d 3].) [2] Second, petitioner's claim of absence of intelligent waiver of counsel is contradicted by the record. The transcript shows that petitioner clearly and unhesitatingly responded in the negative when the magistrate asked whether he wanted an attorney; that he was alert to deny possession of a gun and to achieve reduction of the charge from first to second degree robbery; that his statements to the court were lucid, logical and responsive. Petitioner's prior criminal record exhibits a person with some familiarity with court appearances and criminal procedure. The magistrate had fully and understandably advised him of the choices available to him. His subsequent *114 plea of guilty in the superior court is entirely consistent with a rational and conscious choice to waive counsel at the preliminary examination. The record supplies a substantial basis for the conclusion that the waiver of counsel was made by one who had an intelligent conception of the consequences of his act. (In re Tedford, supra.)
 [3] Since petitioner intelligently waived counsel, the procedure by which he took the stand and admitted his crime provided the evidentiary basis for a lawful commitment. (Pen. Code,  866.5; In re Berry, 43 Cal.2d 838, 843-844 [279 P.2d 18]; In re Van Brunt, supra.)
 [4] Efforts of the Attorney General to secure a transcript of the superior court arraignment have proved unavailing. Petitioner does not attack the arraignment procedure. On that occasion the court was required to advise him of his right to counsel and to permit a plea of guilty only if satisfied of an intelligent waiver. (Pen. Code,  987, 1018; In re James, 38 Cal.2d 302, 313 [240 P.2d 596].) We presume that the court properly performed its duty and received an effective waiver of counsel before accepting petitioner's plea of guilt. (In re Johnson, 62 Cal.2d 325, 330 [42 Cal.Rptr. 228, 398 P.2d 420].)
 [5] Omission of the inquiry as to legal cause required by Penal Code section 1200 is fatal to the judgment if the defendant has been deprived of counsel on the occasion of sentencing. (In re Levi, 39 Cal.2d 41, 45 [244 P.2d 403]; People v. De Waele, 224 Cal.App.2d 512, 515 [36 Cal.Rptr. 825].) If the defendant is represented by counsel or has made an effective waiver, omission of the inquiry is only an error of law, not necessarily prejudicial. (People v. Thomas, 45 Cal.2d 433, 438 [290 P.2d 491]; People v. Straw, 209 Cal.App.2d 565, 567 [26 Cal.Rptr. 461].) As pointed out in In re Turrieta, 54 Cal.2d 816, 820 [8 Cal.Rptr. 737, 356 P.2d 681], no infringement of the defendant's right to be represented at sentencing occurs when a valid waiver of counsel has taken place at an earlier stage of the proceedings. The statement of an unrepresented defendant's right to counsel need not be repeated every time he comes to court; generally, where a defendant has intelligently waived counsel he must take some affirmative steps to reinstate his right. (In re Turrieta, supra, 54 Cal.2d at p. 821.) [6] Petitioner makes no claim that he did not effectively waive counsel at the time of his arraignment and plea of guilty. When he appeared later for sentence, the court was not required to ask him whether his waiver still held good. Having *115 elected to represent himself, petitioner was not entitled to privileges and indulgences greater than those provided to defendants represented by counsel. (People v. Mattson, 51 Cal.2d 777, 794 [336 P.2d 937].) His failure to object to the court's omission of the allocution was the product of his own choice, not the product of a denial of representation. [7] Even were the question of prejudice available on habeas corpus, omission of the allocution where the defendant had entered an informed plea of guilt and probation had been neither granted nor revoked, was only an error of form and not prejudicial.
 The order to show cause is discharged and the writ denied.
 Pierce, P. J., and Bray, J.,  [fn. *] concurred.
 "On these charges you are entitled to a speedy examination, to a reasonable delay; to counsel at all stages of the proceedings; to the process of this court to compel the attendance of any witnesses you may wish to testify in your behalf; to be confronted by the witnesses who testify against you and to cross examine them, and to admission to bail."
 "It is my duty to warn you that any statement you may make pending or during this examination can be used against you."
 "Furthermore, in accordance with Section 859 of the Penal Code of the State of California, I inform you that you are entitled to counsel at all stages of the proceedings; you are entitled to a reasonable time within which to obtain counsel."
 "If you do not have counsel the court will, if you wish, appoint counsel to represent you."
 "A peace officer will take a message for you to any counsel in this judicial district free of charge."
 "Do you have an attorney, Mr. Grayson?"
 "The Defendant: No, sir."
 "The Court: Do you want an attorney?"
 "The Defendant: No."
 "The Court: No?"
 "The Defendant: No."
 "The Court: Mr. Grayson, there is one of two courses of procedure open to you this morning. Either I can set this down for a hearing at a later date, at which time the District Attorney will produce the witnesses and the evidence against you and at which time you have a right to cross examine those witnesses, also to introduce any evidence or any testimony or witnesses that you wish to in your own defense. We call that hearing the preliminary examination."
 "If, after that hearing, I determine there is probable cause to believe that you are guilty of this offense with which you are charged, you will then be ordered held to answer to the Superior Court."
 "Instead of that, if you wish to, you may be sworn in as a witness this morning and take the witness stand and testify regarding these charges. And if you admit the charges, then that will serve as your preliminary examination and you can thereupon be ordered held to answer to the Superior Court."
 "However, if you do the latter, I want to warn you again that any testimony you give or any statement you may make can be used against you."
 "Which do you want to do? Do you want me to set this for hearing later or do you want to take the stand this morning?"
 "The Defendant: Well, if I plead guilty--is this armed robbery?"
 "The Court: I read the complaint to you and gave you a copy of it. It accuses you of robbery and also says that you were armed with a deadly weapon."
 "The Defendant: I wasn't armed. I am guilty, but I wasn't armed."
 "The Court: Well, if you wish to take the stand of your own free will--I want you to understand that it is up to you--if you wish to take the stand and testify regarding these charges you may. If you don't, I will set it over for hearing later and the District Attorney will have the witnesses here. Which do you want to do?"
 "The Defendant: Take the stand, I guess."
 "The Defendant: No, sir."
 "The Court: What?"
 "* * *"
 "The Defendant: Supposed to have been reduced from armed robbery to robbery."
 "The Court: Well, how about that, Mr. District Attorney? All it shows is that he pleaded guilty."
 "Mr. Ferguson: He took the stand, Your Honor, over there, and he denied being armed at the time. The armed clause was in originally but it wasn't put in the Information."
 "The Court: That's -- it's in here but --"
 "Mr. Ferguson: It wasn't charged in the Information."
 "The Court: Then, it is robbery in the second degree."
 "Mr. Ferguson: Second degree."
 "The Court: And we'll fix it at second degree, and the application for probation will be denied. It is the judgment of the Court that the defendant be committed to the Department of Corrections for the term prescribed by law for the offense of robbery in the second degree, and he is remanded to the custody of the Sheriff for delivery to Chino without unnecessary delay. That's all."
NOTES
[fn. 1]  1. After the court read petitioner and handed him a copy of a complaint charging him with armed robbery, the following dialogue occurred:
[fn. 2]  2. "The Court: People of the State of California vs. Billy Eugene Grayson. Well, now, he was charged at the time of the commission of the offense with being armed with a deadly weapon, .38 caliber revolver. That's right, isn't it?
[fn. *]  *. Retired Presiding Justice of the District Court of Appeal sitting under assignment by the Chairman of the Judicial Council.
