
88 Cal.App.3d 890 (1979)
152 Cal. Rptr. 204
THE PEOPLE, Plaintiff and Appellant,
v.
STEVE ERVIN MARTINEZ, Defendant and Respondent.
Docket No. 17897.
Court of Appeals of California, First District, Division Two.
January 29, 1979.
*892 COUNSEL
Evelle J. Younger, Attorney General, Jack R. Winkler, Chief Assistant Attorney General, Edward P. O'Brien, Assistant Attorney General, John T. Murphy, Kenneth C. Young and Karl S. Mayer, Deputy Attorneys General, for Plaintiff and Appellant.
Jimmie E. Tinsley, under appointment by the Court of Appeal, for Defendant and Respondent.
OPINION
TAYLOR, P.J.
This appeal[1] by the People raises the common question of whether a trial court has jurisdiction to impose a sentence pursuant to Penal Code section 1170.1, where a defendant, at the time he commits an offense subject to the Uniform Determinate Sentencing Act (DSL), has committed a felony prior to the July 1, 1977, operative date of the DSL. (1) For the reasons set forth below, we reverse as a sentencing court has no jurisdiction to proceed pursuant to Penal Code section 1170.1 unless all the offenses were committed after the operative date of DSL. (2a) We hold that the proper procedure for the instant case is that prescribed by Penal Code section 1170 for the DSL offense and by Penal Code section 1170.2, subdivisions (a) and (b) for the Uniform Indeterminate Sentencing Law (ISL) offense. Thus, the Community Release Board (CRB), the successor to the Adult Authority, rather than the trial court, has jurisdiction to calculate the applicable aggregate term for offenses committed in the instant case. California Rules of Court, rule 451(a) requires that where consecutive sentences are imposed under these circumstances, the sentencing court shall identify the proceedings in which the determinate term was imposed, order that the determinate term shall be served commencing upon the completion of the indeterminate terms and identify the proceedings in which the indeterminate terms were imposed. We also hold that a writ of mandate is an appropriate procedure for challenging the validity of the sentence imposed.
*893 The facts pertinent to this appeal are as follows: At the time defendant pled guilty to the DSL offense, he stood convicted of two ISL offenses, escape (Pen. Code, § 4532, subd. (b)) in Santa Cruz County Superior Court No. 63796, and second degree burglary (Pen. Code, § 459) in Santa Cruz County Superior Court No. 61157.[2] In prescribing the term of imprisonment for the assault, the DSL offense, the court recited that the prior escape (Pen. Code, § 4532, subd. (b))[3] was the offense with the greatest "principal" term, and sentenced defendant to a consecutive term of 16 months for the assault.[4] As a consecutive sentence was imposed, the trial court[5] sentenced defendant pursuant to Penal Code section 1170.1, subdivision (a), set forth, so far as pertinent below;[6] the sentencing orders failed to comply with all of the requirements of California Rules of Court, rule 451(a), discussed in the latter portion of this opinion.
Preliminarily, we turn to the question of whether the People have a right to appeal.
Defendant, relying on People v. Drake, 19 Cal.3d 749 [139 Cal. Rptr. 720, 566 P.2d 622], argues that the appeal must be dismissed, as Penal *894 Code section 1238, subdivision (a)(6) does not authorize an appeal from an order reducing punishment in the first instance. Drake held, at page 754, that Penal Code section 1238, subdivision (a)(6), provided no authorization for an appeal by the People from an order granting a new trial, pursuant to Penal Code section 1181, subdivision 6, which modifies a verdict or finding to that of a lesser included offense. In doing so, however, our Supreme Court in Drake, footnote 7, at page 756, said: "The People rely on People v. Burke (1956) 47 Cal.2d 45, 53 [301 P.2d 241], in which this court stated that an order striking the charge of a prior conviction `was in its nature one of the orders specified as appealable either by paragraph 1 or by paragraph 6 of section 1238 of the Penal Code.' However, in People v. Valenti (1957) 49 Cal.2d 199, 207 [316 P.2d 633], we emphasized that the considerations involved in the appeal of an order striking a prior conviction are quite different from those involved in the appeal of an order which goes to the `cause of action itself,' as does the order in this case" (italics added).
The instant order, unlike that in Drake, does not go to the "cause of action itself," but goes exclusively to punishment. Accordingly, it is analogous to the order in Burke, as well as an erroneous order granting probation. Such an order was held appealable in People v. Villegas, 14 Cal. App.3d 700, 702-704 [92 Cal. Rptr. 663] (cf. People v. Mendevil, 81 Cal. App.3d 84, 88 [146 Cal. Rptr. 65]). Defendant also cites People v. Godfrey, 81 Cal. App.3d 896 [147 Cal. Rptr. 9], and People v. Superior Court (Duran) 84 Cal. App.3d 480 [148 Cal. Rptr. 698], to urge that rather than Penal Code section 1238, subdivision (a)(6), the only available avenue of review for the People is a timely application for a writ of mandate. We agree that mandate is a proper procedure, as discussed in People v. Superior Court (Duran), supra.
(3) However, we feel constrained to hold that the instant order is appealable as an order "made after judgment affecting the substantial rights of the People,"[7] and, therefore, appealable pursuant to Penal Code section 1238, subdivision (a)(5) (People v. Mendevil, supra, p. 88; People v. Holly, 62 Cal. App.3d 797, 802-805 [133 Cal. Rptr. 331]). We conclude, therefore, that while the instant order is appealable, mandamus is the preferable and more expeditious procedure.
(2b) We turn first to the question of whether only the CRB, pursuant to Penal Code section 1170.2, subdivision (a), had the authority to *895 determine the applicable sentence for the offenses committed prior to July 1, 1977, or whether the sentencing courts had jurisdiction to do so pursuant to Penal Code section 1170.1.
In this connection, a brief review of the DSL, which became operative on July 1, 1977, is helpful. Effective the same date, the Legislature repealed the ISL. The DSL returns the sentencing power to the courts but requires sentencing judges to impose the "middle" of three statutorily determined lengths of incarceration for a crime, unless there are "circumstances in aggravation or mitigation," in which case, the longer or shorter period will be imposed (Pen. Code, § 1170.2, subd. (b); see Way v. Superior Court, 74 Cal. App.3d 165, 170 [141 Cal. Rptr. 383]). A sentence may also be increased if consecutive sentences are imposed (Pen. Code, § 1170.1, subd. (a), set forth, so far as pertinent below), or if certain "enhancements" not applicable here are pleaded and proved (see Pen. Code, §§ 667.5, 12022, 12022.5; 12022.6, 12022.7). Certain limitations in the number of enhancements and the total sentence which may be imposed are specified by Penal Code section 1170.1.
The applicable versions of Penal Code sections 1168 and 1170 are part of the 1977 revisions of the DSL (Stats. 1977, ch. 165). Section 1168 provides: "(a) Every person who commits a public offense, for which any specification of three time periods of imprisonment in any state prison is now prescribed by law shall, unless such convicted person be placed on probation, a new trial granted, or the imposing of sentence suspended, be sentenced pursuant to Chapter 4.5 (commencing with Section 1170) of Title 7 of Part 2. [¶] (b) For any person not sentenced under such provision, but who is sentenced to be imprisoned in the state prison, including imprisonment not exceeding one year and one day, the court in imposing the sentence shall not fix the term or duration of the period of imprisonment." (Italics added.)
Read alone, section 1168 tells us nothing about the proper sentencing procedure for persons in the position of defendant here. However, when section 1168 is read in conjunction with sections 1170 and 1170.2,[8] as it must be, the legislative scheme becomes clear. Section 1170, subdivision (a)(2),[9] provides that where a choice of three time periods for confinement *896 is specified as punishment for an offense, the trial court shall sentence the defendant to one of the specified time periods, unless he "... is sentenced pursuant to subdivision (b) of Section 1168 because he had committed his crime prior to July 1, 1977." Section 1170.2, subdivision (a)[10] provides that the CRB shall fix the term of imprisonment "In the case of any inmate who committed a felony prior to July 1, 1977, who would have been sentenced under Section 1170 if he had committed it after July 1, 1977...." (Italics added.)
In construing these provisions as to a defendant who pled nolo contendere to a 1973 offense and was placed on probation which was revoked in September 1977, People v. Superior Court (Gonzales) 78 Cal. App.3d 134 [144 Cal. Rptr. 89] (no petn. for hg. filed), at page 140, held that the Legislature intended that for defendants sentenced after July 1, 1977, for offenses committed prior thereto, the term of imprisonment was to be fixed by the CRB, not the sentencing court.[11]
*897 Thus, as to the offenses committed before July 1, 1977, defendant should have been sentenced pursuant to Penal Code section 1168 (the ISL) and then sentenced for the post-July 1, 1977, offense without application of Penal Code section 1170.1, with an order which complies with all three requirements of California Rules of Court, rule 451(a), quoted below,[12] namely: (1) identifying the proceedings in which the DSL sentence was imposed; (2) identifying the proceedings in which the ISL sentence is to be imposed; and (3) ordering that the DSL term was to be served, commencing on the completion of the ISL term.
Although Penal Code section 1170.1 does not clearly so state, we think that the only reasonable approach and proper application of California Rules of Court, rule 451(a), is that when, as here, a sentencing court imposes a DSL term (pursuant to Pen. Code, § 1170), consecutive to an ISL term (determined by the CRB pursuant to Pen. Code, § 1168), the calculation of the aggregate term under section 1170.1, subdivision (a) is an administrative function of the CRB rather than a function of the sentencing court. It must be so since the ISL term is not known until the CRB has made its determination pursuant to Penal Code section 1170.2. Thus, defendant here should have been sentenced, utilizing the middle term of the offense bearing the longest term of punishment (Pen. Code, § 1170.2, subd. (a)), rather than one-third of the middle term for the post-July 1, 1977, offense, pursuant to Penal Code section 1170.1, subdivision (a).
Our view is confirmed by the fact that here as to defendant, the trial court's order effectively reversed the principal and subordinate terms so that the greater term specified for assault (three, four, five years, Pen. *898 Code, § 245, subd. (b)) was subordinated to the lesser term specified for escape (sixteen months, two or three years, Pen. Code, § 4532, subd. (b)). The aggregate term for a consecutive sentence with the escape as the principal term would be the middle term of two years for the escape, plus one-third of the middle term of four years for the assault, or one-third of forty-eight, or sixteen months, a total of three years and four months. If the assault term were concurrent, the term would be four years.
We conclude, therefore, that the sentencing court had no jurisdiction to proceed pursuant to Penal Code section 1170.1. This conclusion, however, does not dispose of all of the contentions raised.
(4) The record also indicates that defendant's plea bargain was made and entered with the mistaken understanding by all parties that defendant would be sentenced to one-third of the middle term for the post-July 1, 1977 offense. Defendant urges, and the People concede, that under these circumstances, he should be allowed, if he so desires, to apply for a withdrawal of his plea of guilty and to enter a new and different plea (People v. Kaanehe, 19 Cal.3d 1, 13-15 [136 Cal. Rptr. 409, 559 P.2d 1028]; People v. Johnson, 10 Cal.3d 868, 873 [112 Cal. Rptr. 556, 519 P.2d 604]; In re Tinsley, 178 Cal. App.2d 15, 17-18 [2 Cal. Rptr. 642]).
The order is reversed. The CRB must determine the term for the ISL offenses pursuant to Penal Code section 1170.2 and calculate the aggregate term pursuant to the provisions of Penal Code section 1170.1. Defendant to be permitted to withdraw his plea and enter a new and different plea, if he so desires, after being informed of the sentence that could be imposed for the ISL offense.
Kane, J., and Rouse, J., concurred.
NOTES
[1]  The People appeal from the reduction of sentence in a judgment entered January 6, 1978, in which defendant entered a plea of guilty to assault with a deadly weapon (Pen. Code, § 245, subd. (b)) after a plea bargain that involved dismissal of Santa Cruz County Superior Court No. 63795, which charged attempted first degree burglary (Pen. Code, §§ 664, 459).
[2]  Defendant had entered a plea of nolo contendere in No. 61157 after the court inquired into the factual basis for the plea. The record indicates that on April 6, 1977, defendant was sentenced, the sentence suspended and defendant placed on probation for four years for the burglary and ordered to serve one year in the county jail. Two months later he escaped and remained at large until September 23, 1977, when he was located and subsequently committed the assault.
[3]  The statutorily prescribed state prison term for escape and second degree burglary is sixteen months, two years or three years (Pen. Code, §§ 459, 461, 4532, subd. (b)).
[4]  The statutorily prescribed state prison term for assault is three, four or five years (Pen. Code, § 245, subd. (b)).
[5]  The record indicates that in discussing the plea bargain, the trial court and all assumed that it was proper to proceed pursuant to Penal Code section 1170.1. Thus, the court, after determining that the prior escape was the offense with the greatest "principal" term, sentenced defendant to 16 months for the assault, i.e., one-third of the middle term of 4 years (48 months).
[6]  Penal Code section 1170.1: "(a) Except as provided in subdivision (b) and subject to Section 654, when any person is convicted of two or more felonies, whether in the same proceeding or court or in different proceedings or courts, and whether by judgment rendered by the same judge or by different court, and a consecutive term of imprisonment is imposed under Sections 669 and 1170, the aggregate term of imprisonment for all such convictions shall be the sum of the principal term, the subordinate term and any additional term imposed pursuant to Section 667.5. The principal term shall consist of the greatest term of imprisonment imposed by the court for any of the crimes, including any enhancements imposed pursuant to Section 12022, 12022.5, 12022.6, or 12022.7. The subordinate term for each consecutive offense shall consist of one-third of the middle term of imprisonment prescribed for each other felony conviction for which a consecutive term of imprisonment is imposed." (Italics added.)

