title: referencing a variable from another procedure in plsql
body: <p>I have written a package : </p>
  
  <pre><code>CREATE OR REPLACE
      PACKAGE BODY NEW_HIRE_PKG
      AS
      PROCEDURE load_emp(
          errbuf OUT VARCHAR2,
          retcode OUT VARCHAR2 )
      AS
        CURSOR cur_person_info
        IS
          SELECT * FROM table_abc;
        CURSOR cur_person_adr
        IS
          SELECT * FROM table_adr;
        l_person_id      NUMBER;
        l_emp_num        NUMBER;
        lv_add_type      VARCHAR2(100);
        lv_address_line1 VARCHAR2(100);
      BEGIN
        FOR person_info_rec IN cur_address_info
        LOOP
          hr_employee_api.create_employee ( p_validate =&gt; FALSE,
          --INPUT Parameter
          P_HIRE_DATE =&gt;person_info_rec.DATE_START,
          -- output
          p_employee_number =&gt; lc_employee_number, p_person_id =&gt; ln_person_id );
        END LOOP ;
      END;
  
  PROCEDURE load_add(
              errbuf OUT VARCHAR2,
              retcode OUT VARCHAR2 )
  as 
  ln_person_id number;
  
          BEGIN
            FOR address_info_rec IN cur_address_info
            LOOP
              BEGIN
                hr_person_address_api.create_person_address 
                (p_validate =&gt; FALSE,
                p_effective_date =&gt; TRUNC(SYSDATE),
                p_person_id=&gt; ln_person_id,   
                --output
                p_address_type =&gt; lv_add_type,
                p_address_line1 =&gt; lv_address_line1);
  
             end; 
           end loop;
          end;
        end; 
  </code></pre>
  
  <p>Now in the procedure the <code>load_add</code> there is a variable ln_person_id which should be the person ids generated in the procedure load_emp. I want to pass it in this procedure one by one. Can i do it by making ln_person_id an object ?</p>