Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Info-ingres] Call 4glprocedures and methods dynamically

24 views
Skip to first unread message

Sergio Sperandio

unread,
May 22, 2006, 12:04:56 PM5/22/06
to

I would like to call a 4GL Procedure in a very dynamic way, but up to now I was not able in doing that. In order to explain my question, I provide an example.

The following works (procedure without parameters):

 my_var = varchar (50);

...

 my_var = 'MyProcedure';

callproc :my_var;

 This executes procedure "MyProcedure".

 My problem arises when I try to specify some parameters, and statically I don't know their names and the values they have to assume.

 For example, let procedure MyProcedurePar be defined as follows:

 PROCEDURE MyProcedurePar (

            param1 = integer,           param2 = integer

) = DECLARE

ENDDECLARE

BEGIN

            message varchar (param1) + ' - ' + varchar (param2);

END

;

 

I would like to know whether exists a way for calling it without using the following syntax:

 

CALLPROC MyProcedurePar (param1 = 1, param2 = 2);

 

I would like to insert both procedure name and parameters in two varchars, i.e.:

 

my_proc = 'MyProcedurePar (param1 = 1, param2 = 2)'

CALLPROC :my_proc;

 

but it does not work, since OpenRoad considers the whole variable as the procedure name.

I tried to get the ProcHandle and use the call method, but the problem remains.

 

I hope somebody of you might help me.

Thanks,  Sergio

Ingres Forums

unread,
Mar 27, 2013, 2:24:08 AM3/27/13
to

I need to do the same as above too.
Since there's been no reply for so long, does that mean it is really not
possible to do that in OpenRoad?


--
hlpeng
------------------------------------------------------------------------
hlpeng's Profile: http://community.actian.com/forum/member.php?userid=11606
View this thread: http://community.actian.com/forum/showthread.php?t=6312

Paul White

unread,
Mar 27, 2013, 3:46:23 AM3/27/13
to Ingres and related product discussion forum, openroa...@googlegroups.com

Hi Hlpeng

 

Yes, OpenROAD supports dynamic calls, including creating, compiling and running procedures at runtime.

 

You can find a follow up discussion to the original question (posted in 2006) over here

 

 

Be sure to research:

 

International OpenROAD Users Mailing list

https://groups.google.com/forum/#!forum/openroad-users

(Send your questions to openroa...@googlegroups.com)

 

OpenROAD developer forum

http://community.actian.com/forum/application-development-using-openroad/

 

kind regards

Paul White

OpenROAD Users admin

_______________________________________________

Info-Ingres mailing list

Info-...@kettleriverconsulting.com

http://ext-cando.kettleriverconsulting.com/mailman/listinfo/info-ingres

Ingres Forums

unread,
Apr 5, 2013, 12:51:43 PM4/5/13
to

from Paul White:
Yes, OpenROAD supports dynamic calls, including creating, compiling and
running procedures at runtime.

You can find a follow up discussion to the original question

http://community.actian.com/forum/comp-databases-ingres/6312-info-ingres-call-4glprocedures-methods-dynamically.html#post17392


(posted in 2006) over here:
https://groups.google.com/d/msg/openroad-users/umrCNTjGO5U/rlJgxiPJfpUJ

Be sure to research:
International OpenROAD Users Mailing list
https://groups.google.com/forum/#!forum/openroad-users

(Send your questions to openroa...@googlegroups.com)

OpenROAD developer forum

'Application Development using OpenROAD - Actian Community Forums'
(http://community.actian.com/forum/application-development-using-openroad/)

kind regards
Paul White
OpenROAD Users admin

-----Original Message-----
From: Ingres Forums
Sent: Wednesday, 27 March 2013 4:24 PM
To: info-...@kettleriverconsulting.com
Subject: Re: Call 4glprocedures and methods dynamically

I need to do the same as above too.
Since there's been no reply for so long, does that mean it is really not
possible to do that in OpenRoad?

-- hlpeng


--
pperry
------------------------------------------------------------------------
pperry's Profile: http://community.actian.com/forum/member.php?userid=105639
View this thread: http://community.actian.com/forum/showthread.php?t=6311

0 new messages