
52 Ill. App.3d 1042 (1977)
368 N.E.2d 481
THE PEOPLE ex rel. COUNCIL 19 OF THE AMERICAN FEDERATION OF STATE, COUNTY AND MUNICIPAL EMPLOYEES, AFL-CIO, et al., Petitioners-Appellants,
v.
JOHN E. EGAN et al., Respondents-Appellees.
No. 62844.
Illinois Appellate Court  First District (3rd Division).
Opinion filed September 7, 1977.
Rehearing denied October 6, 1977.
Arnold E. Charnin, of Cornfield and Feldman, of Chicago, for appellants.
Allen S. Lavin, of the Metropolitan Sanitary District of Greater Chicago (Ina S. Winston, of counsel), for appellees.
Judgment affirmed.
*1043 Mr. JUSTICE JIGANTI delivered the opinion of the court:
This is a suit in mandamus filed by 11 individual employees and Council 19 of the American Federation of State, County and Municipal Employees, AFL-CIO (petitioners), against the Director of Personnel and the Board of Trustees of the Metropolitan Sanitary District of Greater Chicago (respondents).
The complaint requested that a writ of mandamus issue to compel the respondents to establish rules to pay all employees who occupy positions of the same title and grade a uniform hourly wage and to award back pay to all employees who were adversely affected by the respondents' failure to do so. The respondents filed a motion to dismiss alleging among other things that mandamus does not lie. Both parties filed briefs on the motion and the circuit court dismissed the complaint with prejudice. The petitioners appeal alleging that mandamus lies to enforce the statutory obligation of the respondents to provide a uniform personnel system; that the trial court erred in dismissing the cause with prejudice without hearing the merits of the case; and that denial of the hearing on the merits and denial of leave to amend the pleadings, is a denial of due process.
These facts are undisputed. The petitioners are or represent salaried not hourly employees of the Sanitary District who work in field offices of the District in such locations as Stickney, Skokie, Calumet, Hanover, Lemont, Schaumberg and Streamwood. These salaried employees are required to work an eight-hour day. Other salaried employees of the Sanitary District who occupy the same grade and title as the employees of the auxiliary offices but who work at the main office in the north loop area are required to work a seven-hour day. Employees in the same grade and title are paid the same annual salary whether they work a seven-hour day at the main office or eight hours a day at the outlying offices.
The petitioners brought the instant action in mandamus alleging that the District's compensation plan does not conform to section 4.3 of "An Act to create sanitary districts * * *" which provides in pertinent part:
"For the purpose of establishing uniformity of pay and title for all offices and places of employment classified in the same grade, it shall be the duty of the Director to prescribe by rule which shall become effective when approved by the trustees, the maximum and minimum pay for each grade and the title thereof * * *." Ill. Rev. Stat. 1971, ch. 42, par. 323.3
The respondents call the court's attention to Rule 5.04 of the Rules of the Director of Personnel of the Metropolitan Sanitary District of Greater Chicago which reads as follows:
"Salary Rates Based Upon Full-Time Employment: The salary rates prescribed in the salary schedules are fixed on the basis of full time service for normal work weeks of thirty-five (35) to fourty *1044 [sic] (40) hours. For positions in class level 11 and above which are professional, supervisory and executive in character the normal work weeks of thirty-five (35) to forty (40) hours generally apply, but the compensation is intended to be appropriate for the class regardless of variations in the time that may be required to satisfactorily fulfill the responsibilities of the positions in each class."
Petitioners do not dispute that the Sanitary District maintains a personnel system whereby employees are classified by title and pay grade, e.g., Clerk I, Clerk-Typist II, Clerk-Steno I. All employees occupying a particular title and grade receive the same annual salary whether they work in the main administrative offices or the outlying plants. Petitioners argue that despite the apparent uniformity in pay and title for all offices and places of employment classified in the same grade, nonuniformity is created by the Director of Personnel having prescribed rules and policies, requiring employees affected by the statutory provision to be employed for different hours of employment at the main facility, where employees are required to work only a seven-hour day, and at the outlying offices, where employees are required to work an eight-hour day. They argue that a Clerk-Steno in Grade 9 under the 1973 compensation plan would be paid $4.90 an hour if employed at the main office and $4.29 per hour if employed at an outlying office although they receive the same annual salary. The petitioners argue that this disparity in hourly wages makes for nonuniformity of pay and they request that a writ of mandamus issue compelling the respondents to fulfill their statutory obligation to provide uniformity. Respondents argue that since it is agreed that the Sanitary District provides uniformity in pay and title whether the employees work a seven-hour day or an eight-hour day the District is under no obligation to pay uniform hourly wages so long as salary is not contingent upon the hours worked.
 1-3 The writ of mandamus is a summary writ issued from a court of competent jurisdiction commanding the officer to whom it is addressed to perform some specific duty to which the petitioner is entitled of right to have performed and which the party owing the duty has failed to perform. (People ex rel. Jacobi v. Nelson (1931), 346 Ill. 247, 178 N.E. 485; People ex rel. Williams v. Daley (1972), 14 Ill. App.3d 627, 303 N.E.2d 162.) The rule is well established that mandamus will not lie on behalf of a petitioner until it has been shown that he has a clear legal right to the writ. (L.E. Myers Co. v. Sanitary District (1944), 386 Ill. 542, 54 N.E.2d 505.) Although mandamus is a proper remedy to force officials to perform their duties such as paying back salary to an employee lawfully entitled to such salary (People ex rel. Hilger v. Myers (1969), 114 Ill. App.2d 478, 252 N.E.2d 924; People ex rel. Bourne v. Johnson (1964), 48 Ill. App.2d 307, 199 N.E.2d 68), this court will not use a writ of mandamus to compel a *1045 party to perform an act unless it is affirmatively made to appear that it is his clear duty to do so and the petitioner must establish every material fact necessary to show the plain duty of the respondent before the court will interfere. (Bengson v. City of Kewanee (1942), 380 Ill. 244, 43 N.E.2d 951.) Mandamus is not proper where the right of the petitioner must first be established or the duty of the officer sought to be coerced must first be determined. Bengson, at 250.
 4 In the instant case the respondents have a clear statutory duty to provide uniformity in pay and title. Petitioners and respondents agree that the employees of the Sanitary District are salaried, and were not hired as hourly workers. By virtue of section 4.3 (Ill. Rev. Stat. 1971, ch. 42, par. 323.3) the Director of Personnel is empowered to prescribe rules governing employment. One of those rules, 5.04, requires salaried employees to work a normal work week of 35 to 40 hours. The salaried employees at the main administrative offices work 35 hours a week. Those at the outlying offices work 40 hours a week. Employees of the same title and grade are paid the same annual salary. We regard the rule that calls for a normal work week of 35 to 40 hours for salaried employees as providing uniformity in pay and title, because this being the range of a normal work week, there is not an unreasonable disparity between these hours. The petitioners have failed to state a cause of action or to show a clear and undisputable right to mandamus in this case. Lewis v. Harness (1967), 87 Ill. App.2d 170, 230 N.E.2d 487.
 5 Petitioners finally argue that the trial court erred in dismissing the cause with prejudice without hearing the merits of the case and in denying leave to amend thereby denying petitioner due process. It is necessary for plaintiff to first state a cause of action before it is incumbent upon the court to hear the merits of the case. (Phelps v. Williams (1971), 132 Ill. App.2d 212, 268 N.E.2d 47.) As we noted above the plaintiffs have failed to allege any facts which if true would entitle them to judgment. The trial court examined the pleadings, heard extensive oral argument and considered the lengthy briefs before deciding that petitioners' complaint failed to state a cause of action. It is proper to dismiss a complaint and refuse leave to amend when it is apparent that no cause of action can be stated. (Lee v. Conroy (1973), 13 Ill. App.3d 694, 300 N.E.2d 505.) We believe in the instant case it is apparent that no cause of action can be stated. Further amendment would not have benefitted petitioners. The trial court did not abuse its discretion in refusing to permit petitioners to amend their complaint.
For the above reasons the judgment of the circuit court of Cook County is affirmed.
Affirmed.
SIMON, P.J., and McNAMARA, J., concur.
