
50 Cal.App.3d 101 (1975)
123 Cal. Rptr. 704
THE PEOPLE, Plaintiff and Appellant,
v.
JANET LYNN GETTY, Defendant and Respondent.
Docket No. 26393.
Court of Appeals of California, Second District, Division Three.
July 23, 1975.
*103 COUNSEL
Evelle J. Younger, Attorney General, Jack R. Winkler, Chief Assistant Attorney General, S. Clark Moore, Assistant Attorney General, Howard J. Schwab and Beverly K. Falk, Deputy Attorneys General, for Plaintiff and Appellant.
Friedman & Blake and Michael Friedman for Defendant and Respondent.
OPINION
POTTER, J.
Defendant pleaded guilty to second degree burglary (Pen. Code, § 459) and, on October 5, 1973, was sentenced to six months in *104 county jail. Execution of sentence was suspended and she was granted three years' probation under certain terms and conditions. On March 1, 1974, defendant was found to be in violation of probation; probation was revoked and she was committed to the Youth Authority for the term prescribed by law. The court recommended placement in the Ventura School for Girls.
On April 4, 1974, in proceedings entitled "Cause Calendared for Correction of CYA Commitment of 3-1-74," the court ordered: "The Court states that not having been informed that the defendant was convicted of a misdemeanor, the Clerk is ordered to prepare a nunc pro tunc order as of 3-1-74 adding to the CYA commitment that the defendant is sentenced to the CYA for 6 months."
Also on April 4, defendant filed a notice of appeal from "the judgment rendered against" her. (2d Crim. No. 25265.) On September 4, 1974, defendant filed a petition for writ of habeas corpus in this court. (2d Crim. No. 25754.) On or about September 16, 1974, defendant filed a "Notice of Motion in Superior Court for Order Staying Execution of Judgment [Pen C § 1243] and for Bail [Pen C § 1274] Pending Appeal." A hearing was held in the superior court on September 27,[1] at which the court treated the petition for writ of habeas corpus as if it had been filed in the superior court, determined that defendant should be released from custody and her commitment to the Youth Authority recalled "as having been improvidently made in the first place," and decided that probation should be restored, with additional conditions. The court said: "I do grant the defendant's petition for writ of habeas corpus and I order her discharged from custody."
Defendant then requested that her appeal and petition for writ of habeas corpus in this court be dismissed, and said dismissal was effected on October 23, 1974.
On November 12, 1974, the People filed in this court a "Petition for Writ of Mandate and/or Writ of Prohibition" (2d Civ. No. 45237), in order to have the superior court's September 27 modifications and recall of commitment set aside. The petition was denied on November 27, *105 1974, in an 18-line memorandum opinion by another division of this court. A hearing was denied by our Supreme Court on December 26, 1974.
On November 27, the date of the denial of the People's petition for writ of mandate and/or prohibition, the People filed the instant notice of appeal from the September 27 order of the superior court granting the writ of habeas corpus, "discharging defendant from the custody of the Youth Authority and releasing defendant on probation." The appeal lies. (Pen. Code, § 1238, subd. (a)(5).)

Contentions on Appeal
The People submit that the commitment of defendant to the Youth Authority was lawful, and that the superior court therefore had no jurisdiction to recall the commitment. It is further argued that the superior court could not specify the duration of the commitment or place of confinement, and that the superior court had no jurisdiction to entertain the petition for writ of habeas corpus filed in this court. Thus the issues can be defined as follows:
1. Could defendant's commitment to the Youth Authority be modified or recalled?
2. What was the effect, if any, of the September 27 order of the superior court, and what is the present and proper status of the case?

(1a) The Superior Court Was Without Jurisdiction to Modify Its Order of Commitment

