
188 Cal.App.3d 917 (1987)
233 Cal. Rptr. 720
THE PEOPLE, Plaintiff and Respondent,
v.
DAVID LEE ZETSCHE, Defendant and Appellant.
Docket No. 14591.
Court of Appeals of California, Third District.
January 15, 1987.
*919 COUNSEL
Bruce R. Borad, under appointment by the Court of Appeal, for Defendant and Appellant.
John K. Van de Kamp, Attorney General, and J. Robert Jibson, Deputy Attorney General, for Plaintiff and Respondent.
*920 OPINION
REGAN, Acting P.J.
Defendant David Lee Zetsche appeals from the judgment following his guilty plea to one count of conspiracy to manufacture and sell methamphetamine (Pen. Code, § 182).[1] Defendant contends his section 995 motion to dismiss should have been granted on the ground the court's failure to bring him to trial within 120 days of his arrival in California after being transported from Oregon violated article IV of section 1389, commonly referred to as the Interjurisdictional Agreement on Detainers and simply called the Agreement on Detainers in California (Agreement). (1) (See fn. 2) The essential question before us is whether as a presentence detainee defendant was entitled to the protections afforded by the Agreement.[2] We hold the Agreement applies only to sentenced jail inmates serving a term of imprisonment. Accordingly, we conclude defendant's rights under the Agreement were not violated.

FACTS
The facts relating to the crime itself are not relevant to the issue at hand and therefore only a recitation of the procedural background of the case is included.
On September 7, 1983, defendant was arrested and a complaint was filed with the Calaveras County Justice Court charging him with conspiracy to manufacture and sell methamphetamine and other crimes. The matter was continued on several occasions with defendant waiving his right to a timely preliminary hearing at each hearing. Approximately one year after his arrest defendant failed to appear at a preliminary hearing and a bench warrant was issued.
*921 On October 3, 1984, defendant was arrested in Oregon on unrelated charges and held in the Jackson County jail in Medford. That same day, Calaveras County notified Jackson County of the outstanding warrant. In addition, a "detainer" dated October 3, 1984, was prepared which lists Calaveras County as the "requesting agency."
Three weeks later William Juba, a Jackson County Deputy District Attorney, filed an affidavit in support of a motion to transport defendant to Calaveras County. Juba averred he had been informed by Calaveras County officials that defendant agreed to enter a negotiated guilty plea to the California charges. The motion was granted and defendant was released to the custody of Calaveras County deputy sheriffs and transported to California on October 25, 1984.
At a hearing held one week after his release, defendant informed the court of his election to conclude the matter in Oregon before pleading to the California charges. Defendant stated he understood that because of his request the proceedings against him in California might have to be continued for months, and agreed to waive his right to a timely preliminary hearing. Based on defendant's waiver, the court scheduled a preliminary hearing for February 5, 1985. On or about November 5, 1984, defendant was transported back to Oregon where he was eventually sentenced to one year in the Jackson County jail.
On February 21, 1985, the Calaveras County Justice Court ordered the Calaveras County Sheriff to remove defendant from the custody of the Jackson County jail and transport him to California. Defendant arrived in California either on February 21 or 22, 1985. Four days later, defendant appeared before the Calaveras County Justice Court and moved to dismiss the charges on the basis of article IV of the Agreement, in that more than 120 days had elapsed following his initial transportation to California on October 25, 1984. Eventually defendant's motion was denied, then renewed before a different justice court judge, and denied again. On each occasion defendant waived time with the exception of his rights under the Agreement.
On April 17, 1985, defendant waived his right to a preliminary hearing and agreed to answer the charges in superior court under the following conditions: (1) that he would be permitted to raise issues relating to the Agreement on a section 995 motion; and (2) if the court denied the motion he would be permitted to enter a guilty plea to conspiracy to manufacture and sell methamphetamine in exchange for dismissal of the remaining charges against him. On June 4, 1985, defendant's section 995 motion was denied in superior court. On June 20, 1985, defendant pled guilty as agreed.


