Magnetic studies on the superconducting oxide ErBa2Cu3O7−y