Defendant's commitment was authorized by Penal Code section 1203.2, subdivision (d), which reads as follows: "In any case of revocation and termination of probation, including, but not limited to, cases in which the judgment has been pronounced and the execution thereof has been suspended, upon such revocation and termination, the court may, in lieu of any other sentence, commit the person to the Department of the Youth Authority if he is otherwise eligible for such commitment."
Eligibility is governed by section 1731.5 of the Welfare and Institutions Code;[2] as amended in 1969 it provides:
*106 "After certification to the Governor as provided in this article a court may commit to the authority any person convicted of a public offense who comes within subdivisions (a), (b), and (c), or subdivisions (a), (b), and (d), below:
"(a) Is found to be less than 21 years of age at the time of apprehension.
"(b) Is not sentenced to death, imprisonment for life, imprisonment for 90 days or less, or the payment of a fine, or after having been directed to pay a fine, defaults in the payment thereof, and is subject to imprisonment for more than 90 days under the judgment.
"(c) Is not granted probation.
"(d) Was granted probation and probation is revoked and terminated.
"The Youth Authority shall accept a person committed to it pursuant to this article if it believes that the person can be materially benefited by its reformatory and educational discipline, and if it has adequate facilities to provide such care." (Italics added.)[3]
*107 Such being the case, we hold that for the reasons hereinafter discussed, the superior court was without jurisdiction to issue its September 27 order.
First, at the time of that hearing, defendant's appeal was pending in this court. Upon filing of the notice of appeal, jurisdiction of the cause vested in this court. Ordinarily in that event "the trial court loses jurisdiction during that period to do anything in connection with the cause which may affect the judgment." (Witkin, Criminal Procedure, Appeal § 637, at p. 628. See Code Civ. Proc., § 916; In re Katherine R., 6 Cal. App.3d 354, 356 [86 Cal. Rptr. 281], and cases cited therein.) None of the exceptions to this general rule is here applicable.
(2) (See fn.4.) In addition, because defendant had begun serving her sentence,[4] the court had no jurisdiction to vacate or modify it unless it was improper on its face.
(3) "The general rule is that after a sentence has been entered in the minutes of the court and the defendant has begun serving his sentence, the trial court is without jurisdiction to vacate or modify it. (People v. McAllister, 15 Cal.2d 519, 526 [102 P.2d 1072].)
"Where the sentence pronounced is, on its face, beyond the power of the court to impose for the offense of which the defendant was convicted, *108 the court has jurisdiction, at a later time to impose a legal sentence. (In re Robinson, 142 Cal. App.2d 484 [298 P.2d 656].) That rule is not applicable here, for the sentence is not on its face improper." (People v. Clinton, 243 Cal. App.2d 284, 288 [52 Cal. Rptr. 221]. See also In re Johannes, 213 Cal. 125, 129-130 [1 P.2d 984]; cf. In re Katherine R., supra, 6 Cal. App.3d 354.)
(4) While clerical errors are subject to such correction (see, e.g., People v. Shirley, 10 Cal. App.3d 268, 275 [88 Cal. Rptr. 853]), no judicial error can be so corrected once service of sentence has begun (In re Wimbs, 65 Cal.2d 490, 498 [55 Cal. Rptr. 222, 421 P.2d 70]). (1b) As we have indicated, supra, the sentence in the instant case was proper on its face (and, in fact, the "improvidence" cited by the trial court constituted neither judicial nor clerical error).
We note, further, that after commitment the court had "no power to suspend execution of the commitment." (Welf. & Inst. Code, § 1737.)[5] The sole power retained by the court was that reserved by Welfare and Institutions Code section 1739 to leave defendant at liberty or admit her to bail pending the appeal. The order here appealed from, however, was not so limited.
Once the Youth Authority assumed custody of the defendant, it was under statutory direction as follows:
"(a) Except as otherwise provided in this chapter, the Authority shall keep under continued study a person in its control and shall retain him, subject to the limitations of this chapter, under supervision and control so long as in its judgment such control is necessary for the protection of the public.
"(b) The Authority shall discharge such person as soon as in its opinion there is reasonable probability that he can be given full liberty without danger to the public." (Welf. & Inst. Code, § 1765.)
*109 The authority is further empowered as follows:
"(a) When a person has been committed to the authority it may
"(1) Permit him his liberty under supervision and upon such conditions as it believes conducive to law-abiding conduct;
"(2) Order his confinement under such conditions as it believes best designed for the protection of the public;
"(3) Order reconfinement or renewed release under supervision as often as conditions indicate to be desirable;
"(4) Revoke or modify any order except an order of discharge as often as conditions indicate to be desirable;
"(5) Modify an order of discharge if conditions indicate that such modification is desirable and when such modification is to the benefit of the person committed to the authority;
"(6) Discharge him from its control when it is satisfied that such discharge is consistent with the protection of the public." (Welf. & Inst. Code, § 1766.)
There is an additional factor compelling reversal of the order discharging defendant from custody. The superior court purported to act as it did on September 27 by considering and granting defendant's petition for a writ of habeas corpus. The court's said action was improper in two respects. First, despite the fact that the Los Angeles County District Attorney's office had notice of the petition as filed in this court, in at least facial compliance with Penal Code section 1475, the pendency of the action in the Court of Appeal stripped the superior court of jurisdiction to consider the petition: "It is a general rule of wide application that a court is without jurisdiction where it attempts by habeas corpus to interfere with the exercise by another court of jurisdiction theretofore acquired in a habeas corpus proceeding, unless the prior jurisdiction has been terminated." (In re Shaw, 84 Cal. App. 24 [257 P. 586].) Thus even if we accept, arguendo, the superior court's power to treat the petition as if it had there been filed, the fact that it was pending in another court at the time should have prevented its consideration under any conditions.
*110 But second, and more important, the action of the superior court reflects what may be a widespread misunderstanding of "The Great Writ." The court purported to "grant the defendant's petition for writ of habeas corpus and ... order her discharged from custody." By no means could the initial granting of the writ have so resulted. Granting of the writ, even if the propriety of the grant is unassailable, does not decide the issues and cannot itself require the final release of the petitioner. Issuance of the writ must occur literally: "The writ must be directed to the person having custody of or restraining the person on whose behalf the application is made, and must command him to have the body of such person before the Court or Judge before whom the writ is returnable, at a time and place therein specified." (Pen. Code, § 1477.) A reply ("return") to the writ is an essential part of the scheme:
"The person upon whom the writ is served must state in his return, plainly and unequivocally:
"1. Whether he has or has not the party in his custody, or under his power or restraint;
"2. If he has the party in his custody or power, or under his restraint, he must state the authority and cause of such imprisonment or restraint;
"3. If the party is detained by virtue of any writ, warrant, or other written authority, a copy thereof must be annexed to the return, and the original produced and exhibited to the Court or Judge on the hearing of such return;
"4. If the person upon whom the writ is served had the party in his power or custody, or under his restraint, at any time prior or subsequent to the date of the writ of habeas corpus, but has transferred such custody or restraint to another, the return must state particularly to whom, at what time and place, for what cause, and by what authority such transfer took place;
"5. The return must be signed by the person making the same, and, except when such person is a sworn public officer, and makes such return in his official capacity, it must be verified by his oath." (Pen. Code, § 1480.)
After this procedure has been followed, the court examines the return (Pen. Code, § 1483), and is required "to hear such proof as may be produced against such imprisonment or detention, or in favor of the *111 same, and to dispose of such party as the justice of the case may require...." (Pen. Code, § 1484.) The court must "do and perform all other acts and things necessary to a full and fair hearing and determination of the case." (Id.; italics added.)
In the instant case, the procedural requirements concerning writs of habeas corpus were not met. No writ was actually issued, and the People were deprived of their right to be heard by way of a return to any writ granted.
In summary, the superior court was without jurisdiction to modify or vacate its commitment of defendant to the Youth Authority, and in any event did not issue a proper writ of habeas corpus to initiate any proceedings that could lead to defendant's release from the authority.