So far as here pertinent, Penal Code section 669 requires the court to indicate whether an imprisonment is consecutive or concurrent.
[7]  The "substantial right" affected is the longer subordinate term properly imposed pursuant to Penal Code section 1170.2, subdivision (a), discussed below in footnote 10, at page 896.
[8]  Also amended by Statutes of 1977, chapter 165.
[9]  Subdivision (a)(2) of section 1170, so far as pertinent, reads as follows: "In any case in which the punishment prescribed by statute for a person convicted of a public offense is a term of imprisonment in the state prison of 16 months, two or three years; two, three or four years; three, four or five years; five, six, or seven years, or any other specification of three time periods, the court shall sentence the defendant to one of the terms of imprisonment specified unless such convicted person is given any other disposition provided by law, including a fine, jail, probation or the suspension of imposition or execution of sentence or is sentenced pursuant to subdivision (b) of Section 1168 because he had committed his crime prior to July 1, 1977. In sentencing the convicted person, the court shall apply the sentencing rules of the Judicial Council. The court, unless it determines that there are circumstances in mitigation of the punishment prescribed, shall also impose any other term which it is required by law to impose as an additional term" (italics added.)
[10]  Section 1170.2, subdivision (a), provides, so far as pertinent: "In the case of any inmate who committed a felony prior to July 1, 1977, who would have been sentenced under Section 1170 if he had committed it after July 1, 1977, the Community Release Board shall determine what the length of time of imprisonment would have been under Section 1170 without consideration of good-time credit and utilizing the middle term of the offense bearing the longest term of imprisonment of which the prisoner was convicted increased by any enhancements justified by matters found to be true and which were imposed by the court at the time of sentencing for such felony. Such matters include ... any consecutive sentence" (italics added).

