
47 Cal.App.3d 441 (1975)
120 Cal. Rptr. 732
THE PEOPLE, Plaintiff and Respondent,
v.
RICHARD GUERRERO, Defendant and Appellant.
Docket No. 25838.
Court of Appeals of California, Second District, Division Three.
April 23, 1975.
*442 COUNSEL
Corinne S. Shulman, under appointment by the Court of Appeal, for Defendant and Appellant.
Evelle J. Younger, Attorney General, Jack R. Winkler, Chief Assistant Attorney General, S. Clark Moore, Assistant Attorney General, Howard *443 J. Schwab and Frederick R. Millar, Jr., Deputy Attorneys General, for Plaintiff and Respondent.
OPINION
DELL, J.[*]
Defendant and his codefendant, Roger Barron, were convicted by a jury of three sex crimes committed upon a 17-year-old girl, Irene L.: forcible rape (Pen. Code, § 261, subd. 2), oral copulation (Pen. Code, § 288a) and unlawful sexual intercourse (Pen. Code, § 261.5).[1]
Defendant does not quarrel with the sufficiency of evidence,[2] hence we feel we can dispense with the customary statement of facts and proceed directly to the contentions on appeal: apart from a claim of sentencing irregularity, the only issue raised is the trial court's ruling permitting the prosecutor to testify.
(1) The incident in question arose as the result of the prosecutor's interview of a possibly "hostile" witness, George Carignan, in the absence of an investigator. Carignan told the prosecutor that he had been present with the alleged rapists, defendant and Barron, on the evening in question, including the occasions when they "went off with the victim;" he, defendant and Barron were members of the Orpheus Club; he had known the other two "almost their entire lives"; he had visited them in jail two or three times; he knew Irene to be 16 or 17 and had so told defendant and Barron. He was then requested to come upstairs to the prosecutor's office for a further interview in the presence of an investigator but refused.[3]
When called as a witness, Carignan testified consistently with his statements to the prosecutor, except in the following particulars: neither *444 he, defendant nor Barron was a member of the Orpheus; he had not seen defendant or Barron in jail; although he knew Irene's true age to be 17, he had not communicated that information to defendant or Barron. He denied making inconsistent statements to the prosecutor. Thereafter the prosecutor took the stand and gave his version of the interview with Carignan. (The direct and redirect examination was conducted by another deputy district attorney.) No objection was voiced by either defense counsel or the court to the propriety of the procedure, although Barron's counsel stated, "Well, I think that we are going to get into a situation here where Mr. Barshop isn't going to be trying the case. He is going to be a witness." The prosecutor replied, "If that happens, that happens." The trial judge's response was, "Is there anything wrong with that?"
We answer the trial judge belatedly if elliptically by saying, "There is a good deal wrong with it, but no prejudicial error in this particular case." Lack of prejudice is evident inasmuch as the thrust of the prosecutor's testimony went only to the "Hernandez defense" of "reasonable belief,"[4] which applied only to the unlawful intercourse charge, by far the least serious of those filed; defendant did not testify as to what belief, if any, he had as to Irene's age; Barron's testimony at best was lukewarm on the issue; the jury found the defendant not guilty of kidnaping (Pen. Code, § 207), but guilty of forcible rape (Pen. Code, § 261, subd. 2) and oral copulation (Pen. Code, § 288a) as well as unlawful sexual intercourse (Pen. Code, § 261.5) and as to the last mentioned offense recommended misdemeanor treatment (Pen. Code, § 264).[5] As we shall indicate, the issue is primarily one of ethics  or, to use the current term, professional responsibility  but we can readily envision circumstances in which the testimony of a prosecutor might present issues of constitutional magnitude.[6]
As defendant recognizes, an attorney acting as counsel in a case is as competent to testify as any other witness. (People v. Stokley, 266 Cal. App.2d 930, 936 [72 Cal. Rptr. 513], cert. den., 395 U.S. 914 [23 L.Ed.2d 227, 89 S.Ct. 1761]; People v. Burwell, 44 Cal.2d 16, 38 [279 P.2d *445 744]; People v. Vacca, supra, 185 Cal. App.2d at pp. 128-129.) Despite such competency we are satisfied that the dual role of witness and advocate  and particularly the practice of a prosecuting attorney's testifying in a case he is prosecuting  should generally not be approved except under extraordinary circumstances. (See People v. Smith, 13 Cal. App.3d 897, 909 [91 Cal. Rptr. 786, 52 A.L.R.3d 875]; Annot., 54 A.L.R.3d 100-176, esp. pp. 114-125.)
In implementing Canon 5 of its Code of Professional Responsibility ("A lawyer should exercise independent professional judgment on behalf of a client"), the American Bar Association has promulgated this ethical consideration: "EC 5-9 Occasionally a lawyer is called upon to decide in a particular case whether he will be a witness or an advocate. If a lawyer is both counsel and witness, he becomes more easily impeachable for interest and thus may be a less effective witness. Conversely, the opposing counsel may be handicapped in challenging the credibility of the lawyer when the lawyer also appears as an advocate in the case. An advocate who becomes a witness is in the unseemly and ineffective position of arguing his own credibility. The roles of an advocate and of a witness are inconsistent; the function of an advocate is to advance or argue the cause of another, while that of a witness is to state facts objectively."
The applicable disciplinary rules are DR 5-101(B) and DR 5-102(A):
"DR 5  101 Refusing Employment When the Interests of the Lawyer May Impair His Independent Professional Judgment.
".... .... .... .... ...
"(B) A lawyer shall not accept employment in contemplated or pending litigation if he knows or it is obvious that he or a lawyer in his firm ought to be called as a witness, except that he may undertake the employment and he or a lawyer in his firm may testify:
"(1) If the testimony will relate solely to an uncontested matter.
"(2) If the testimony will relate solely to a matter of formality and there is no reason to believe that substantial evidence will be offered in opposition to the testimony.
"(3) If the testimony will relate solely to the nature and value of legal services rendered in the case by the lawyer or his firm to the client.
*446 "(4) As to any matter, if refusal would work a substantial hardship on the client because of the distinctive value of the lawyer or his firm as counsel in the particular case.
"DR 5-102 Withdrawal as Counsel When the Lawyer Becomes a Witness.
"(A) If, after undertaking employment in contemplated or pending litigation, a lawyer learns or it is obvious that he or a lawyer in his firm ought to be called as a witness on behalf of his client, he shall withdraw from the conduct of the trial and his firm, if any, shall not continue representation in the trial, except that he may continue the representation and he or a lawyer in his firm may testify in the circumstances enumerated in DR 5-101(B)(1) through (4)."
Effective January 1, 1975, new rules of professional conduct were adopted by the Board of Governors of the State Bar of California. We note in particular rule 2-111(A)(4):
"(4) If upon or after undertaking employment, a member of the State Bar knows or should know that he or a lawyer in his firm ought to be called as a witness on behalf of his client in litigation concerning the subject matter of such employment he shall withdraw from the conduct of the trial and his firm may continue the representation and he or a lawyer in his firm may testify in the following circumstances:
"(a) If the testimony will relate solely to an uncontested matter; or
"(b) If the testimony will relate solely to a matter of formality and there is no reason to believe that substantial evidence will be offered in opposition to the testimony; or
"(c) If the testimony will relate solely to the nature and value of legal services rendered in the case by the lawyer or his firm to the client; or
"(d) As to any matter, if refusal would work a substantial hardship on the client because of the distinctive value of the lawyer or his firm as counsel in the particular case."
Manifestly the only basis upon which the testimony of the prosecutor could have been justified under the cited provisions is that its absence "would work a substantial hardship on the [People] because of the *447 distinctive value of the [prosecutor] or [the district attorney's office] as counsel...." (ABA Code of Professional Responsibility, DR 5-101(B)(4); Cal. Rules of Professional Conduct, rule 2-111(A)(4)(d).)
The American Bar Association stresses the "preventive law" approach in its standards for criminal justice relating to the prosecution function and the defense function. Prosecution standard 3.1, "Investigative function of prosecutor," provides in part: "(f) The prosecutor should avoid interviewing a prospective witness except in the presence of a third person unless the prosecutor is prepared to forego impeachment of a witness by the prosecutor's own testimony as to what the witness stated in an interview or to seek leave to withdraw from the case in order to present his impeaching testimony."
We quote from the commentary to that standard: "One of the chief advantages urged in behalf of the separation of barristers and solicitors in the English legal profession is the general rule of avoidance of pretrial contact with witnesses by the advocate. This permits the advocate to maintain the stance in court of one who has not confronted the witness before, except in some situations where he may be present while the solicitor interviews the witness.
".... .... .... .... ...
"The more frequently encountered problem is impeachment of an adverse witness whose testimony varies from what he has given to the prosecutor before trial. It is here that there may be need to conduct interviews of witnesses with a third person present, since hostile witnesses do not often sign written statements for opposing counsel. Use of a third person is virtually the only effective means of impeaching a witness. Assuming a court would permit it, a prosecutor is in a difficult situation if he must seek leave to withdraw and substitute other counsel so that he might take the stand to relate what he claimed the adverse witness had said to him.
"The Code of Professional Responsibility takes a firm position that a lawyer should avoid testifying in court when he is the advocate. ABA Code DR 5-102. `Although his zeal as a lawyer might not influence his testimony as a witness, an ever critical public is only too apt to place such a construction upon it. A lawyer should avoid not only all improper relationships but should likewise, in order to maintain the profession in *448 public confidence and esteem, avoid all relationships which may appear to be improper.' ABA COMM. ON PROFESSIONAL ETHICS, OPINIONS, No. 50 (1931) (hereinafter cited ABA OPINIONS). See also Jackson v. United States, 297 F.2d 195, 196 (D.C. Cir.1961).
"After written statements are secured by investigators, it is proper under our system, and indeed wise for the prosecutor, to interview such witnesses personally, not only to verify the investigator's report but to acquaint himself with the personality of the witness so as to be aware how the witness will react on the stand. Here again the prosecutor should take the precaution of having a third person present. The use of investigators in dealing with witnesses avoids much of the potential danger in this area."
We state the obvious: the entire problem  including the possibility of "substantial hardship"  would have been avoided had the common sense recommendation appended to prosecution standard 3.1 been followed.[7]
We emphasize that in the present case the matters to which the prosecutor testified were relatively minor and there was no showing that the prosecutor argued his own credibility to the jury. Even if  contrary to our facts  there had been a defense objection to the testimony, no abuse of discretion in overruling such objection would have been apparent. Nevertheless, the procedures in tomorrow's case may not be as innocuous as those in today's.[8] We urge that district attorneys familiarize themselves and their staffs with the pertinent provisions of the State Bar *449 rules and the American Bar Association canons and standards, as to the latter particularly those applicable to "the prosecution function."[9]
(2) The remaining point argued on appeal is a claimed irregularity in sentencing. The trial judge sentenced defendant to state prison for the term prescribed by law on count I (forcible rape), and as to counts II (oral copulation) and V (unlawful sexual intercourse) stated that "he, likewise, will be sentenced to state prison."[10] The jury having recommended a county jail sentenced for count V, however, the trial judge was required to impose a misdemeanor-type sentence and hence the orally pronounced sentence was jurisdictionally in error. (People v. Brown, 35 Cal. App.3d 317, 328 [110 Cal. Rptr. 854]; People v. Pantages, 212 Cal. 237, 270 [297 P. 890].) Obviously the inadvertence was brought to his attention immediately, since the minute order of June 12, 1974, which comprises the formal judgment, provides for a one-year county jail sentence as to count V, with the execution of that sentence to be permanently stayed. It is contended nevertheless that despite the "proper method of handling sentencing of defendant on both the felony and misdemeanor charges," the "act of sentencing" should be corrected. However, we agree with the Attorney General that there is nothing to correct at this point. Clearly the trial judge had jurisdiction to correct judicial error in the orally pronounced judgment prior to its entry in the minutes and the defendant's placement under the restraint of the sentence. (People v. Thomas, 52 Cal.2d 521, 533-534 [342 P.2d 889]; People v. Hartsell, 34 Cal. App.3d 8, 13 [109 Cal. Rptr. 627].) This situation is not at all analogous to the case in which the trial judge, having failed orally to refer to findings in aggravation of punishment, thereafter "corrects" the judgment with the effect of enhancing the severity of the sentence. (In re Candelario, 3 Cal.3d 702, 705-707 [91 Cal. Rptr. 497, 477 P.2d 729]; People v. Hartsell, supra, 34 Cal. App.3d at pp. 12-14.)
The judgment is affirmed.
Ford, P.J., and Potter, J., concurred.
NOTES
[*]   Assigned by the Chairman of the Judicial Council.
[1]  Barron is not a party to this appeal.
[2]  Nevertheless we have read the entire trial transcript and have satisfied ourselves that there is substantial evidence to support the jury's determination.
[3]  We interject at this point our impression that the only potential evidence of substantial relevancy derived from the interview, apart from placing the alleged rapists in the company of Irene, was the communication of her under-18 status. Knowledge of a defendant of a victim's true age would, of course, become relevant if a defense to an unlawful intercourse charge was based on the ground of "reasonable belief" that she was 18 years or over. (See People v. Hernandez, 61 Cal.2d 529, 535-536 [39 Cal. Rptr. 361, 393 P.2d 673, 8 A.L.R.3d 1092].)
[4]  See footnote 3.
[5]  Moreover, there was no objection to the testimony. (See People v. Vacca, 185 Cal. App.2d 125, 129 [8 Cal. Rptr. 64].)
[6]  See footnote 8, post.