The Original Commitment Remains in Effect
We now must evaluate the present status of the case. The superior court's attempt to limit defendant's commitment to six months was of no effect since, as indicated, ante, after commitment it is the authority's responsibility to determine when (up to various maximum age and time restrictions) persons committed to it shall be released. (Welf. & Inst. Code, §§ 1765, 1766, 1769-1771.) Since the court was without power to issue its nunc pro tunc order of April 4, 1974, the original commitment order of March 1, 1974 (entered Mar. 4, 1974) remains in effect. The latter order, committing defendant to the Youth Authority, recites that the court "orders placement in Ventura School for Girls." This minute order erroneously reports the court's statement at the March 1 hearing that "the Court affirmatively recommends the Ventura School for Girls for this defendant." Because the Youth Authority is empowered to order "confinement under such conditions as it believes best designed for the protection of the public" (Welf. & Inst. Code, § 1766, subd. (a)(2)), the court could only recommend the location of placement, and the commitment should have been so phrased. To a considerable extent the issue is moot, however, since it appears from the record that defendant indeed was placed in the Ventura School for Girls. But the commitment should be modified to make it clear that the court was recommending, not ordering, placement there. This clarification seems particularly necessary in view of the court's statement at the September 27, 1974 hearing, that "the court did make an order committing her to the Ventura School for Girls."
*112 Defendant undoubtedly requested dismissal of her appeal and petition for writ of habeas corpus in this court because of the favorable ruling in the superior court. Since that ruling must be reversed, fair treatment of the case requires consideration of the arguments defendant made in her opening brief filed in the appeal which was dismissed. The issues are fully briefed there and in the People's brief in the instant case.
In her original appellate brief, defendant argued that her commitment was either unlawful under the authority of Wetteland v. Superior Court, 251 Cal. App.2d 607 [59 Cal. Rptr. 605], or cruel or unusual punishment and therefore unconstitutional. (Cal. Const., art. I, § 17.)
The Wetteland argument must fail. While that case held that a defendant could be committed to the Youth Authority only at the time of conviction and imposition of sentence, the Legislature's amendments to section 1731.5 of the Welfare and Institutions Code and section 1203.2 of the Penal Code nullify that holding, as defendant recognizes.
(5) The argument concerning cruel or unusual punishment is as follows: Defendant was sentenced to six months (suspended) in the county jail; upon being found to be in violation of probation and committed to the Youth Authority, she could be kept in custody longer than six months and  if circumstances warrant  for much longer under sections 1800 through 1803 of the Welfare and Institutions Code. She argues that she pleaded guilty and accepted probation only after being informed that she could be sent to county jail for six months if she violated probation.
The latter contention is not supported by the record. There is no evidence that defendant entered into any plea bargain or was led to believe by the prosecutor or the court that the only possible disposition of her case if she violated probation would be revocation of the suspension of the six-month sentence. That result certainly would be permissible under section 1203.2, subdivision (c), of the Penal Code, and in fact would be the only authorized term of imprisonment. But subdivision (d) of the same section clearly authorizes commitment to the Youth Authority (under the terms detailed in the Welfare and Institutions Code provisions discussed at length, ante) if the defendant is otherwise eligible, and neither the transcript of the probation and *113 sentencing hearing nor any other records before us suggest that there were any misleading statements or promises concerning this matter.
"The commitment of [defendant] for the period specified by the Youth Authority Act [up to age 25 or until not necessary for protection of public[[6]] does not constitute cruel or unusual punishment...." (People v. Barstow, 42 Cal. App.3d 90, 95 [116 Cal. Rptr. 524].) In In re Gary W., 5 Cal.3d 296 [96 Cal. Rptr. 1, 486 P.2d 1201], our Supreme Court held that commitment pursuant to sections 1800-1803 (continuation of custody beyond date when the person otherwise would be released, if dangerous to the public because of "mental or physical deficiency, disorder, or abnormality") likewise does not constitute cruel or unusual punishment. These holdings are consistent with both "the demonstrably civil purpose of sections 1800-1803" (In re Gary W., supra, 5 Cal.3d at p. 302) and the nonpunitive purpose of the Youth Authority Act (Welf. & Inst. Code, §§ 1700-1906): "The purpose of this chapter is to protect society more effectively by substituting for retributive punishment methods of training and treatment directed toward the correction and rehabilitation of young persons found guilty of public offenses. To this end it is the intent of the Legislature that the chapter be liberally interpreted in conformity with its declared purpose." (Welf. & Inst. Code, § 1700.)
The act clearly authorizes the more-or-less indefinite commitment of a person to the authority in cases which otherwise could have been dealt with (like the instant case) by the imposition of a misdemeanor jail term. This is perfectly consistent with the stated purpose of the act and holdings of the courts.
"The argument that custody necessarily is punishment is not sound. The custody which the act authorizes is auxiliary to reform.... [T]he restraint is but ancillary to the main purpose of the act, and is not punishment as such." (People v. Zaccaria, supra, 216 Cal. App.2d 787, 791, disapproved on other grounds in People v. Navarro, supra, 7 Cal 3d 248, 271 fn. 20.) "[T]he purpose of the Youth Authority Act ... is to provide for correction and rehabilitation of youthful offenders rather than to provide for their punishment." (In re Benny G., 24 Cal. App.3d 371, 375 fn. 3 [101 Cal. Rptr. 28]. See also In re Keller, 232 Cal. App.2d 520, 525-526 [42 Cal. Rptr. 921].)
*114 Thus it would violate the purpose and provisions of the act to hold that its mission of "reform," "correction and rehabilitation" must be fulfilled within the time that would have been given as a jail or state prison sentence. In this respect quantities of time are not fungible, as our Supreme Court recognized in People v. Hannon, 5 Cal.3d 330, 341 [96 Cal. Rptr. 35, 486 P.2d 1235], where it reaffirmed that whether a Youth Authority term of commitment is to be credited against either state prison or county jail terms upon the individual's return to the court by the authority is a matter of legislative concern. As section 1737.1 of the Welfare and Institutions Code now reads, such credit is given against the former but not the latter, a situation with which the court refused to tamper in Hannon. (See also the following cases, decided before section 1737.1 was amended to give credit against state prison terms: People v. Stevenson, 275 Cal. App.2d 645, 652-653 [80 Cal. Rptr. 392]; People v. Wheeler, 271 Cal. App.2d 205, 209 [76 Cal. Rptr. 842]; People v. Wilkins, 251 Cal. App.2d 823, 829 [60 Cal. Rptr. 49].) Neither defendant's argument nor any of the pertinent cases suggests that the indeterminate nature of Youth Authority commitments or the mere fact that they can exceed the alternative jail or prison term in some cases renders such commitments unconstitutional as cruel or unusual punishment.
Under the protracted and involved procedural circumstances of this case, we find it appropriate to direct a few words to the Youth Authority concerning this matter. Defendant states that her release had been scheduled for 11 months after commitment, or February 1975. Because of the superior court's order, she has been at liberty since September 27, 1974. We assume that consistent with its duty to confine defendant only if "in its judgment such control is necessary for the protection of the public" (Welf. & Inst. Code, § 1765) and its power to give defendant her "liberty under supervision and upon such conditions as it believes conducive to law-abiding conduct" (Welf. & Inst. Code, § 1766, subd. (a)(1)), the Youth Authority will take into account the conduct of defendant since her September release, which took place nearly seven months after her commitment, in determining what if any additional period of confinement is necessary.
The superior court order of September 27, 1974, is reversed. The March 1, 1974 (entered Mar. 4, 1974) order committing defendant to the Youth Authority is modified as follows: The sentence reading "Court orders placement in Ventura School for Girls." is deleted, and in its *115 place is substituted a sentence reading "Court recommends placement in Ventura School for Girls."
Allport, J., concurred.
Cobey, Acting P.J., concurred in the judgment.
NOTES
[1]  The reason for defendant's various filings after the April 4 "Correction of CYA Commitment" is apparent in light of the following remark by the court at the September 27 hearing: "The court is apprised now that the Youth Authority takes the position that they are not bound by any such limitation [six months] and that they will continue to keep this defendant in their custody...."
[2]  There is no suggestion anywhere in the record that defendant (who was 20 years of age at the time of commitment) was not so eligible.
[3]  When another division of this court denied the People's petition for writ of mandate and/or prohibition, it stated that "the trial court was without jurisdiction to commit defendant real party in interest to the California Youth Authority; the commitment was void and was subject to being set aside at any time. (Cf. In re Robinson, 142 Cal. App.2d 484, 486 [298 P.2d 656]; People v. Massengale, 10 Cal. App.3d 689, 693 [89 Cal. Rptr. 237]; In re Sandel, 64 Cal.2d 412, 417-419 [50 Cal. Rptr. 462, 412 P.2d 806].) The petition is denied." While defendant does not dispute the People's argument that that ruling does not apply to the instant appeal under the doctrine of the "law of the case," we believe a brief discussion of the reasons why the People are correct is in order.

