RMAN backup script failing
I would guess that because you're issuing a login your declaration of SIDS is not transferred to the shell started by the su command.  You can test this by checking the value of SIDS after you issue the "su - oracle"