
194 Cal.App.3d 1536 (1987)
239 Cal. Rptr. 920
THE PEOPLE, ex rel. DENNIS KOTTMEIER, as District Attorney, etc., Petitioner,
v.
THE SUPERIOR COURT OF SAN BERNARDINO COUNTY, Respondent; GREG T., a Minor, Real Party in Interest.
Docket No. E004182.
Court of Appeals of California, Fourth District, Division Two.
September 9, 1987.
*1538 COUNSEL
Dennis Kottmeier, District Attorney, and Joseph A. Burns, Deputy District Attorney, for Petitioner.
No appearance for Respondent and for Real Party in Interest.
OPINION
CAMPBELL, P.J.
The People, through the San Bernardino District Attorney, seek review of the trial court's order dismissing as untimely a petition brought under Welfare and Institutions Code section 602.[1] The People argue that the terms of Welfare and Institutions Code section 654 did not require such a ruling. We disagree, and therefore deny issuance of the peremptory writ.

FACTS
On May 9, 1986, real party Greg T., hereinafter the minor, participated in an event later alleged as a petty theft.
On June 2, 1986, the People, through a probation officer, and the minor availed themselves of section 654 by signing an "INFORMAL PROBATION AGREEMENT." The agreement stated: "In lieu of filing a Petition in the Juvenile Court and with the consent of the parents or guardians of [the minor] the San Bernardino County Probation Department will undertake a program of supervision not to exceed six months pursuant to section 654 of the Juvenile Court Law." (Italics added.) The agreement provided, among *1539 other things, that the minor would make restitution, seek counseling, not associate with a certain person, and obey all laws.
On December 12, 1986, that is, six months and ten days after the date the informal probation was signed, the district attorney filed a petition under section 602. The probation officer had submitted to the San Bernardino District Attorney a request for the filing of the petition on November 26, 1986.
On January 21, 1987, the minor moved the court to dismiss the 602 petition, arguing that its filing violated the terms of section 654. The prosecutor opposed the motion and argued that section 654 did not establish a six-month limitation against 602 petitions. Hearing on the motion was continued.
On March 4, 1987, the court heard the parties' arguments, and agreed with the minor that section 654 establishes a six-month limitation of the filing of petitions under section 602. The court therefore granted the minor's motion to dismiss the petition with prejudice.
The People thereupon sought review of the dismissal in this court by way of a petition for writ of mandate. We granted the alternative writ, and the matter is now before us for disposition.