Subdivision (b) of Penal Code section 1170.2 then indicates that if the calculation made pursuant to subdivision (a) results in a term which would end before a parole release date already set or no date has been set, the CRB shall establish the parole date on the date calculated under subdivision (a), unless two members of the CRB determine that he should serve a longer term. The statute also requires that such a longer term must be justified on the basis of certain objective facts, including 1) the number of crimes of which the prisoner was convicted; 2) the number of prior convictions; 3) the fact that he was armed; 4) used a deadly weapon; or 5) inflicted great bodily harm on the victim (Way v. Superior Court, supra, 74 Cal. App.3d 172-173).
[11]  The court discussed the basis for its conclusion at pages 139 and 140: "While there are simpler ways of saying that all persons who committed crimes before July 1, 1977, will be sentenced under the indeterminate sentencing law, the conclusion that this was the legislative intent is compelling when the 1977 versions of sections 1170 and 1170.2 are compared with their 1976 counterparts. The 1976 Act clearly provided that determinate sentences were to be given to all persons sentenced after July 1, 1977, whenever the crime was committed. One of the very purposes of the 1977 amendments was to make the date of the criminal act determinative. We quote from the bill analysis of Assembly Bill No. 476, prepared by the Assembly Committee on Criminal Justice, and included as an exhibit to real party's return to the alternative writ. Item 14 on page 5 of the analysis provides: `DATE OF S.B. 42 SENTENCE [¶] S.B. 42: the determinate sentences will apply to those cases sentenced after July 1, 1977. Those sentenced before will be sentenced indeterminately and will receive the retroactive application. [¶] A.B. 476: changes the date from sentencing to the date the offense was committed. Expands the use of retroactive hearings to cover those who will be received "indeterminately" in prison after July 1, 1977 (due to probation violations that could occur in the future, under A.B. 476, there will be defendants received with indeterminate sentences years into the future).'"
[12]  In this connection, California Rules of Court, rule 451(a) provides: "When a defendant is sentenced under section 1170 and the sentence is to run consecutively to a sentence, other than a life sentence, imposed under section 1168 in the same or another proceeding, the judgment shall specify the determinate term imposed under section 1170, shall order that the determinate term shall be served commencing upon the completion of the sentence under section 1168, and shall identify the proceedings in which the indeterminate sentence was imposed. The term under section 1168 and the date of its completion will be determined as provided by law."
