Judgment, Supreme Court, New York County, entered June 23, 1971, unanimously modified, on the law, to the extent *888of striking therefrom the decretal paragraph which dismisses the complaint, and substituting therefor a provision that plaintiff is not entitled to retirement benefits retroactive to July 1, 1968 in accordance with section B3-36.6 of the Administrative Code; and, as so modified, affirmed, without costs and without disbursements. Since this was an action for declaratory judgment, the complaint should have not been dismissed merely because plaintiff was not entitled to the declaration sought by him. The court at Special Term, in granting summary judgment, should have made a declaration of the rights of the parties with respect to the subject matter of the litigation. (Sweeney v. Cannon, 30 N Y 2d 633; Fhagen v. Miller, 36 A D 2d 926, 927, affd. 29 N Y 2d 348; Lanza v. Wagner, 11 N Y 2d 317, 334.) Concur — Nunez, J. P., Kupferman, Murphy and Capozzoli, JJ.