*922 DISCUSSION
The Agreement is contained in chapter 8.5 of title 10 of part II of the Penal Code. (§ 1389 et seq.) The articles of the Agreement are found in section 1389.[3] The general purpose of the Agreement is set forth in article I which provides "that charges outstanding against a prisoner, detainers based on untried indictments, informations or complaints, and difficulties in securing speedy trial of persons already incarcerated in other jurisdictions, produce uncertainties which obstruct programs of prisoner treatment and rehabilitation. Accordingly, it is the policy of the party states and the purpose of this agreement to encourage the expeditious and orderly disposition of such charges and determination of the proper status of any and all detainers based on untried indictments, informations or complaints." (2) As observed by the court in United States v. Ford (2d Cir.1977) 550 F.2d 732, at pages 737-741, and later by the United States Supreme Court in Carchman v. Nash (1985) 473 U.S. 716, [87 L.Ed.2d 516, 520-521, 105 S.Ct. 3401], the Agreement was adopted to remedy the adverse consequences of dormant detainers, including the likelihood that prisoners with detainers lodged against them would be barred from participating in special prison work programs, athletic programs and privileges, or would be deemed ineligible for parole or concurrent sentencing. It was perceived that prisoners with outstanding detainers who were denied these privileges had little incentive to perform well in prison.
To implement this policy, the Agreement establishes two alternate and distinct mechanisms for dealing with detainers based on outstanding charges, each containing a different statutory time limitation. (See Marshall v. Superior Court (1986) 183 Cal. App.3d 662, 664 [228 Cal. Rptr. 364]; People v. Cella, supra, 114 Cal. App.3d at pp. 916-917; see also People v. Castoe (1978) 86 Cal. App.3d 484, 489-490 [150 Cal. Rptr. 237].) Article III sets out the terms by which a prisoner may request final disposition of outstanding charges connected with a detainer. It provides that whenever a person has entered upon a term of imprisonment, and whenever during the continuance of that imprisonment there are pending in another jurisdiction any untried charges, that person shall be entitled to prompt notice of his right to request final disposition of the charges. Subdivision (d) of article III provides that the prisoner is entitled, upon the appropriate request for final disposition, to have all untried charges underlying the detainer tried within 180 days.
*923 Article IV provides a mechanism by which the prosecutor who has filed a detainer against a prisoner in another jurisdiction can secure his presence for disposition of the outstanding charges. The prosecutor need only present to the officials of the jurisdiction incarcerating the prisoner "a written request for temporary custody or availability...." (Art. IV, subd. (a).) Subdivision (c) of article IV further provides in part: "In respect to any proceeding made possible by this Article, trial shall be commenced within one hundred twenty days of the arrival of the prisoner in the receiving state, ..." Subdivision (e) of article IV provides in part: "If trial is not had on any indictment, information or complaint contemplated hereby prior to the prisoner's being returned to the original place of imprisonment ..., such indictment, information or complaint shall not be of any further force or effect, and the court shall enter an order dismissing the same with prejudice."
Thus, article III proceedings are initiated by a request from the prisoner, while article IV proceedings are commenced by a request by the prosecutor.