DISCUSSION
(1a) The district attorney petitioned for writ of mandate under the assumption that he could not appeal.[2] (2) "If the prosecution has not been granted by statute a right to appeal, review of any alleged error may be *1540 sought by a petition for writ of mandate only when a trial court has acted in excess of its jurisdiction and the need for such review outweighs the risk of harassment of the accused." (People v. Superior Court (Stanley) (1979) 24 Cal.3d 622, 625-626, fn. omitted [156 Cal. Rptr. 626, 596 P.2d 691].) A trial court exceeds its jurisdiction when it dismisses a case based on a misinterpretation of a statute. (Cf. People v. Municipal Court (Gelardi) (1978) 84 Cal. App.3d 692, 698-701 [149 Cal. Rptr. 30] [Penal Code, § 1385 did not authorize continuance of case for six months for a dismissal conditioned upon defendant's good behavior]; see People v. Superior Court (Himmelsbach) (1986) 186 Cal. App.3d 524, 530-533 [230 Cal. Rptr. 890] [reviewing cases defining "excess of jurisdiction" and cases holding excess of jurisdiction did or did not occur].) Where the trial court has exceeded its jurisdiction, "the need for review outweighs the risk of harassment" where there is no "danger of further trial or retrial." (People v. Superior Court (Howard) (1968) 69 Cal.2d 491, 501 [72 Cal. Rptr. 330, 446 P.2d 138].) No danger of "further trial or retrial" exists where a mandamus petition seeks review before trial has occurred. (Cf. People v. Superior Court (James B.) (1981) 122 Cal. App.3d 263, 268 [175 Cal. Rptr. 733] [petition to review order denying People's motion to find minor unfit for treatment under the Juvenile Court Law]; People v. Municipal Court (Gelardi), supra, 84 Cal. App.3d at p. 698 [review of unauthorized dismissal prior to trial].)
(1b) The petition in this case alleges a dismissal of a 602 petition based on a misinterpretation of section 654. If the People's contentions are correct, such a dismissal would clearly exceed the trial court's jurisdiction and the need for such review would outweigh any risk of harassment since there would be no danger of "further trial or retrial."
Where, as here, there is no appearance of the respondent or real party, the court considering the writ will deem established as correct all factual matters properly set forth in the application. (See Code Civ. Proc., §§ 1088, 1090, 1094; Rodriguez v. Municipal Court (1972) 25 Cal. App.3d 521, 526-527 [102 Cal. Rptr. 45].)
Section 654, in paraphrase, provides authority for a program of supervision of a minor in lieu of filing an adjudicatory petition under either sections 601 or 602.[3]
*1541 The pertinent part of that section provides "a probation officer, after investigation ... in lieu of filing a petition ... under Section 601 or ... Section 602 ..., and with consent of the minor and the minor's parent ..., delineate specific programs of supervision for the minor, for not to exceed six months, and attempt thereby to adjust the situation.... Nothing in this section shall be construed to prevent the probation officer from filing a petition or requesting the prosecuting attorney to file a petition at any time within the six-month period. If the probation officer determines that the minor has not involved himself or herself in the specific programs within 60 days, the probation officer shall immediately file a petition or request that a petition be filed by the prosecuting attorney...." (Italics added.)
After argument the trial court took note of the sentence emphasized and ruled as follows: "That's somewhat ambiguous, but it seems to me, looking at the entire scheme, is that they want you to do that [file a petition] within the six-month time frame. If you have an informal probation, for example, in an adult court on a [Penal Code section 1000], if you don't have the filing within whatever the probationary period is, six months or whatever is selected, seems to me that's jurisdictional." The court therefore held the instant petition untimely.
(3a) We agree with the trial court. The section envisions that the informal probation is to be of a strictly limited duration, namely, "for not to exceed six months."
(4) "`[W]hen language which is reasonably susceptible of two constructions is used in a penal law ordinarily that construction which is more favorable to the offender will be adopted....' [Citations.] Furthermore, when interpreting a statute, if its provisions are unclear, its purpose is paramount: we `should ascertain the intent of the Legislature so as to effectuate the purpose of the law.' [Citations.]" (People v. Davis (1981) 29 Cal.3d 814, 828 [176 Cal. Rptr. 521, 633 P.2d 186].)
(3b) The intent of the Legislature is clear. Minors coming within the purview of the section relinquish their rights to a formal adjudication under *1542 either sections 601 or 602. The agreement benefits all parties by providing a flexible, efficient and informal mode of adjusting the minor's disposition and behavior. In giving up such rights, however, the minor agrees to a supervision of definite duration.
If ambiguity existed, we would be constrained to uphold the dismissal, permitting the minor the advantage of reasonable doubt. However, we entertain no such doubt. While not a model of clarity, the statute twice refers to a six-month period. By including mention of this specific time period as appropriate for the abandonment of the informal probation and the filing of a formal petition, the Legislature has by implication excluded as inappropriate for filing the period beyond that limitation (see Pen. Code, § 4; see also Toussie v. United States (1970) 397 U.S. 112, 122-123 [25 L.Ed.2d 156, 165-166, 90 S.Ct. 858] [ambiguity in statute of limitations resolved in defendant's favor]; cf. In re Timothy E. (1979) 99 Cal. App.3d 349, 354 [160 Cal. Rptr. 256] [punitive authority of Juvenile Court Law strictly construed]).

DISPOSITION
The court below properly construed section 654 and dismissed as untimely the petition filed later than six months after the parties agreed to an informal probation. We therefore deny the peremptory writ. The alternative writ is discharged.
McDaniel, J., and Hews, J., concurred.
NOTES
[1]  All subsequent nondescript statutory references are to the Welfare and Institutions Code.
[2]  Even if we were to hold that the 1980 amendment to the first paragraph of section 800 extended the right of appeal to the People from adverse judgments under section 601 or 602 (see In re Maurice J. (1987) 193 Cal. App.3d 1579, 1584-1586 [239 Cal. Rptr. 195], petn. for review pending), it would still be appropriate to decide this matter as a writ proceeding because: (1) no interested party objected to the petition for the writ (cf. People v. Superior Court (1937) 10 Cal.2d 288, 291 [73 P.2d 1221] and Brown v. Superior Court (1966) 242 Cal. App.2d 519, 522 [51 Cal. Rptr. 633]); (2) we have already issued the alternative writ, necessarily determining the inadequacy of an appeal as a remedy (see People v. Superior Court (Douglass) (1979) 24 Cal.3d 428, 431 [155 Cal. Rptr. 704, 595 P.2d 139], and Mannheim v. Superior Court (1970) 3 Cal.3d 678, 686 [91 Cal. Rptr. 585, 478 P.2d 17]); (3) compelling the parties to proceed by way of appeal at this late stage would only cause unnecessary delay (cf. Brandt v. Superior Court (1967) 67 Cal.2d 437, 444 [62 Cal. Rptr. 429, 432 P.2d 31]); and (4) the question raised by the petition is one of first impression requiring the construction of a statute of statewide importance and the speediest resolution possible to avoid disruption of the ongoing juvenile probation process under section 654 in San Bernardino County (cf. Treber v. Superior Court (1968) 68 Cal.2d 128, 131 [65 Cal. Rptr. 330, 436 P.2d 330]). (See also 8 Witkin, Cal. Procedure (3d ed. 1985) Extraordinary Writs, §§ 104, 105, 118, pp. 741-743, 753-757.)
[3]  Section 654 provides, in relevant part: "In any case in which a probation officer, after investigation of an application for a petition or any other investigation he or she is authorized to make concludes that a minor is within the jurisdiction of the juvenile court or will probably soon be within that jurisdiction, the probation officer may, in lieu of filing a petition to declare a minor a dependent child of the court or a minor [sic] or a ward of the court under Section 601 or requesting that a petition be filed by the prosecuting attorney to declare a minor a ward of the court under Section 602 or subsequent to dismissal of a petition already filed, and with consent of the minor and the minor's parent or guardian, delineate specific programs of supervision for the minor, for not to exceed six months, and attempt thereby to adjust the situation which brings the minor within the jurisdiction of the court or creates the probability that the minor will soon be within that jurisdiction. Nothing in this section shall be construed to prevent the probation officer from filing a petition or requesting the prosecuting attorney to file a petition at any time within the six-month period. If the probation officer determines that the minor has not involved himself or herself in the specific programs within 60 days, the probation officer shall immediately file a petition or request that a petition be filed by the prosecuting attorney. However, when in the judgment of the probation officer the interest of the minor and the community can be protected, the probation officer shall make a diligent effort to proceed under this section."
