I have a stored procedure and I need to call it several times with different sets of input. It looks like a script could do the job. How to generate the script? Ask Oracle SQL Developer (Version 4.2.0.17.089)! , So I bring up the following: [![Run PL/SQL box](https://i.stack.imgur.com/pEe7n.png)](https://i.stack.imgur.com/pEe7n.png)

(By the way, what is this window called? And can this be accessible from menu bar?)

I select the right stored procedure, specify the correct parameter and click 'Save File'. Here is the saved SQL file:

```
DECLARE
  I_MENU VARCHAR2(200);
  ERRMSG VARCHAR2(200);
  P_RETURNCUR SYS_REFCURSOR;
BEGIN
  I_MENU := '4';

  CMS_ACCESS_CONTROL.GETCMSMENUITEMINFO(
    I_MENU => I_MENU,
    ERRMSG => ERRMSG,
    P_RETURNCUR => P_RETURNCUR
  );
  /* Legacy output: 
DBMS_OUTPUT.PUT_LINE('ERRMSG = ' || ERRMSG);
*/ 
  :ERRMSG := ERRMSG;
  /* Legacy output: 
DBMS_OUTPUT.PUT_LINE('P_RETURNCUR = ' || P_RETURNCUR);
*/ 
  :P_RETURNCUR := P_RETURNCUR; --<-- Cursor
--rollback; 
END;

```

I want to copy and paste the lines between `BEGIN` and `END` several times. Each time specify its set of input parameters (different I\_MENU). But before doing so, I try to execute the file in SQL Developer. I have not made any modification but get this error:

```
Error report -
ORA-06550: Line 20, column 22
PLS-00382: expression is of wrong type
ORA-06550: Line 20, column 4
PL/SQL: Statement ignored
06550. 00000 -  "line %s, column %s:\n%s"
*Cause:    Usually a PL/SQL compilation error.
*Action:

```

Questions: 1) Why do I get this error? 2) How to call same stored procedure multiple times with different set of parameters? I want a script to do so as I have to pass the script to another person to execute.

Here is the stored procedure (there is absolutely no `/` after `end getCMSMenuItemInfo`)

```
Procedure getCMSMenuItemInfo(
    i_menu                       in varchar2,     
    ERRMSG                       out varchar2,
    P_RETURNCUR                  out SYS_REFCURSOR)
as
begin
    open P_RETURNCUR for

    SELECT menu_item, menu_url
    FROM someMenu
    WHERE menuID = i_menu;

end getCMSMenuItemInfo;

```