![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
A co-worker is trying to get the following SPL procedure to work and gets error 674 when he runs it. What he wants to do is have a generic stored procedure he can call passing in the name of another stored procedure and its parameter list and execute the passed in proc. Below is his "test" proc and "run" proc to figure out how to do what the manuals and reference books say can be done. I can't find the issue, what are we missing? We have IDS 7.31.UC4 running on HPUX B.11.00. Help! John David Adamski Information Systems Specialist Graceland University { Revision Information (Automatically maintained by 'make' - DON'T CHANGE) ------------------------------------------------------------------------- $Header: procskeleton,v 8.0 2002/05/09 08:36:56 debarthe Released $ ------------------------------------------------------------------------- } { Test_procedure } drop procedure test_proc; create procedure test_proc(parm_in char(32)) returning char(32); Set isolation to dirty read; set optimization low; return parm_in; end procedure; grant execute on test_proc to public; --------------------------------------------------- { Procedure to run a procedure } drop procedure run_proc; create procedure run_proc(proc_in char(64)) returning char(254); define the_procname varchar(64); define the_result char(254); Set isolation to dirty read; set optimization low; let the_procname = "test_proc"; --execute procedure test_proc (proc_in) into the_result; -- above line works execute procedure the_procname (proc_in) into the_result; return trim(the_result); end procedure; grant execute on run_proc to public; {Add an execute for testing and to try to force optimization} execute procedure run_proc("Test result, it worked!"); -- get the following error -- 674: Routine (the_procname) can not be resolved. -- 111: ISAM error: no record found. |
![]() |
| Thread Tools | |
| Display Modes | |
| |