We have no hesitancy in stating that if in this case there was error in permitting the prosecutor to testify, such error was harmless beyond a reasonable doubt. (Chapman v. California, 386 U.S. 18, 24 [17 L.Ed.2d 705, 710-711, 87 S.Ct. 824, 24 A.L.R.3d 1065]; Fahy v. Connecticut, 375 U.S. 85, 91-92 [11 L.Ed.2d 171, 176, 84 S.Ct. 229].)
[7]  The prosecutor had been assigned to trials for only eight months out of his three years' experience as a deputy district attorney.
[8]  While we have found no California case in which a conviction has been reversed for the sole reason that a prosecutor testified (cf. People v. Arends, 155 Cal. App.2d 496, 506-510 [318 P.2d 532]), there is ample precedent in other jurisdictions. For example, in State v. Hayes (Mo.) 473 S.W.2d 688, 691-692 [54 A.L.R.3d 93, 97-99], a judgment of conviction was reversed because of the prejudicial effect of the prosecuting attorney's active prosecution of the case while being the principal witness for the state as to the only real factual issue, a timely objection having been made by defendant. Similarly, the prosecutor's testimony contributed to reversals of convictions in Adams v. State, 202 Miss. 68 [30 So.2d 593, 597-598]; State v. Ryan, 137 Kan. 733 [22 P.2d 418, 420]; Robinson v. United States (8th Cir.1928) 32 F.2d 505, 510 [66 A.L.R. 468]; People v. McCoy, 44 Ill.2d 458, [256 N.E.2d 449, 450]; Urban v. Commonwealth, 195 Ky. 704 [243 S.W. 916]; Wilkinson v. People, 226 Ill. 135 [80 N.E. 699, 705]; Turner v. State, 212 Miss. 590 [55 So.2d 228, 230]. (See also People v. Crump, 5 Ill.2d 251 [125 N.E.2d 615, 623, 52 A.L.R.2d 834]; Mohler v. Commonwealth, 132 Va. 713 [111 S.E. 454, 459-460]; Zeidler v. State, 189 Wis. 44 [206 N.W. 872, 874]; Hardtke v. State, 67 Wis. 552 [30 N.W. 723, 726]; State v. Nicholson (Mo. App.) 7 S.W.2d 375, 379; People v. Schraeberg, 347 Ill. 392 [179 N.E. 829, 830]; Frank v. State, 150 Neb. 745 [35 N.W.2d 816, 821].)
[9]  We suggest like action by public defenders and private counsel, with emphasis on ABA standards as to "the defense function."
[10]  The court also made an order staying the sentences as to counts II and V pending any appeal, the stay as to those counts becoming permanent upon the finality of the judgment on count I. (See In re Wright, 65 Cal.2d 650, 655-656 [56 Cal. Rptr. 110, 422 P.2d 998].)
