You have to know what you're dealing with ahead of time...
ROWTYPE allows you to dynamically decalre your variables based on what you're accessing...way cool..but also cursor bound...
but cursors don't work the same way everywhere...
Oracle doesn't move data around...it gives you pointers to the data until you need it...
PROCEDURE DPND_BENEF_sp (I_EMPLID IN ENR_DPND_BENEF.EMPLID%TYPE,
I_DEP_BENEF_TYPE IN ENR_DPND_BENEF.DEP_BENEF_TYPE%TYPE,
I_DEP_BENEF_TYPE2 IN ENR_DPND_BENEF.DEP_BENEF_TYPE%TYPE,
DPND_BENEF_cur IN OUT CurRefType) IS
OPEN DPND_BENEF_cur FOR SELECT RELATIONSHIP
,TRUNC((MONTHS_BETWEEN(TO_DATE('01-01-'||(TO_CHAR(SYSDATE,'YYYY')+1),'MM-DD-YYYY'),BIRTHDATE) / 12)) AS AGE
WHERE EMPLID = I_EMPLID
AND DEP_BENEF_TYPE IN (I_DEP_BENEF_TYPE,I_DEP_BENEF_TYPE2);
WHEN OTHERS THEN