
448 A.2d 769 (1982)
Joseph PARENTE et al.
v.
Bradford E. SOUTHWORTH et al.
No. 80-481-Appeal.
Supreme Court of Rhode Island.
July 23, 1982.
*770 Cobleigh, Fleury, Hefner & Watt, Gerard P. Cobleigh, Warwick, for plaintiffs.
Dennis J. Roberts, II, Atty. Gen., Charles C. McKinley, Sp. Asst. Atty. Gen., for defendants.

OPINION
WEISEERGER, Justice.
This case comes before us on appeal from an entry of judgment for the defendants in the Superior Court pursuant to a motion for judgment on the pleadings. We reverse. The facts alleged in the complaint are as follows.
The plaintiffs are employees of the State of Rhode Island who are employed within the classified civil service system. The action was brought as a class action on behalf of the named plaintiffs and on behalf of all other employees in the classified service of the State of Rhode Island. The defendant, Bradford Southworth (Southworth), is the Personnel Administrator of the State of Rhode Island and is charged by law with the responsibility of conducting employment and promotional examinations within the classified civil service. The defendant, Donald Rohrer (Rohrer), is the Director of the Rhode Island Department of Administration and is charged by law with the responsibility of providing the personnel administrator with the necessary funds and personnel to examine temporary employees within the classified service within the time prescribed by law.
The plaintiffs allege in count 1 of the complaint that examinations for employees within the classified service should be conducted pursuant to the provisions of G.L. 1956 (1969 Reenactment) § 36-3-5(5) and §§ 36-4-10, -25, and -31 either before appointments are made or within one year of an employee's appointment. The plaintiffs assert that Southworth has failed for more than one year to conduct examinations for large numbers of positions in the classified service. They assert that defendants have a ministerial legal duty to conduct entrance and promotional examinations in the classified civil service within one year of an appointment thereto.
In count 2 of the complaint plaintiffs allege that Southworth has failed to conduct examinations for certain classes of positions "for many years" and has thereby both deprived plaintiffs of the opportunity to compete for promotional positions and also denied them the opportunity to gain permanent civil service status while serving in temporary positions. Also in count 2 plaintiffs set forth references to the various statutory provisions upon which they rely and recite the terms of personnel Rule 3.081, which relates to compliance with federal standards in respect to positions in which temporary employees are serving in federally grant-aided agencies subject to the Federal Merit System Standards.
In count 1 of the complaint plaintiffs seek relief against Southworth and Rohrer by issuance of a writ of mandamus directing Rohrer to provide to Southworth the funds and employees required to conduct examinations for all occupied classes of positions in the classified civil service for which examinations have not been conducted *771 within the twelve-month period preceding the date of the writ; directing that sufficient funds and employees be provided to enable Southworth to conduct examinations within the one year for all positions hereafter created in the classified civil service; and directing that Southworth conduct examinations forthwith for all occupied positions in the classified civil service for which examinations have not been conducted within the twelve-month period preceding the date of the writ and that hereafter Southworth conduct examinations within one year for all positions later created in the classified civil service. In count 2 plaintiffs also request declaratory relief and injunctive relief prohibiting defendants from violating statutes and personnel rules and from refusing or failing to conduct examinations within one year of an appointment to any classified position and such other and further relief which the court may deem appropriate.
In response to this complaint defendants filed an answer in which defendant Southworth admitted that he was the Personnel Administrator of the State of Rhode Island and that his powers and duties have been set forth in G.L. 1956 (1969 Reenactment) § 36-3-5.[1] Generally the answers of defendants asserted that the complaint failed to state a claim upon which relief could be granted in that the statutes that describe the testing procedure for the state civil service are directory and not mandatory insofar as they set out a one-year period for the administration of civil service examinations.
Ultimately, defendants moved for entry of judgment on the pleadings in accordance with Rule 12(c) of the Superior Court Rules of Civil Procedure on the ground that the complaint failed to state a claim upon which relief could be granted. After consideration of memoranda filed by counsel, the trial justice granted the motion and entered judgment for defendants.
Initially, entry of judgment pursuant to Rule 12(c) of the Superior Court Rules of Civil Procedure under these circumstances is tantamount to a motion to dismiss for failure to state a claim upon which relief can be granted under Rule 12(b)(6). See 1 Kent, R.I. Civ. Prac. § 12.13 at 118 (1969). We have frequently stated that such a motion cannot be granted unless it is demonstrated beyond a reasonable doubt that under no set of facts which might be proven in support of the complaint might a claim be made out upon which relief could be granted. See Roch v. Garrahy, R.I., 419 A.2d 827, 831 (1980); Redmond v. Rhode Island Hospital Trust National Bank, 120 R.I. 182, 187, 386 A.2d 1090, 1092 (1978); Rosen v. Restrepo, 119 R.I. 398, 402, 380 A.2d 960, 962 (1977); Bragg v. Warwick Shoppers World, Inc., 102 R.I. 8, 12, 227 A.2d 582, 584 (1967). Applying this stringent standard to the facts of the case at bar, we are constrained to conclude that the trial justice was in error in granting the motion for judgment on the pleadings pursuant to Rule 12(c).
We recognize that relief will be granted under a complaint for mandamus "only where the [plaintiffs] have a clear *772 legal right to have the act done which is sought * * * and where [defendants] have a ministerial legal duty to perform such act without discretion to refuse." Warwick School Committee v. Gibbons, R.I., 410 A.2d 1354, 1357 (1980); Gormally v. Cannon, 119 R.I. 771, 776, 383 A.2d 582, 585 (1978); Demers v. Adamson, 102 R.I. 453, 456, 231 A.2d 484, 485 (1967); Aniello v. Marcello, 91 R.I. 198, 202-03, 162 A.2d 270, 272 (1960).
In Newman v. Mayor of Newport, 73 R.I. 435, 436, 57 A.2d 180, 181 (1948), the court observed:
"[W]here the performance of an official duty involves the exercise of discretion, the officer cannot ordinarily be controlled with respect to the particular action he will take in the matter; he can only be directed to perform his duty under the law, but he cannot be directed to perform it in a particular way. If the officer is vested with authority to exercise reasonable discretion, his decision as a general rule is not subject to review or control by mandamus."
An examination of the statutory obligations of Southworth discloses that his duty in respect to temporary appointments and the setting of an examination is not ministerial but discretionary. Although § 36-4-31 does state that the personnel administrator shall within one year of the appointment of a temporary appointee establish an appropriate list, the section provides for provisional status in the event that the personnel administrator has failed to establish such a list. Further, although the personnel administrator implicitly is directed to hold competitive examinations under the same circumstances as he is required to establish an appropriate list, namely within one year of the appointment, the total statutory scheme envisages that such establishment may not always be practicable. Consequently, we are of the opinion that the trial justice was correct in holding that the statutory language relating to the establishment of a list within one year of a temporary appointment was directory rather than mandatory. He was also correct in holding that the providing of funds by the director of administration was a discretionary rather than a ministerial function.
It should be noted, however, that the second count of the complaint alleged that Southworth had failed to conduct examinations for certain classes of positions "for many years." Although the public officer may exercise a discretionary function, that discretion may not be so boundless and uncontrolled as to allow the official to negate and nullify a statutorily established merit system. See State ex rel. Alford v. Willoughby Civil Service Commission, 58 Ohio St.2d 221, 390 N.E.2d 782 (1979). It has also been stated in Newman v. Mayor of Newport, 73 R.I. at 436, 57 A.2d at 181, that mandamus may lie to require the reasonable exercise of discretion.
In any event, plaintiffs have asked for relief upon broader bases than the request for mandamus. They have asked for declaratory relief that would state the rights and the liabilities of the parties under the totality of the merit-system statutory framework. Such declaratory relief is authorized pursuant to the terms of G.L. 1956 (1969 Reenactment) § 9-30-2. This section confers standing upon any person whose "legal relations are affected by a statute" to "obtain a declaration of rights, status or other legal relations thereunder." Although injunctive relief cannot be had under chapter 30 of title 9 in the first instance, Shipyard Drive-In-Theatre, Inc. v. Scuncio, 107 R.I. 554, 560, 268 A.2d 820, 824 (1970), nevertheless a claim for injunctive relief may be joined with the demand for declaratory relief in light of the liberalized provisions for joinder under Rules 18 and 20 of the Superior Court Rules of Civil Procedure. Duffy v. Mollo, R.I., 400 A.2d 263, 267 (1979).
In the case at bar it cannot be said beyond a reasonable doubt that plaintiffs are unable to set forth any set of facts which would entitle them to declaratory relief and additionally to injunctive relief in implementation of the rights and liabilities that might be declared by the court. Redmond v. Rhode Island Hospital Trust National Bank, supra; Rosen v. Restrepo, supra; *773 Bragg v. Warwick Shoppers World, Inc., supra. This broad claim for declaratory and injunctive relief would not be dependent upon the relatively narrow questions relating to the appropriateness of mandamus as a remedy.
Even the determination that mandamus does not lie cannot be decided until a factual basis has been supplied in order to determine whether Southworth has exercised the discretion reposed in him by statute. See Newman v. Mayor of Newport, supra. As a consequence the trial justice erred in granting the motion for judgment on the pleadings.
For the reasons heretofore stated, the appeal of the plaintiffs is sustained, the judgment of the Superior Court is vacated, and the papers in the case may be remanded to the Superior Court for further proceedings in accordance with this opinion.
NOTES
[1]  General Laws 1956 (1969 Reenactment) § 36-3-5 reads as follows:

"Powers and duties of the administrator.  In addition to the duties imposed upon him elsewhere in the law and the personnel rules, it shall be the duty of the personnel administrator:
(1) As executive head of the division of personnel administration, to direct and supervise all of its administrative and technical activities.
(2) To prepare and recommend to the director of administration such rules as are deemed necessary to carry out the provisions of the law.
(3) To supervise the operation of the classification plan and to recommend to the director amendments and additions thereto.
(4) To supervise the operation of the pay plan and to recommend to the director amendments and additions thereto.
(5) To establish and supervise the maintenance of employment lists, promotions lists and reemployment lists.
(6) To perform any other lawful act which he may consider necessary or desirable to carry out the purposes and provisions of this chapter and chapter 4 of this title and the rules and to conduct innovative demonstration projects to improve state personnel management."
