
164 Cal.App.3d 1026 (1985)
211 Cal. Rptr. 49
RAYMOND C. DAVIS et al., Plaintiffs and Appellants,
v.
BOARD OF ADMINISTRATION OF THE PUBLIC EMPLOYEES' RETIREMENT SYSTEM, Defendant and Respondent; CITY OF WALNUT CREEK, Defendant and Appellant.
Docket No. G000333.
Court of Appeals of California, Fourth District, Division Three.
February 21, 1985.
*1029 COUNSEL
Banks, Leviton, Drass & Kelsey and Seth J. Kelsey for Plaintiffs and Appellants.
David Benjamin, City Attorney, for Defendant and Appellant.
Gerald Ross Adams, Cynthia G. Besmer and Paul M. Ryan for Defendant and Respondent.
OPINION
SONENSHINE, J.
Three former Walnut Creek police officers appeal the trial court's denial of their petition for a writ of mandate. The officers seek mandamus to require the Public Employees' Retirement Service (PERS) to accept their redeposit of retirement funds which will entitle them to credit under the PERS plan for the years they were employed with the City of Walnut Creek.
Walnut Creek cross-appeals the trial court judgment overruling its demurrer. The city asks the cross-appeal be dismissed if the trial court ruling on the merits of this case is affirmed.
The officers were employed by Walnut Creek for six to eight years prior to 1973. The facts of Raymond Davis' case are illustrative. (1) (See fn. 1.) Davis joined the Fullerton Police Department in 1955, at a time when it contracted for its retirement plan with a state agency later designated as the PERS.[1] For nine years he contributed his employee's share to the fund but was required to withdraw his nonvested payments when he left Fullerton in 1964.
In that same year Davis became police chief for Walnut Creek and for eight years he contributed to its private retirement plan with John Hancock *1030 Insurance Company. In 1973 he separated from Walnut Creek and, pursuant to the requirements of the plan, withdrew his contributions because his rights had not vested.
He immediately became police chief of Santa Ana, an agency contracting with PERS. In addition to his current contributions as a Santa Ana employee, he redeposited the funds he had withdrawn from Fullerton, but was not allowed to redeposit the funds he had withdrawn from Walnut Creek. In January 1974, Walnut Creek terminated its policy with John Hancock and entered into a contract with PERS. The city chose to include only current and not former employees in its PERS coverage. The city wished to avoid contributing matching funds for former employees who might later become PERS members and seek to redeposit Hancock funds. Therefore, when Chief Davis, along with Officers Chezik and Dodeward applied to redeposit the funds they had withdrawn from Walnut Creek, they were refused by the PERS board.
In January 1982 the officers petitioned for a writ of mandate to compel PERS to accept their redeposit. In March of 1983 the court sustained PERS' demurrer on the ground that Walnut Creek was an indispensable party, since it could be liable for the employer's share of any benefits paid by PERS. Later, when Walnut Creek was served, it demurred on the ground the statute of limitations had expired. (§ 11523.) The trial court overruled the city's demurrer while at the same time denying the peremptory writ of mandamus. This appeal by the three officers followed.
(2) (See fn. 2.) We must determine whether the officers have a right to redeposit and receive PERS retirement credit for the contributions they withdrew from John Hancock when they left Walnut Creek.[2]
Unlike social security, PERS benefits do not automatically follow the employee from job to job. The officers concede they do not have automatic rights to either redeposit their contribution or to receive prior service credit. They, however, argue they have a statutory right to redeposit and the contract between Walnut Creek and PERS cannot deny them that right. Section 20834 guarantees "[c]redit for prior service shall be granted to each person who was employed by a contracting agency at the time of becoming a member and who became a member on the effective date of the agency's contract or within three years after last rendering prior service." (Italics added.)
*1031 (3a) The section sets forth a two-prong test. If a person is a current employee on the date the PERS contract becomes effective, and if the employee joins PERS within three years, then prior service credit must be granted under the contract. (4) The intent of the statute is to assure all PERS contracts allow employees to achieve a level of parity based upon the seniority and benefits they had accrued under their previous retirement system with the same agency.
(3b) There are two groups excluded from this mandatory section: former employees and current employees who are not covered by the PERS contract. (5, 6) (See fn. 3.) The former Walnut Creek officers in this case fall within the first group; therefore, they cannot establish an entitlement under this section.[3]
(7) (See fn. 4.) While there are no cases on point, an analogous situation was considered by the Attorney General[4] in determining whether employees of a city, taken over by the county in 1941, were entitled to credit for their prior service when the county joined PERS in 1945. Relying primarily on section 20834, the Attorney General concluded they were only entitled to their prior county service since they were current employees, covered by PERS under its county contract: "I fail to find any provision of the State Employees' Retirement Law which would require the city to arrange with the State system for any prior service applicable to these persons for service rendered the city prior to November 1941." (7 Ops.Cal.Atty.Gen. 399, 400 (1946).) Nor has our research uncovered any provision requiring Walnut Creek to arrange with PERS for prior service of its former employees.
(3c) The officers also rely on section 20523 which states in relevant part: "A former member of the local retirement system who withdrew his contributions prior to the effective date of the contract and who thereafter enters into membership in this system and is entitled to credit under this system for the service on account of which such contributions were made shall not receive credit for such service or any other prior service to the same employer *1032 unless he elects to redeposit such contributions prior to the effective date of his retirement in the manner fixed by the board." (Italics added.)[5] They contend this section grants to former employees a retroactive right to service credit which vests immediately when a city contracts with PERS. A fair reading of the section does not support the officers' view. Section 20523 is a procedural statute. It gives an employee, who establishes a right to prior service, a means to enforce that entitlement by redepositing the funds necessary to assure benefits. Therefore, section 20523 is not applicable unless a substantive law exists granting them the right to prior service credit.
They contend section 20834.1 supports an entitlement, but we cannot agree. In relevant part, that section provides "[c]redit for prior service rendered as an employee of a contracting agency shall be granted to each local member at the date the local member becomes a member of this system; provided, however, that a member may not be credited with such prior service, if he is eligible to redeposit for current service, until after he has been accredited with all current service for which he is eligible." This procedural statute prioritizes the accounts the employee is allowed to redeposit. It does not grant any substantive rights to employees who have separated from the agency before a PERS contract is in effect.
Because there is no statute expressly granting them a right to redeposit, we next consider the officers' contention they were impliedly given that right in Walnut Creek's contract with PERS.
The PERS statutes (§ 20000 et seq.) set mandatory parameters (§ 20490), but section 20835[6] grants broad discretion to a city, such as Walnut Creek, that joins PERS as a contracting agency under section 20010. Like a private insurance policy, each agreement is individual. Thus PERS employee members, with identical positions but in different cities, may have different rights *1033 depending upon the particular plan selected by their employer. A recent Attorney General opinion held all state public school employees are not entitled to equal benefits under PERS. The school districts, the contracting agencies, can determine their own benefit plans. (62 Ops.Cal.Atty.Gen. 467 (1979).)
(8) To determine whether these officers were impliedly included, we examine the specific terms of Walnut Creek's contract with PERS. Paragraph 3 lists the categories of covered persons. Employees that are "local policemen" are included (along with miscellaneous members). The parties agree the following is the relevant exclusion: "EXCLUDE EMPLOYEES OF THE POLICE DEPARTMENT WHO FIRST ENTERED PUBLIC AGENCY SERVICE PRIOR TO JANUARY 1, 1974 IN AN EMPLOYMENT IN WHICH THEY WERE ELIGIBLE FOR SAFETY MEMBERSHIP AND WHO HAVE NOT EXECUTED AND FILED WITH THE PUBLIC AGENCY A WAIVER OF RIGHTS UNDER SUCH SYSTEM DURING THE PERIOD PRESCRIBED THEREFORE, BY IT. SUCH EXCLUSION TO APPLY WHETHER OR NOT THE EMPLOYEE RE-ENTERS SERVICE OF THE PUBLIC AGENCY THEREAFTER."
A proper construction of the contract indicates it divides participants into four groups: (1) all local police currently employed by Walnut Creek, and who are members of the PERS retirement plan; (2) currently employed police officers who preferred to retain their rights under the John Hancock policy; (3) miscellaneous current employees; and (4) those not covered by the policy. The officers fall within the last category. The contract makes no provision for former employees. Walnut Creek had a valid reason to exclude them: It otherwise becomes liable to contribute the employer's share whenever a covered person, who has left Walnut Creek, joins another PERS member agency and elects to redeposit previous contributions. The potential exposure is substantial. As of April 1, 1979, the city's contribution for safety members was approximately 21 percent of each officer's monthly salary. Section 20834 requires this benefit be made available to current employees, but absent a statute it is understandable the city chose not to give a retroactive benefit to former employees, a group whose size it could not control.
We reject the officers' contention their option to execute a waiver under the John Hancock policy survived the withdrawal of all of their contributions from that fund. Furthermore, we find no merit in their contention their willingness to execute the waiver creates a right under the PERS contract. These officers had no rights in any of Walnut Creek's retirement plans on *1034 January 1, 1974; therefore, the city's contract with PERS could not have affected them.[7]
The judgment of the trial court is affirmed. The cross-appeal is dismissed.
Trotter, P.J., and Wallin, J., concurred.
NOTES
[1]  All statutory references are to the California Government Code, except as otherwise noted.

