Passing parameter across Webspeed program

mjdarm

Member
Hi All,

I have a query.

We have built a webspeed application in which many transactions happen.
Now, a new third party system is introduced to some of the work which was earlier done in Webspeed application. On completion of these transaction, the webspeed application will be called by passing some parameters.

We have done by accepting the values etc.. We are facing problem while passing these accepted values to next set of called programs in webspeed.
When tried to use a shared variable, it gives an error.
Is there any other method to pass the values to multiple called programs?

Regards
Mugundan
 

RealHeavyDude

Well-Known Member
Shared variables are - IMHO - bad, bad practice.

For shared variable to work you must define them as new in the first programm you are using them.

Parameter passing from one procedure to another is very easy. Have a look at the documentation for the RUN and DEFINE PARAMETER statemtents.

For example:

RUN xyz.p ( INPUT myVariable1, INPUT myVariable2, OUTPUT myVariable3 ).

In your xyz.p:

DEFINE INPUT PARAMETER myParameter1 AS CHARACTER NO-UNDO.
DEFINE INPUT PARAMETER myParameter2 AS CHARACTER NO-UNDO.
DEFINE OUPUT PARAMETER myParameter3 AS LOGICAL NO-UNDO.


Be aware of the parameter signature - you won't get a compile time error, instead you will get a runtim error with a mismatch.


HTH, RealHeavyDude.
 
Top