Encapsulating Lawson 4GL Procedures

Lawson 4GL procedures can request the services of separately compiled Lawson online programs using the 4GL verb INVOKE. This provides greater independence and modularity in an application system architecture. An INVOKE operation causes a named program to be activated, a message sent, and a message returned. The activating program remains in waiting until a subsequent message is received.

With INVOKE, a procedure can be encapsulated and its data message requested as needed; no code is copied into the program requesting the data. This encapsulation provides several benefits. Application development can be broken down into smaller, more manageable components. Individual procedures have clearer identity, can be developed independently, and can be tested more precisely.

Using INVOKE to initiate a specific task means that the code need not be put into a procedure library (pdlib) that is copied into many programs that use some other procedure in the library. Applications are reduced in size because the code is not replicated unnecessarily, and compile times are therefore reduced.