PERS was created by statute (§ 20000 et seq.) to assure public agencies could continue to hire new employees by providing retirement benefits to those with many years in government service. (§ 20001.) Local governments contract with the state to offer PERS benefits to their employees. (§ 20010.) The PERS contract operates like many private retirement plans. The employee contributes a share and the city pays the employer's share. If the employee leaves the city before the benefits are vested, withdrawal of the contributions is mandatory. However, if the employee later joins another PERS contracting agency, the employee is entitled to redeposit the withdrawn funds and receive seniority in the retirement system. (§§ 20523 and 20654.)
[2]  Since this is a question of law, the scope of our review is broad. "`It is elementary that the construction of a statute ... and its applicability is solely a question of law.' [Citations.]" (Lewis v. City of Los Angeles (1982) 137 Cal. App.3d 518, 521 [187 Cal. Rptr. 273]. "`The construction of a statute and its applicability to a given situation are matters of law to be determined by the court.'" (Estate of Butler (1980) 27 Cal.3d 781, 788 [166 Cal. Rptr. 711, 613 P.2d 1245].)
[3]  Under the PERS statutes, prior service credit is a term of art. Section 20805 defines it as it applies to different classes of employees. Contracting agencies, such as Walnut Creek (§ 20010), are permitted but not required by the statute to grant credit to their employees for service "prior to the effective date of the contract under which he became a member." (§ 20805, subd. (b)(3).)

The right to prior service credit by PERS is not established by the officer's proof of their "public service" under sections 20930, subdivision (a) and 20933. Prior service can include public service, or an employee can under certain circumstances receive credit for public in addition to prior service. (§ 20931.) However, the two terms are not synonymous.
[4]  Although the Attorney General's interpretation of a state statute is not controlling, it is entitled to great weight. (Sonoma County Bd. of Education v. Public Employment Relations Bd. (1980) 102 Cal. App.3d 689, 699 [163 Cal. Rptr. 464].) This is particularly true where the opinion has gone unchallenged for nearly 40 years.
[5]  The legislative intent of the section is apparent in the most recent amendment (1966) where "is entitled to" replaces "receives." In our view, reading section 20523 as an enforcement statute does not render it a nullity, as the officers suggest.
[6]  Section 20490 provides: "The contract may include any provisions consistent with this part and necessary in the administration of this system as it affects the public agency and its employees.

"Whenever in this part an election is given to contracting agencies to subject themselves and their employees to provisions of this part otherwise not applicable to contracting agencies and their employees by amendment to their contracts with the board, any contract made after the effective date of the provision giving such election may include any provisions necessary to give effect to the election of the contracting agency."
Section 20835 provides in relevant part: "The credit for prior service to be granted local members and the benefits pertaining thereto, shall be established by contract between the board and the governing body of such agency. Benefits on account of each year of credited prior service shall be in the form of a percentage of:
"(a) The final compensation of local safety members; ..."
[7]  Nor was there a fiduciary relationship between the city, as pension administrator, and the officers. They separated from the city 18 months before its contract with PERS on January 1, 1974. The city had no relationship with these officers, fiduciary or otherwise.
