
194 Cal.App.2d 240 (1961)
EVERT L. HAGAN, Appellant,
v.
JOSEPH W. FAIRFIELD et al., Respondents.
Civ. No. 24851. 
California Court of Appeals. Second Dist., Div. Three.  
July 25, 1961.
 Evert L. Hagan, in pro. per., and Jesse A. Hamilton for Appellant.
 Ethelyn F. Black and Max H. Gewirtz for Respondents.
 FORD, J.
 The demurrer of the respondents Joseph W. Fairfield, Vid Rosner and Miriam Benjamin to the appellant Hagan's amended complaint was sustained without leave to amend. At the same time, the respondents' motion to dismiss the action on the ground that it was sham and frivolous was granted. The appellant has appealed from the judgment entered pursuant thereto.
 A complaint containing one cause of action was filed on April 7, 1959, wherein part of the relief sought was that the defendants be compelled to register the shares of stock of the plaintiff Hagan on the books of Benedict Heights, Inc., and to issue a new certificate in his name evidencing such shares. The present respondents were named as parties defendant. Summons was issued. The respondents did not plead to the original complaint. On June 26, 1959, the appellant Hagan obtained an order that Charles M. Farrington be brought into the action as a coplaintiff. An amended complaint was thereupon filed.
 Several causes of action are alleged in the amended complaint, the substance of the first thereof being as follows: 1. Benedict Heights, Inc., is a California corporation; upon or about March 1, 1951, the officers and directors were five persons, including the respondents Benjamin and Rosner; "in about 1952, all of the said officers and directors relinquished and delegated all of their activities and duties as directors and officers in said Corporation, to Joseph W. Fairfield, and turned over to Joseph W. Fairfield, all the books, papers, records and dominion and control of all assets of said corporation; that since said date, said Corporation has not actively engaged in business, but that since said date all of the said Corporation's activities have been done and performed by said Fairfield, acting as managing agent of said Corporation without proper, or any, authority." 2. In 1957, 1958 and 1959 plaintiffs (the appellant and Farrington) purchased *243 from various stockholders of the corporation shares of its stock; the certificates were endorsed and delivered to the plaintiffs by the sellers; the plaintiffs are now the owners and holders "of approximately 50 or more per cent" of the issued and outstanding shares of the corporation. 3. On or about September 20, 1957, and on March 13, 1959, "plaintiff [sic] made written demand upon defendants Joseph W. Fairfield, Vid Rosner, and Miriam Benjamin demanding that plaintiff's said Certificates be registered on the books of Benedict Heights, Inc., and that plaintiffs be permitted a shareholder's inspection of the books and records of said Corporation," but the persons named refused to honor such demands. 4. Fairfield, while acting as agent and manager of the corporation, collected monies due to the corporation, and made disbursements without any authorization from the board of directors, and threatens to continue to do so; there has been no accounting to the stockholders or to the last board of directors of the corporation as to any transactions Fairfield has carried out since about 1952; there have been no meetings of stockholders or of directors since about 1952; Vid Rosner was the last elected president and Miriam Benjamin the last elected secretary of the corporation; both "disclaim having had anything to do with the Corporation for several years last past" and "presently disclaim any and all responsibility and authority as de facto officers and directors of said corporation"; Fairfield "refuses to give any information to stockholders concerning any of the affairs" of the corporation. 5. All of the assets of the corporation "are under the domination and control of Joseph W. Fairfield"; 6. The "fictitious Corporate person has for all practical purposes, disappeared, and for that reason Benedict Heights, Inc., has not been made a party to this proceeding." 7. "Benedict Heights, Inc., now own the approximate sum of $8000.00 cash and an uncollected Judgment in the approximate sum of $27,000.00." 8. In September 1957, Fairfield, purportedly as an attorney for the corporation, filed an action "in this Court" to dissolve the corporation and procured service on the corporation by serving the Secretary of State. Under the prayer of the amended complaint, the relief sought by virtue of the first cause of action is "an appropriate order requiring the defendants" to register the plaintiffs' shares of stock on the books of the corporation.
 The allegations of the first cause of action are incorporated by reference in the second cause of action. In addition, it is *244 alleged: 1. On June 2, 1959, the registered owner of share No. 26 upon the books and records of the corporation executed and delivered to the plaintiff Hagan a proxy "making him agent and attorney in fact to vote said share in all stockholder's meetings." 2. In an action entitled Benedict Heights, Inc., v. Albert Lienhardt et al., a judgment was entered cancelling a deed from the corporation to Lienhardt of 9 lots and adjudging that the defendants receive from the plaintiff $977.73 on account of certain improvements; that thereafter the defendants Benjamin and Rosner, at the direction of Fairfield, executed a deed to the lots to Fairfield as grantee; "no director's or stockholders meeting was held authorizing said transaction"; Fairfield paid $977.73 to "Lienhardt et al." but no consideration was paid to the corporation. 3. On December 2, 1952, "the defendants Rosner and Benjamin, as President and Secretary respectively executed a deed to one Mary Gold covering approximately 33 acres of land then owned" by the corporation; the 33 acres then "constituted the principal, main, and only valuable asset of the corporation"; "no other directors were notified of said transfer nor was a meeting of stockholders held approving said transfer, nor did 51% of the stockholders consent in writing"; Mary Gold executed a deed of trust in favor of the corporation in the principal sum of $9,300; within two weeks thereafter Mary Gold procured a loan upon the 33 acres in the principal sum of $55,000. The relief sought under the second cause of action is that the defendants be enjoined from transferring or disbursing any assets of the corporation until the election of a new board of directors.
 In the third cause of action, all of the allegations of the first cause of action are incorporated by reference as are the allegations of the second cause of action as to the proxy given to the plaintiff Hagan. It is further alleged as follows: 1. For the past six years there has been no meeting of the stockholders and no election of a board of directors of the corporation. 2. On June 11, 1959, the "plaintiffs notified by United States mail each and all of the defendants of his [sic] stock ownership and requested that a stockholders meeting be held for the purpose of electing a board of directors." 3. On June 13, 1959, the plaintiff Hagan notified each defendant of the proxy held by him and made a further request that a meeting of stockholders be called "on account of said proxy"; such requests have been ignored and no meeting of stockholders has been called. Under the third cause of action, the relief sought *245 is an order constituting the defendants "as commissioners to hold a meeting of the stockholders of Benedict Heights, Inc."
 The grounds stated in the demurrer are: 1. The amended complaint does not state facts sufficient to constitute a cause of action. 2. The plaintiff has not the legal capacity to sue. 3. There are other actions pending between the same parties for the same cause. 4. The court has no jurisdiction over the subject matter of the action. 5. There is a defect of parties defendant. In support of the third ground stated, the demurring parties filed the declaration of Mr. Fairfield, pursuant to section 433 of the Code of Civil Procedure, for the purpose of invoking judicial notice on the part of the court of three other actions or proceedings pending in the same court.
 [1] The examination of the amended complaint is to be made in the light of the rule that a demurrer admits the truth of all allegations which are well pleaded. (Lee v. Hensley, 103 Cal.App.2d 697, 704 [230 P.2d 159]; see Boren v. State Personnel Board, 37 Cal.2d 634, 640 [234 P.2d 981].) It must be assumed that the appellant can prove all the facts as alleged. (Schaefer v. Berinstein, 140 Cal.App.2d 278, 288 [295 P.2d 113].) Consideration will initially be given to the first cause of action of the amended complaint. [2] The relief which the appellant primarily seeks thereunder is the registration of his shares of stock on the books of the corporation. Several of the stated grounds of the demurrer are clearly without merit as to that cause of action. Thus there is no lack on the part of the appellant of "the legal capacity to sue." Such defect would exist if the appellant had a good cause of action as against the respondents but was under a disability which prevented him from asserting it. (See 1 Chadbourn, Grossman and Van Alstyne, California Pleading,  573.) A special demurrer for want of capacity to sue "raises only the question of whether any general legal disability exists, such as infancy or insanity, or want of title in the plaintiff to the character in which he sues." (Klopstock v. Superior Court, 17 Cal.2d 13, at p. 18 [108 P.2d 906, 135 A.L.R. 318].) [3] As stated by the Supreme Court in Parker v. Bowron, 40 Cal.2d 344, at page 351 [254 P.2d 6]: "Incapacity is merely a legal disability, such as infancy or insanity, which deprives a party of the right to come into court. The right to relief, on the other hand, goes to the existence of a cause of action. It is not a plea in abatement, as is lack of capacity to sue."
 [4] Likewise without merit insofar as the first cause of *246 action is concerned is the ground that "there are other actions pending between the same parties for the same cause." One proceeding upon which the respondents rely is Farrington v. Fairfield, which is the subject of an appeal in which an opinion has this day been filed (ante, p. 237 [16 Cal.Rptr. 119]). It is true that therein part of the relief sought was the registration of a share of stock alleged to be owned by Mr. Farrington, but no relief was therein sought as to shares of stock owned by the appellant. As will hereinafter be discussed, a petition for a writ of mandate as employed in that case is not the proper means by which to invoke action of the court with respect to compelling the registration of stock on the books of a corporation. But aside from that, it is clear that the two cases are not based on the same cause of action; a final judgment in the first proceeding would not be a bar to the second suit under the doctrine of res judicata. (See Lord v. Garland, 27 Cal.2d 840, 848-849 [168 P.2d 5]; 2 Chadbourn, Grossman and Van Alstyne, California Pleading,  1633-1634.) In the case last cited, the Supreme Court said (27 Cal.2d, at page 848): "Where, for all that appears in the complaint, the prior suit does not involve the entire cause of action presented by the complaint in the later litigation, the plea of abatement should be raised by answer rather than by demurrer." Another action upon which the respondents rely is also entitled Hagan v. Fairfield; it involved a petition for a writ of mandamus to compel the registration of a share of stock belonging to Mr. Hagan and to require the persons who are respondents herein to permit Mr. Hagan to examine the records of the corporation. As in the case of the proceeding heretofore discussed, such proceeding was not appropriate with respect to the matter of registration of the stock. The denial of the relief with respect to the subject of the inspection of records was affirmed in Hagan v. Fairfield, 183 Cal.App.2d 703 [7 Cal.Rptr. 248]. But, in any event, the present suit was filed on April 7, 1959, whereas the proceeding in mandamus entitled Hagan v. Fairfield was filed on April 9, 1959, and, accordingly, was not pending prior to the commencement of the present action. With respect to the third action upon which the respondents rely, it is sufficient to note that the appellant's complaint in intervention was filed in the action for the dissolution of the corporation on April 15, 1959, which was after the filing of the complaint in the present action. [5] Where the rule under discussion is applicable, "the pendency of another action growing out of the same *247 transaction is ground for the abatement of the second action but never for the abatement of the first action." (Kirman v. Borzage, 89 Cal.App.2d 898, at p. 903 [202 P.2d 303]; see also National Auto Ins. Co. v. Winter, 58 Cal.App.2d 11, 16 [136 P.2d 22]; Hilton v. Reed, 46 Cal.App.2d 449, 454 [116 P.2d 98].) [6] Finally, it is clear that even if there is merit in a demurrer on the ground that there is another action pending between the same parties for the same cause, it is not proper to render a judgment of dismissal of the second action. As stated by the Supreme Court in Lord v. Garland, supra, 27 Cal.2d 840, at page 851: "The appellant relies upon a number of decisions which turned upon the defense of another action pending, but in none of them was a judgment of dismissal, which followed an order sustaining a demurrer without leave to amend, affirmed upon appeal. The only relief to which a litigant is entitled upon the plea, by either demurrer or answer, that a prior action between the same parties is pending and undetermined is the judgment specified by section 597, Code of Civil Procedure, that the second action abate."
 [7] Another ground of demurrer which was presented to the superior court is that "this court has no jurisdiction over the subject matter of the action." The respondents' position appears to be that the determination of any rights which the appellant may have in the corporation or with respect thereto must be made exclusively in Rosner v. Benedict Heights, the dissolution proceeding brought under the provisions of the Corporations Code. But a problem as to jurisdiction of the subject matter as such does not appear to be here involved since, as will be more fully hereafter discussed, an action may be brought in the superior court to obtain registration of shares of stock on the books of the corporation. The subject matter of each action is within the jurisdiction of the superior court. (See Abelleira v. District Court of Appeal, 17 Cal.2d 280, 288-291 [109 P.2d 942, 132 A.L.R. 715].) As said in Witkin on California Procedure, at pages 461-462: "If the two actions, though involving similar issues, are brought in the same court, the problem is not one of jurisdiction but of pleading and trial practice." It is to be noted that section 4657 of the Corporations Code is as follows: "After hearing the court may decree a winding up and dissolution of the corporation if cause therefor is shown, or, with or without winding up and dissolution, may make such orders and decrees and issue such injunctions in the cause as justice and equity *248 require." Section 4660 provides as follows: "Involuntary proceedings for winding up a corporation are deemed to commence when the order for winding up is entered." But the amended complaint does not disclose that there has been any hearing with respect to the allegations of the complaint in the dissolution proceeding or that an order for winding up has been entered or that any injunction of any nature has been issued therein. In this respect the pertinent allegation of the amended complaint is: "That in September, 1957, Fairfield purporportedly [sic] as an attorney for Benedict Heights, Inc., filed an action in this Court to dissolve said Corporation, and procured service on the Corporation by serving the Secretary of State." Even if the trial court could and did take judicial notice of the dissolution proceeding inasmuch as reference was made thereto in the amended complaint (see Pike v. Archibald, 118 Cal.App.2d 114, 116-117 [257 P.2d 480]; Christiana v. Rose, 100 Cal.App.2d 46, 52-53 [222 P.2d 891]), our attention has not been directed to any steps or orders in such proceeding which show the existence of any matters which preclude the maintenance of the present action. Under the most liberal view of the respondents' position, it has no merit with respect to the first cause of action.
 There remain the grounds of demurrer that "the amended complaint does not state facts sufficient to constitute a cause of action" and that "there is a defect of parties defendant." Such grounds will be considered together since the primary defect in the present pleading is in the failure to make the corporation a party defendant. [8] A suit in equity rather than a proceeding in mandamus is the appropriate remedy by which to compel a corporation to register a transfer of stock. (Ray v. California Home Bldg. Loan Co., 7 Cal.App.2d 275 [46 P.2d 996]; Mahl v. E. A. Portal Co., Inc., 81 Cal.App. 494, 496-497 [254 P. 278].) As said in Young v. New Pedrara Onyx Co., 48 Cal.App. 1, at pages 27-28 [192 P. 55]: "It is an established doctrine of equity jurisprudence that the true owner of stock may resort to a court of equity to compel the corporation to register on the books a transfer of the stock and to issue to him a new certificate; for it is the owner's right to cause the corporation's books to show truthfully the real title or claim of each and every person having any lawful interest in the stock." [9a] There can be no doubt that the corporation itself is an indispensable party where stock has been presented for transfer and there has been a refusal to *249 register the stock in the name of the new owner. (See Mahl v. E. A. Portal Co., Inc., supra, 81 Cal.App. 494, 496-497.)
 [10] Ordinarily, officers and other agents of the corporation are not indispensable or necessary parties in such a suit. (See Tregear v. Etiwanda Water Co., 76 Cal. 537, 542 [18 P. 658, 9 Am.St.Rep. 245]; Anno., 22 A.L.R.2d 12, 105-106.) As said in People v. California Safe Deposit & Trust Co., 18 Cal.App. 732, at page 738 [124 P. 558]: "The proceeding against the corporation is sufficient without making the directors parties thereto. The latter are mere agents of the corporation, and their acts as such are always those of the corporation. And, obviously, the latter can act only through its agents, and where a corporation is compelled to do some act which it is its legal duty to perform, it can perform that act only through its duly authorized agent or agents." But the facts as alleged in the amended complaint do not present the ordinary case. It is therein alleged that "in about 1952, all of the said officers and directors relinquished and delegated all of their activities and duties as directors and officers in said Corporation, to Joseph W. Fairfield, and turned over to Joseph W. Fairfield, all the books, papers, records and dominion and control of all assets of said corporation; that since said date, said Corporation has not actively engaged in business, but that ... all of the said Corporation's activities have been done and performed by said Fairfield, acting as managing agent of said Corporation, without proper, or any, authority. ... That said Fairfield now has possession of all the books and records of said Corporation, and dominion and control of all of its assets." It is further alleged that the respondent Rosner was "the last elected" president and that the respondent Benjamin was "the last elected" secretary of the corporation but that they "disclaim having had anything to do with the Corporation for several years last past" and disclaim "any and all responsibility and authority as de facto officers and directors of said corporation." The appellant made written demand upon the respondents with respect to the registration of his stock but to no avail.
 The allegations of the complaint to which reference has just been made present the question of whether the respondents are at least proper parties defendant. Some guidance in the solution of that problem is found in the following statement in section 611 of Chadbourn, Grossman and Van Alstyne, California Pleading: "A necessary or indispensable *250 party is, of course, a proper party. But the reverse is not true, i.e., there are many instances in which parties who are neither necessary nor indispensable may nevertheless be joined as plaintiffs or defendants to the end of avoiding a multiplicity of actions." It is a reasonable conclusion that if the respondents Rosner and Benjamin disclaim any obligation to perform the duties of president and secretary, respectively, and if the respondent Fairfield is in fact in charge of the affairs and records of the corporation but fails to recognize any duty toward the appellant, a judgment in favor of the appellant against the corporation alone with respect to the registration of stock would be of no practical consequence. But if, in addition, it should be determined that the respondents, or any of them, have a duty and responsibility to carry out the obligations of the corporation in that respect, the appellant's recourse to his equitable remedy will not have been in vain. (Cf. People v. California Safe Deposit & Trust Co., supra, 18 Cal.App. 732, 739; Travis v. Knox Terpezone Co., 165 App. Div. 156 [150 N.Y.S. 621, 623], order affd., 215 N.Y. 259 [109 N.E. 250].)
 [9b] While the first cause of action was vulnerable because of the failure to join the corporation as a party defendant under the applicable law, it is clear that the defect was one which could be remedied. It was, therefore, an abuse of discretion to sustain the demurrer without leave to amend. (Lincoln v. Grazer, 163 Cal.App.2d 758, 761 [329 P.2d 928].) Only in the event of a refusal to cure such defect by an amendment would a judgment of dismissal be proper. (Keeler v. Schulte, 47 Cal.2d 801, 803-804 [306 P.2d 430]; Warner v. Pacific Tel. & Tel. Co., 121 Cal.App.2d 497, 502 [263 P.2d 465].)
 The appellant, particularly in his supplemental brief filed with the permission of the court, argues the merits of all three causes of action. However, in the supplemental brief the appellant states as follows: "From viewing the entire amended complaint in its three causes of action, it is apparent that it would have been possible to have stated a good cause of action. And the Court was in error in making its ruling that the demurrer be sustained without leave to amend, and sustaining the motion to dismiss the action." In the light of the above statement and in view of our determination with respect to the first cause of action, we do not deem it necessary to discuss the sufficiency of the pleading of the second and third causes of action, particularly since the demurrer was *251 addressed to the complaint as a whole rather than specifically to each cause of action. (Cf. Skipper v. Gilbert J. Martin Constr. Co., 156 Cal.App.2d 82 [318 P.2d 732].)
 While a court has inherent power to dismiss an action when it is shown to be sham, fictitious or without merit, to the end that there shall be no abuse of the judicial process (Lincoln v. Didak, 162 Cal.App.2d 625, 629 [328 P.2d 498]), it is apparent that in this case it was not proper to grant the motion to dismiss. Nothing in the declaration of Mr. Fairfield filed in support of that motion justifies such action. We are aware of the waste of the time and effort of a trial court, already heavily burdened, which flows from the institution of a series of actions or proceedings which spring from the same body of claims. But to the extent to which various actions may be consolidated (see Jud Whitehead Heater Co. v. Obler, 111 Cal.App.2d 861, 866-867 [245 P.2d 608]), such waste may be avoided. (See Bartholomew v. Bartholomew, 56 Cal.App.2d 216, 224-225 [132 P.2d 297].)
 The judgment is reversed with directions to the superior court to deny the motion to dismiss the action and to grant the appellant leave to file a second amended complaint within a reasonable time.
 Shinn, P. J., and Vallee, J., concurred.
