
781 P.2d 1188 (1989)
Robert P. KELLY, Special Administrator of the Estate of C.E. Bray, Deceased, Appellee,
v.
Jo ABBOTT, Appellant.
No. 69382.
Supreme Court of Oklahoma.
September 26, 1989.
Robert P. Kelly, Kelly & Gambill, Pawhuska, for appellee.
Steven L. Sessinghaus, Tulsa, for appellant.
*1189 ALMA WILSON, Justice:
The disposition of this appeal rests on the construction of 12 O.S.Supp. 1988, § 2012(G) and the correct procedural steps which must logically follow. The issues include whether or not a lawsuit which was dismissed for lack of capacity to sue may be amended even though the trial court failed to specify a time within which to amend as the statute requires; whether or not a summons is necessary upon the filing of the amended petition; and whether the appellant was given sufficient time under the statute to answer the amended petition before default judgment was given.
On June 27, 1986, the appellee, Kelly, filed a petition as administrator for the estate of C.E. Bray in which several defendants were named including the appellant, Jo Abbott. Ms. Abbott was served with process in person on July 9, 1986, according to the original record in this case. On July 25, 1986, the defendants, including Jo Abbott, filed motions to dismiss on the ground that the plaintiff lacked capacity to use. On October 14, 1986, the trial court found that the motion should be granted and dismissed the case without specifying a period of time in which the petition could be amended. An amended petition was filed on January 2, 1987. Summons was sent by certified mail, restricted delivery, to the appellant and subsequently forwarded by the post office to Ms. Abbott's sister who refused the letter.
On March 26, 1987, the trial court entered a court minute which stated that the plaintiff's motion for default judgment against Ms. Abbott would be granted on April 6, 1987, unless she made a sworn statement to the court prior to that date about her non-involvement in refusing the plaintiff's certified mailing. The court minute also noted that no one appeared for Jo Abbott. Abbott's attorney filed a Special Appearance and Motion to Dismiss on April 16, 1987, in which she moved to dismiss on the ground that the plaintiff lacked capacity to sue; that the lawsuit could not be revived by simply filing an amended petition rather than a new lawsuit; and that "she was neither served nor did she refuse the service as described in the affidavit filed by her sister." The affidavit referred to was filed January 26, 1987, and stated that the certified letter had been forwarded to the sister's address; that it was not the appellant's "usual place of abode and she does not live here." The appellant's sister further stated that she had no authorization to receive certified mail and therefore she refused the mail without the knowledge or consent of the appellant.
Subsequent to Ms. Abbott's special appearance, the trial court, on May 7, 1987, denied the motion to dismiss, and by order filed on May 21, 1987, granted a default judgment against Ms. Abbott. The appellant then filed a motion on June 22, 1987, to vacate and set aside the judgment, which was denied by the trial court on July 17, 1987. From that order Ms. Abbott timely appealed.
*1190 First, we must address whether an amended petition was proper, or whether a new lawsuit should have been filed. The answer to that question depends upon the construction of 12 O.S.Supp. 1988, § 2012(G), (1984 Okla. Sess. Laws, ch. 164, § 12). The new Pleading Code provides for the amendment of a petition upon the granting of a motion to dismiss where the defect can be remedied. Section § 2012(G) provides:
FINAL DISMISSAL ON FAILURE TO AMEND. On granting a motion to dismiss a claim for relief, the court shall grant leave to amend if the defect can be remedied and shall specify the time within which an amended pleading shall be filed. If the amended pleading is not filed within the time allowed, final judgment of dismissal with prejudice shall be entered on motion except in cases of excusable neglect. In such cases amendment shall be made by the party in default within a time specified by the court for filing an amended pleading. Within the time allowed by the court for filing an amended pleading, a plaintiff may voluntarily dismiss the action without prejudice.
Because the statute provides that the trial court "shall" grant leave to amend if the defect can be remedied, the duty is mandatory. Schaeffer v. Schaeffer, 743 P.2d 1038, 1040 (Okla. 1987). The Committee Comment to Section 2012 states that:
The policy of the Oklahoma Pleading Code of deciding cases on the basis of the substantive rights involved rather than technicalities requires a plaintiff to be given every opportunity to cure a formal defect in his pleading. Under subsection G of Section 2012 the court must allow the plaintiff an opportunity to amend the petition within a specified time and should not dismiss the action, unless it appears to a certainty that the plaintiff cannot state a claim. Only if the plaintiff does not amend within the prescribed time will the action be dismissed with prejudice. [Emphasis added.]
In the case at bar, the trial court failed to set a time to file an amended petition. Eleven weeks and three days after the trial court dismissed, the appellee filed his amended petition. Because the trial court was obligated by statute to allow the amendment of the petition in the case at bar, no error was committed by the trial court in allowing the appellee to proceed based upon the amended petition.
But was the eighty day period which the appellee waited to file his amended petition too late? One problem with the use of the term "dismiss" in § 2012(G) is that when a case is dismissed, at some point in time the trial court loses jurisdiction. For example, once a voluntary dismissal has been entered, the trial court is without further jurisdiction in the case, and this Court has recently held that an amended petition will not operate to avail a party of the saving provisions of 12 O.S. 1981, § 100 as there is no cause pending subject to amendment. Wiley Electric, Inc. v. Brantley, 760 P.2d 182, 186 (Okla. 1988). But unlike Wiley which depended upon the construction of 12 O.S. 1981, § 100, the case at bar depends upon the construction of 12 O.S.Supp. 1988, § 2012(G) which specifically provides for an amendment even though the case was "dismissed" by the trial court. Another example of the loss of jurisdiction occurs after thirty days from the rendition of judgment where up to that time, a trial court may correct, open, modify or vacate the judgment. American Bank of Oklahoma v. Adams, 514 P.2d 1191, 1193 (Okla. 1973). But § 2012(G) sets no time limit within which the trial court must act, and does not provide for the loss of jurisdiction until the trial court gives a "final judgment of dismissal."
In the new Pleading Code the motion to dismiss, 12 O.S.Supp. 1988, § 2012(B), has replaced the demurrer to the petition, 12 O.S. 1981, § 267, citing many of the same grounds. Concerning whether or not a demurrer to the petition was a final judgment, this Court held in Merchants Delivery Service v. Joe Esco Tire Co., 497 P.2d 766 (Okla. 1972), that such an order was not a final order because the plaintiffs in that *1191 action were still free to move to amend their petition. See also Lawrence v. Cleveland County Home Loan Authority, 626 P.2d 314, 316 (Okla. 1981). Similarly, where a trial court has dismissed under § 2012(G), and the defect can be remedied, the dismissal is not a final order.
One must conclude by the use of the term "final judgment of dismissal," in § 2012(G) that the granting of the initial motion to dismiss was an interlocutory dismissal and therefore does not have the same effect as a final judgment, but may ripen into a final judgment upon the motion of the adverse party if the pleading is not amended within the time set by the trial court. Because the statute does not provide for a specified time to be set, the trial court must set a reasonable time within which the amended pleading must be filed. The record does not reveal that the appellant made any motion to set a time within which an amendment must be filed. Because the appellant would be the party benefited by the limitation of time in which to file an amended petition, it was in her interest to assure that a time was set according to statute. Because the appellee's amendment was subsequently sanctioned by the trial court, we conclude that the court must have determined that the defect was curable, and that in fact, the defect was cured. See Frazier v. Bryan Memorial Hospital Authority, 775 P.2d 281, 286 (Okla. 1989).
Having found that amendment of appellee's petition was proper, we next address the issue of service of process upon the appellant of the amended petition. As stated above, the record reveals that the appellant was served in person with the original petition July 9, 1986, and that Michael Fairchild appeared as the appellant's attorney and filed the appellant's first motion to dismiss on July 25, 1986. The only issue included in that motion to dismiss was the lack of the plaintiff's capacity to sue. That defense is one which may be raised by motion to dismiss according to 12 O.S.Supp. 1988, § 2012(B). But by failing to raise insufficiency of process in that first motion, the appellant waives that defense. Subsection F of § 2012 provides:
1. A defense of lack of jurisdiction over the person, improper venue, insufficiency of process, insufficiency of service of process, failure to state a claim upon which relief can be granted, or lack of capacity of a party to be sued is waived:
a. if omitted from a motion that raises any of the defenses or objections which this section permits to be raised by motion... .
(Emphasis added.) Having waived that defense, the next question is what type of service was proper for the amended petition? Title 12 O.S.Supp. 1988, § 2005(B) provides:
SERVICE: HOW MADE. Whenever pursuant to this act service is required or permitted to be made upon a party represented by an attorney the service shall be made upon the attorney unless service upon the party himself is ordered by the court or final judgment has been rendered and the time for appeal has expired. .. . [1985 Okla. Sess. Laws, ch. 277 § 6.]
The record does not explicitly reveal whether or not a copy of the amended petition was sent to Michael Fairchild. The record reflects that the trial court attempted to determine if the defendant-appellant had been personally served, which was not a requirement upon an amended petition. However, in the "Special Appearance and Motion to Dismiss" there is no allegation that the appellant's attorney failed to receive a copy of the amended petition, but only an allegation that the appellant did not receive a copy of the petition. Because Mr. Fairchild refers to the amended petition in the motion, it is clear that he had sufficient notice of it.
As we have determined that amendment of the petition was proper, and the service of the amended petition upon the appellant's attorney was proper, we finally address whether the appellant was given a sufficient time under the statute to answer the amended petition before default judgment was given. Subsection A of § 2012 provides:

*1192 The service of a motion permitted under this section or a motion for summary judgment alters these periods of time [for answering the petition] as follows, unless a different time is fixed by order of the court: if the court denies the motion or postpones its disposition until the trial on the merits, the responsive pleading shall be served within twenty (20) days after notice of the court's action.
On May 7, 1987, the trial court denied appellant's motion. By statute, unless the trial court set a different time for answer, the appellant had twenty days to answer the amended petition. However, on May 21, 1987, the trial court granted a default judgment against the appellant referring back to its order of March 26,1987, which required a sworn affidavit from the appellant by April 6, 1987, or default judgment would be granted. Such an order does not conform to the statute cited. Because the trial court's granting of default judgment was premature, the judgment must be reversed and remanded for disposition not inconsistent with this opinion.
CERTIORARI PREVIOUSLY GRANTED; COURT OF APPEALS DECISION VACATED; JUDGMENT OF THE TRIAL COURT REVERSED AND REMANDED.
HARGRAVE, C.J., and HODGES, LAVENDER, DOOLIN and KAUGER, JJ., concur.
OPALA, V.C.J., concurs in result.
SUMMERS, J., concurs in part, dissents in part.
SIMMS, J., dissents.
