title: Using an out parameter from an execute immediate statement that calls a procedure
body: <p>I have a procedure that has an execute immediate statement. Within that execute immediate statement calls a procedure that has two out parameters. I'm having trouble trying to obtain those out parameters to be used in the procedure calling the execute immediate statement.</p>
  
  <pre><code>execute_stmt := 'DECLARE pi_error_log_rec error_log%ROWTYPE; p_plan_id NUMBER; begin SCHEMA.PACKAGE_NAME.' ||
                  PROCEDURE || '(' ||
                  p_audit_log_id || ', ' ||
                  V_PARAMETER1 || ', ' || '''' ||
                  V_PARAMETER2 || '''' ||
                  ', p_plan_id, pi_error_log_rec); end;';
  execute immediate execute_stmt;
  
  if(pi_error_log_rec.error_text IS NOT NULL) THEN
    --do stuff;
  ELSE
    --do stuff;
  </code></pre>
  
  <p>The out parameters are <code>p_plan_id</code> and <code>pi_error_log_rec</code>, the remaining are IN parameters. So I need to obtain those two outputs for use inside the procedure calling this execute immediate. But it's not setting the output in the variable. Am I missing a step or should I use a different approach in using out parameters?</p>