The doctrine, which applies to criminal as well as civil cases, was discussed recently in People v. Shuey, 13 Cal.3d 835, 841 [120 Cal. Rptr. 83, 533 P.2d 211]: "In the early case of Tally v. Ganahl (1907) 151 Cal. 418, 421 [90 P. 1049], this rule was aptly described. `The doctrine of the law of the case is this: That where, upon an appeal, the supreme court, in deciding the appeal, states in its opinion a principle or rule of law necessary to the decision, that principle or rule becomes the law of the case and must be adhered to throughout its subsequent progress, both in the lower court and upon subsequent appeal, and, as here assumed, in any subsequent suit for the same cause of action, and this although in its subsequent consideration this court may be clearly of the opinion that the former decision is erroneous in that particular.'" The doctrine's qualifications were reiterated in Shuey: "Application of the rule is now subject to the qualifications that `the point of law involved must have been necessary to the prior decision, that the matter must have been actually presented and determined by the court, and that application of the doctrine will not result in an unjust decision.' (Pigeon Point Ranch, Inc. v. Perot (1963) 59 Cal.2d 227, 231 [28 Cal. Rptr. 865, 379 P.2d 321]; see also People v. Medina (1972) 6 Cal.3d 484, 491, fn. 7 [99 Cal. Rptr. 630, 492 P.2d 686].)" (13 Cal.3d at p. 842. See also DiGenova v. State Board of Education, 57 Cal.2d 167, 179 [18 Cal. Rptr. 369, 367 P.2d 865].) An "unjust decision" is one in which there is "at least ... demonstrated a manifest misapplication of existing principles resulting in substantial injustice." (People v. Shuey, supra, 13 Cal.3d at p. 846.)
Under these standards, the doctrine does not govern the issue of the lawfulness of the commitment in the case at bar, on either substantive or procedural grounds. Concerning the latter, the matter was not "actually presented," as there was no opportunity for oral argument, an important incident of the right to appeal. (People v. Medina, 6 Cal.3d 484, 489 [99 Cal. Rptr. 630, 492 P.2d 686].) Nor was there adequate explanation of the conclusion that the commitment was unlawful. The court did not mention the above-quoted statutes expressly permitting such commitment, and the three cases cited do not support the conclusion. In In re Robinson, the court followed the then-existing version of section 1203.2 of the Penal Code, which provided that upon revocation of probation the only sanction available to the court was imposition of the theretofore suspended sentence. As we have indicated, this section since has been amended, and Robinson no longer accurately states the law. In the other two cases cited, People v. Massengale and In re Sandel, the courts hearing the respective appeals confirmed the judicial power and responsibility to correct void judgments (in excess of jurisdiction), but the cases provide no guidelines whatever for determining whether such invalidity existed in the instant case.
We, therefore, must conclude that applying the "law of the case" doctrine in this instance would result in our deliberate enforcement of "a manifest misapplication of existing principles resulting in substantial injustice."
[4]  Commitment to the Youth Authority constitutes pronouncement of sentence. (People v. Navarro, 7 Cal.3d 248, 271 [102 Cal. Rptr. 137, 497 P.2d 481].)
[5]  Welfare and Institutions Code section 1737 reads as follows: "After a court has committed a person to the authority such court has no power to suspend execution of the commitment. Nothing in this section shall limit or restrict the jurisdiction and powers of the juvenile court under Sections 775 and 779 of this code."

Cf. People v. Zaccaria, 216 Cal. App.2d 787, 790-791 [31 Cal. Rptr. 383] (disapproved on other grounds in People v. Navarro, supra, 7 Cal.3d 248, 271 fn. 20): "From the moment of commitment, there can be no recall by the superior court. (People v. Rick, 112 Cal. App.2d 410 [246 P.2d 691].)"
[6]  The maximum applicable to defendant in this case, however, is 2 years or age 23 (Welf. & Inst. Code, § 1770) in view of the 6-month jail term originally imposed, and the court's comment made at the time that it was declaring "by sentence" that defendant's offense was a misdemeanor under section 17, subdivision (b)(3) of the Penal Code.