A.
(3a) Defendant contends the charges against him in California should have been dismissed because he was not brought to trial within the 120-day time limitation contained in article IV, subdivision (c). Defendant argues the 120-day limitation began to run on October 25, 1984, the date he was first transported to California, and lapsed by the time he filed his motion to dismiss on February 26, 1985. We disagree. On October 25, 1984, defendant was a mere pretrial detainee. As such, he was not entitled to the protections afforded by the article IV. Our reasons follow.
Subdivision (a) of article IV provides in relevant part: "The appropriate officer of the jurisdiction in which an untried indictment, information or complaint is pending shall be entitled to have a prisoner against whom he has lodged a detainer and who is serving a term of imprisonment in any party state made available in accordance with Article V(a) hereof upon presentation of a written request for temporary custody or availability to the appropriate authorities of the state in which the prisoner is incarcerated: ..." (4) The proper interpretation of the Agreement presents a question of federal law. (Cuyler v. Adams (1981) 449 U.S. 433, 442 [66 L.Ed.2d 641, 648, 101 S.Ct. 703]; People v. Higinbotham (1986 Colo.) 712 P.2d 993, 1000.) (3b) In defining the scope of article IV the courts have focused on requirements that (1) the prisoner is serving a "term of imprisonment"; (2) there is pending in another state "an untried indictment, information or complaint"; and (3) a "detainer" has been lodged. (See Carchman v. Nash, supra, 473 U.S. at p. 724 [87 L.Ed.2d at p. 523]; United States v. Roberts (6th Cir.1977) 548 F.2d 665, 670-671; United States v. Reed (9th Cir.1980) *924 620 F.2d 709, 711; see also People v. Castoe, supra, 86 Cal. App.3d at pp. 489-490.) Numerous federal courts have construed the Agreement's reference to "a term of imprisonment" as referring only to convicted prisoners, not to pretrial detainees. (See United States v. Glasgow (6th Cir.1985) 790 F.2d 446, 448,; United States v. Maldonado (D.C.W. Va. 1985) 601 F. Supp. 502; United States v. Wilson (10th Cir.1983) 719 F.2d 1491; United States v. Reed, supra, 620 F.2d at p. 711.) The courts have arrived at this interpretation for two reasons, both of which are based implicitly on an appreciation that the Agreement should be construed "so as to effectuate its purposes." (Art. IX.)
First, the Agreement seeks the "orderly" disposition of outstanding charges. (Art. I.) Such would not necessarily be the case if the Agreement were applied to pretrial detainees. For example, in United States v. Roberts, supra, 548 F.2d 665, the prisoner was being held at a detention center because he was unable to make bail on pending charges. He argued that he was serving a term of imprisonment within the meaning of the Agreement. The court disagreed, stating that to extend the Agreement to pretrial detainees would be inconsistent with article III. (Id., at p. 670.) The court reasoned if the Agreement applied to pretrial detainees, the prisoner could, under article III, "wait until his trial was set in the jurisdiction where he was detained and then make a request which would require that he be transferred to another jurisdiction for trial, possibly disrupting the trial schedule of the first jurisdiction." (Id., at pp. 670-671.)
Secondly, the agreement was intended to cure the disadvantages of the detainer system inuring to sentenced prisoners who had entered the life of the institution to which they had been committed. (Art. I.) Because pretrial detainees are not ordinarily involved in institutional treatment or rehabilitative programs, the potential for abuse of the detainer system is not present. Since the nature of a detainee's continued confinement is uncertain and contingent upon the outcome of the trial and the imposition of sentence, "a pretrial detainee [does not have] a sufficient interest in the rehabilitation programs of his confining institution to justify invocation of the [Agreement]. [Citations.]" (People v. Reed, supra, 620 F.2d at p. 711.)
Thus, we conclude that on October 25, 1984, when defendant was transported to California as a mere presentence detainee, he was not entitled to the protections afforded by the Agreement. It was not until defendant was sentenced to one year in county jail in Oregon on January 10, 1985, that the Agreement applied. However, at that point defendant had yet another hurdle to clear. Article IV, subdivision (c) mandates that trial shall be commenced within 120 days of the "arrival" of the prisoner in the receiving state. In the case at bench defendant did not arrive in California as a *925 sentenced and incarcerated prisoner until either February 21 or 22, 1985. In that regard, the record shows defendant's trial was scheduled for June 18, 1985, well within 120 days of February 21 or 22, 1985. In addition, by our calculation no more than 119 or 120 days had elapsed when defendant entered his guilty plea on June 20, 1985. Under article IV of the Agreement, dismissal was not required.

