public Var consumeReturnCursor(String routine) {
    ArrayList<Var> cursors = returnCursors.get(routine.toUpperCase());
    if (cursors == null) {
      return null;
    }
    Var var = cursors.get(0);
    cursors.remove(0);
    return var;
  }
Get the return cursor defined in the specified procedure
hplsql/src/main/java/org/apache/hive/hplsql/Exec.java