I have written code to pass parameters to a stored procedure from VBA code in Excel. Works fine. However, problem is parms sent and returned need to be variable leghth.
I have scoured the internet trying to find anything that is close.
I have found that the Options(*varsize) can be used in an RPGLE main module with a PI Program Interface. Here is some code I've put together...it is incomplete, but if any one could finish out the source, i can take it from there.
So far, I have not even been able to compile this one. New to Sub Procedure usage... so please excuse my ingnorance.
How do I compile the source, and how is it called. Just a basic template program will be sufficient.
One more issue before you get too involved - can Parm2 be a returned parm? Important - Excel uses returned parm for further processing.
* Prototype for Procedure
D Tst05r PR 5U 0
D Parm1 72A Options(*VarSize) Const
D Parm2 72A Options(*VarSize) Const
D Parm3 100A Options(*VarSize) Const
D Parm4 100A Options(*VarSize) Const
* Procedure Inteface to Entry Parms
P Tst05r B
D Tst05r PI 5U 0
D Parm1 72A Options(*VarSize) Const
D Parm2 72A Options(*VarSize) Const
D Parm3 100A Options(*VarSize) Const
D Parm4 100A Options(*VarSize) Const
C*
I have scoured the internet trying to find anything that is close.
I have found that the Options(*varsize) can be used in an RPGLE main module with a PI Program Interface. Here is some code I've put together...it is incomplete, but if any one could finish out the source, i can take it from there.
So far, I have not even been able to compile this one. New to Sub Procedure usage... so please excuse my ingnorance.
How do I compile the source, and how is it called. Just a basic template program will be sufficient.
One more issue before you get too involved - can Parm2 be a returned parm? Important - Excel uses returned parm for further processing.
* Prototype for Procedure
D Tst05r PR 5U 0
D Parm1 72A Options(*VarSize) Const
D Parm2 72A Options(*VarSize) Const
D Parm3 100A Options(*VarSize) Const
D Parm4 100A Options(*VarSize) Const
* Procedure Inteface to Entry Parms
P Tst05r B
D Tst05r PI 5U 0
D Parm1 72A Options(*VarSize) Const
D Parm2 72A Options(*VarSize) Const
D Parm3 100A Options(*VarSize) Const
D Parm4 100A Options(*VarSize) Const
C*