
239 Ind. 132 (1958)
155 N.E.2d 125
ON THE RELATION OF ROSENBARGER
v.
MARION CIRCUIT COURT, CLARK, SPECIAL JUDGE.
No. 29,720.
Supreme Court of Indiana.
Filed January 7, 1958.
*133 Eugene M. Fife, Jr., of Indianapolis, for relator.
Frank Morton, and Jacobs, Mazelin & Jacobs, both of Indianapolis, for respondents.
ACHOR, J.
This is an action for writ of mandate. The facts in the case are as follows:
Relator, the father of a child, filed an action for Writ of Habeas Corpus in the respondent court, claiming that Carl L. Spencer and Pearl Spencer, maternal grandparents of said minor child, unlawfully detained the custody of his child. A judgment unappealed from was rendered on February 26, 1953. The judgment granted custody of the child to the Spencers, but made the child a ward of the court, all "subject to the continuing jurisdiction of this court."
On January 2, 1958 relator filed his petition in the same action, in the same court, alleging a change of circumstances subsequent to the judgment and, upon the basis of this change of circumstances, asked the trial court to modify its previous decree concerning the care and custody of the child.
The respondent court dismissed the petition to modify on the ground that it had no jurisdiction to modify the decree after the term in which the judgment was rendered.
This court issued a temporary writ requiring respondent to reinstate relator's petition and to assume jurisdiction *134 of the cause and to show cause why the writ should not be made permanent.
As a general rule all cases must be heard on the merits, unless one of the statutory grounds for dismissal is made to appear, or unless the court has no jurisdiction. The power to hear and decide carries with it the duty to do so. Mandate will lie to require an inferior court to hear the merits of a cause where it was improperly dismissed by the court. We therefore proceed to consider the question as to whether the respondent court had jurisdiction to hear and determine relator's petition to modify the judgment in habeas corpus after the expiration of the term during which it was rendered.
In support of the position, relator urges that by reason of the nature of the proceeding courts, in all habeas corpus proceedings involving the welfare and custody of children, retain continuing jurisdiction over the parties and the subject matter. In support of this position relator cites the fact that, in actions for divorce, courts of general jurisdiction exercise continuing jurisdiction over the children of the parties, and therefore have the power in the same proceeding to modify the decree of custody, on showing a different state of facts subsequently arising affecting the welfare of the children, with such notice to the parties as is reasonable under the circumstances. Scott v. Scott (1949), 227 Ind. 396, 86 N.E.2d 533. Relator then argues that, by reason of the fact that in both actions the primary concern is the welfare of the child, the same procedure should apply. The answer to this argument is that courts retain only such continuing jurisdiction after final judgment as they are permitted to retain by the judgment itself, or as is given them *135 by statute.[1] Courts are given continuing jurisdiction over the custody of children in divorce actions, by statute. They are not given such statutory authority in habeas corpus proceedings.
Although habeas corpus developed primarily as an action in law, it was also employed by courts of equity.[2] Therefore, where the action is in equity and the welfare of the children rather than strict legal rights is of basic concern, there is authority for and good reason why the court, in resolving the issue before it, might retain jurisdiction over the children and the parties as the equities require when entering a decree of custody. It may well be that the conditions and circumstances surrounding the children, even as they exist at the time of such decree, must be tested by experience before the court can determine whether the arrangement should be made final. Therefore, it is proper and consistent with the nature of the action that the court may enter a decree, interlocutory in character,[3] by which it determines the custody of the children, subject to further and final disposition of the case.
The general rule upon this issue has been stated as follows:
"... It is generally held that the doctrine of res judicata applies to a habeas corpus proceeding to determine the custody of a child, the adjudication therein being conclusive, in a like subsequent proceeding, between the *136 same parties, on the same state of facts. Such adjudication does not, however, have this effect in a subsequent proceeding where a materially different state of facts and circumstances is made to appear;..." 39 C.J.S., § 45, pp. 582-583.
However, within and as an exception to the general rule stated above, it has also been held that,
"The court may (in habeas corpus proceedings) properly retain jurisdiction by reservations in the order providing that the parties may apply for, and the court may grant, such further orders as may be necessary to preserve and protect the rights of the parties under the order, or as may be required by the welfare of the child or changed conditions and circumstances.[4] Where the court has retained a continuing jurisdiction by proper reservations in the order, it may exercise the jurisdiction as occasion may require,[5] and make such modified or further order as it deems wise.[6] In such case it may modify the order on reasonable notice to the parties; the notice or summons required by statutes relating to the modification of judgments is not necessary."[7] 39 C.J.S., § 44, pp. 581-582.
The above rule is based upon sound reason. However, in support of his position respondent cites the case of Scheiring v. Baker (1931), 202 Ind. 678, 682, 177 N.E. 866, as establishing a contrary rule of law in this state. Particularly he relies upon the following statement in that case:
"Ordinarily, a motion to modify a judgment must *137 be made when the cause is still in fieri (Canthorn v. Bierhaus [1909], 44 Ind. App. 362, 88 N.E. 314). A valid judgment in a case for writ of habeas corpus is as impregnable after the term of court at which it was rendered as a judgment in any civil action; much less has a court the power upon a motion to modify, made at a term of court subsequent to the term at which the judgment was rendered, to review a finding made under the issues tried, and enter a different finding and judgment. Hannah v. Dorrell (1881), 73 Ind. 465."
We find no fault with the above statement of law, as applied to the facts in that case. In that case this court was confronted with a judgment which did not presume to retain continuing jurisdiction over the parties and the subject matter, but was complete and conclusive upon its face. Therefore, the court had no jurisdiction over the parties after term to modify the judgment or enter a different judgment, except upon the re-filing of a formal petition, setting forth a different state of facts subsequently arising and affecting the child's welfare, with statutory notice to the parties.
However, in the case at bar the court, by its decree, expressly retained jurisdiction over the parties and the subject matter. Therefore, upon the filing of relator's petition to modify, and upon such notice to the parties as was reasonable in the sound discretion of the court, it was the duty of the respondent court to consider the matters asserted in relator's petition upon their merits.
The writ of mandate is therefore made permanent.
Landis, C.J., Arterburn and Bobbitt, JJ., concur.
Jackson, J., not participating.
NOTE.  Reported in 155 N.E.2d 125.
NOTES
[1]  §§ 3-1219 and 3-1219a, Burns' 1946 Repl. (1957 Supp.) Stone v. Stone (1902), 158 Ind. 628, 633, 64 N.E. 86, See also, Manners v. State (1936), 210 Ind. 648, 5 N.E.2d 300.
[2]  Habeas corpus originated in England, before the Magna Carta, as a writ by which both the superior courts of the common law and, also, the chancellor extended their jurisdiction over inferior courts. Thus the proceeding or action has a history in both law and equity. See 25 Am. Jur., § 3, pp. 144-145.
[3]  19 Am. Jur., § 418, p. 288.
[4]  Andrews v. Andrews (1915), 117 Ark. 90, 173 S.W. 850.
[5]  Dixon v. Dixon (1907), 72 N.J. Eq. 588, 66 Atl. 597.
[6]  State ex rel. De Bit v. Superior Court (1918), 103 Wash. 183, 173 Pac. 1014.
[7]  State ex rel. De Bit v. Superior Court, supra.
