The effect of replacement of the Sr ions by Ba or Ca ions has been studied in the high-T_c superconductor Pb_2Sr_2Y_<0.5>Ca_<0.5>Cu_3O_y. With increasing the amount of Ba, the lattice expands and Pb_2SrBaY_<0.5>Ca_<0.5>Cu_3O_y shows an orthorhombic-to-tetragonal transition. A superconducting transition has been observed in the sample of the nominal composition Pb_2SrBaY_<0.5>Ca_<0.5>Cu_30_y. Magnetization measurements have shown that the superconducting transition is not of bulk nature. The doping of Ca ions has been unfavorable for the formation of the Pb_2Sr_2YCu_3O_8 -type phase.