Joel W Winston
Member
Hi All,
I have defined the following class for calling an appserver. In the method "RunOnAppserver" I may call different external procedures which may have different parameters. How do I generalise this method so as to accomodate the different parameters used for different calls.
METHOD public VOID RunOnAppserver(fname AS character):
IF l-connected then
RUN VALUE(fname) ON SERVER h-appservhd1.
END METHOD.
Could someone advise?
Thanks
Joel
The following is the complete class.
class mast.appserver:
DEFINE private VARIABLE h-appservhd1 AS handle NO-UNDO.
DEFINE PUBLIC VARIABLE l-connected AS logical NO-UNDO.
CONSTRUCTOR public appserver():
CREATE SERVER h-appservhd1.
END METHOD.
METHOD private void connect(parameters AS character ):
l-connected = h-appservhd1:connect( parameters ). /*"-S 3090 -H 10.101.0.26 -App asbroker1"*/
END METHOD.
METHOD public VOID RunOnAppserver(fname AS character):
IF l-connected then
RUN VALUE(fname) ON SERVER h-appservhd1.
END METHOD.
DESTRUCTOR PUBLIC appserver():
h-appservhd1ISCONNECT().
DELETE OBJECT h-appservhd1.
END METHOD.
END class.
I have defined the following class for calling an appserver. In the method "RunOnAppserver" I may call different external procedures which may have different parameters. How do I generalise this method so as to accomodate the different parameters used for different calls.
METHOD public VOID RunOnAppserver(fname AS character):
IF l-connected then
RUN VALUE(fname) ON SERVER h-appservhd1.
END METHOD.
Could someone advise?
Thanks
Joel
The following is the complete class.
class mast.appserver:
DEFINE private VARIABLE h-appservhd1 AS handle NO-UNDO.
DEFINE PUBLIC VARIABLE l-connected AS logical NO-UNDO.
CONSTRUCTOR public appserver():
CREATE SERVER h-appservhd1.
END METHOD.
METHOD private void connect(parameters AS character ):
l-connected = h-appservhd1:connect( parameters ). /*"-S 3090 -H 10.101.0.26 -App asbroker1"*/
END METHOD.
METHOD public VOID RunOnAppserver(fname AS character):
IF l-connected then
RUN VALUE(fname) ON SERVER h-appservhd1.
END METHOD.
DESTRUCTOR PUBLIC appserver():
h-appservhd1ISCONNECT().
DELETE OBJECT h-appservhd1.
END METHOD.
END class.