When a Wrapper Wants to Request a RAMP Script to Do Something

It uses the #COM_OWNER.AVREQUEST5250FORM method to send a request identifier and up to five optional additional values. The RAMP script receives request in its vHandle_AVREQUEST5250FORM function.  Here are some copy/paste code examples of this process:

The Visual LANSA wrapper sends a request to RAMP script:

#COM_OWNER.AVREQUEST5250FORM Requestid("SomeRequestId") Sendainfo1("A1") Sendainfo2("A2") Sendainfo3("A3") Sendainfo4("A4") Sendainfo5("A5")

The RAMP script receives the request from Visual LANSA wrapper:

/* =============================================================== */

/* ==================== vHandle_AVREQUEST5250FORM ================ */

/* =============================================================== */

vHandle_AVREQUEST5250FORM: function(sRequestId, sInfo1, sInfo2, sInfo3, sInfo4, sInfo5)

{

    alert ("vHandle_AVREQUEST5250FORM invoked in RAMP script to handle request " + sRequestId

           + ". sInfo1=" + sInfo1 + ", sInfo2=" + sInfo2

           + ", sInfo3=" + sInfo3 + ", sInfo4=" + sInfo4 + ", sInfo5=" + sInfo5 );

 

    return(true);

},

Requests are sent asynchronously and the order of receival is not guaranteed.