Using the RUN and CALL action commands
The CALL and RUN action commands allow a business rule to execute external COBOL programs, known as process extensions, or applications.
CALL Command
The CALL command is used to execute a COBOL process extension, (previously referred to as a user hook). This can be useful if complex processing is required to validate and update the transaction details, and where external data must be accessed.
For example, the business rules attached to the sales order entry function may need to ensure there is adequate stock on hand to meet a sales order, and a separate COBOL program (VALIDATE) has been developed to do this.
Command | Value 1 | Operator | Value 2 | Result |
CALL | VALIDATE | The VALIDATE.GNT cobol program is executed. |
When the CALL command is executed, the current transaction being processed by the rule is passed to the COBOL program with other information in the LINKAGE SECTION. If the transaction details are updated by the COBOL program, the modified transaction details can be returned to the business rules.
These COBOL process extensions must be developed by trained COBOL programmers who have a good understanding of the SunSystems data structures and processes. If you require further information please contact SunSystems Technical Support.
RUN Command
The RUN command runs an external Windows or other application from within business rules. For example, after an error message is displayed the RUN command could be used to initiate MS Notepad to enable the user to make a note of the error message.
Runtime parameters can be entered for the application in the Value 2 field. For example, the business rule might run MS Excel and pass the name of the worksheet to be updated as the parameter.