B.
(5a) Defendant also contends that the charges against him should have been dismissed because, contrary to subdivision (c) of article III, the director of the Jackson County jail did not notify him of his right to make a request for final disposition of the outstanding charges in California. Article III, subdivision (c) provides: "The warden, commissioner of corrections or other official having custody of the prisoner shall promptly inform him of the source and contents of any detainer lodged against him and shall also inform him of his right to make a request for final disposition of the indictment, information or complaint on which the detainer is based." Defendant cites People v. Lincoln (Colo. App. 1979) 601 P.2d 641, and People v. Gonzalez (Colo. App. 1979) 601 P.2d 644, for the proposition that a defendant is entitled to dismissal of the charges against him as a sanction for a violation of the prompt notification requirement in article III, subdivision (c).
We reject defendant's argument for two reasons. Firstly, at no time did defendant assert below his statutory right to prompt notice. Defendant's motion to dismiss was premised entirely on article IV. Thus, by failing to assert his right to prompt notice, defendant is deemed to have waived it. (See People v. Moody (Colo. 1984) 676 P.2d 691, 695 ["[t]o discourage piecemeal litigation and to promote the finality of judgments, prisoner's rights under [the Agreement] are waived if they are not asserted prior to or during trial."])
Secondly, with respect to sanctions for violations of the prompt notification requirement, we agree with the opinions of the Colorado Supreme Court in People v. Higinbotham, supra, 712 P.2d at pages 998-999, and Sweaney v. Dist. Court, Eighteenth Jud. Dist. (Colo. 1986) 713 P.2d 914, 918. These cases stand for the proposition that since the Agreement does not contain any express sanctions for a violation of article III, subdivision (c), automatic dismissal is not required as a remedy if the defendant was not prejudiced.
(6) (See fn 4), (5b) Here, as noted, defendant did not enter into a term of imprisonment until sentenced in Oregon on January 10, 1985. Defendant has no rights under the Agreement until that date.[4] Thus, even if it can be *926 assumed that defendant could show that the remaining conditions under article III would have been met on January 10, 1985, the prosecution would have 180 days from that date in which to bring the matter to trial. (Art. III.) As it was, the court set the matter for trial on June 18, 1985, and defendant pled guilty on June 20, 1985. On June 20, 1985, only 161 days had elapsed. Accordingly, having been "tried" well within article III's 180-day limit, defendant was not prejudiced by any failure of the director of the Jackson County jail to inform him of his right to request a final disposition of the California charges.
The judgment is affirmed.
Sparks, J., and Sims, J., concurred.
NOTES
[1]  All statutory references are to the Penal Code.
[2]  Defendant's guilty plea does not operate as a waiver of this issue on appeal. Section 1237.5 provides that no appeal shall be taken from a judgment of conviction upon a plea of guilty, except where the defendant has filed a written statement showing reasonable constitutional, jurisdictional, or other grounds going to the legality of the proceedings and the trial court has executed and filed a certificate of probable cause of such appeal. Pursuant to that section, defendant filed a written statement contesting the proceedings in Calaveras County and the trial court executed and filed a certificate of probable cause for this appeal. The right to uninterrupted rehabilitative incarceration and to dismissal for a violation of that right contained in section 1389, articles III (d) and IV (e) relate to the power of the prosecution to proceed against the defendant. A challenge of that power calls into question "`the legality of the proceedings.'" (People v. Cella (1981) 114 Cal. App.3d 905, 915, fn. 5 [170 Cal. Rptr. 915], citations omitted.) Since the grounds urged for reversal do not challenge defendant's guilt but instead raise issues which would preclude the state from prosecuting him despite his guilt, defendant may raise those issues with a certificate of probable cause. (People v. Turner (1985) 171 Cal. App.3d 116, 126-127 [214 Cal. Rptr. 572].)
[3]  Virtually every state, including Oregon, has adopted the Agreement. (See Ore. Rev. Stat. ch. 135.775 (1984); see also United States v. Mauro (1978) 436 U.S. 340, 343 [56 L.Ed.2d 329, 336, 98 S.Ct. 1834].)

For brevity's sake, we refer simply to pertinent articles of the Agreement by number without repeated citations to section 1389.
[4]  In the same manner as article IV, article III applies only to "a person who has entered upon a term of imprisonment in a penal or correctional institution of a party state." In addition, article III does not apply unless the following have occurred: (1) the person named in the indictment, information or complaint is a prisoner serving time in a foreign jurisdiction; (2) the district attorney lodges a detainer based on such untried indictment, information or complaint; and (3) the prisoner has substantially complied with the procedural requirements of article III, subdivision (a). If any one of these conditions is absent, article III does not apply. (Cf. People v. Castoe, supra, 86 Cal. App.3d at pp. 489-490.)
