MAC-PAC Homecontact ussupport login 
Documentation > MAC-PAC Reference Library > Distribution > Expert Configurator > Key Concepts and Procedures > Expert Configurator Rules > External Program Rule

External Program Rule

 

The external program rule adds the ability to specify a program to call from rules along with a list of parameters to be passed.  If the external program is not found then the configuration programs will end in error and the standard error processing will be invoked.  If the external program is found then the return value, as determined by the external variable, will be stored in the variable name and type specified on the rule header. The external program rule will be interpreted as true when the return value type returned from the external program  is either N (numeric) or A (alphanumeric).  If the return value type is not one of the standard value types then the rule will be interpreted as false.

 

Identification

System Identifier:          23

Valid Rules Categories: Sales Order Entry

                                    Manufacturing

                                    Pricing

Action Expression 1

There are no action expressions for this rule.

Add an External Program Rule

1.   Display the Rules Maintenance Function Select screen.

a.   Select the Expert Configurator option from the System Application Menu.

b.   Select the Sales Order, Pricing, or Manufacturing Rule Maintenance options from the Expert Configurator Application Menu to display the select screen.

2.   Enter the Function Select information.

a.   Assign a unique number to the rule.

b.   Enter the action code for an external program variable rule in the Action Code field.  Action codes are defined in category Y03 on the Reference File.

c.   Enter a 1 (addition) in the Maintenance Code field.

d.   Press the Enter key to display the header screen.

3.   Enter the header information.  See the External Program Rule Header screen in the Screens section of this manual for more information.

4.   Enter the header information.

a.   Enter the program name that will be called.  (User defined and required)

b.   Enter the value for the variable type. (Required)

This field is used to store return information. The type can be either S for secondary, G for global, or O for option.

c.   Enter the variable name. (User defined and required)

This field is used to store return information.

d.   Enter the releasing rule for the external program. (Required on the header)

e.   Enter the releasing rule result. (Required on the header)

5.   Press the Enter key to display the detail screen.

6.   You have the option to enter parameters that will be passed to the external program during processing.

a.   Enter up to 99 parameters that consist of a variable type, variable, name, and description..

7.   Press the Enter key to add this external program rule to the Rule Master File.

Change an External Program Rule

1.   Select the Sales Order, Pricing, or Manufacturing Rule Maintenance option from the Expert Configurator Application Menu.

2.   On the Rule Maintenance Function Select screen:

a.   Enter the external program rule number in the Rule Number field.

b.   Enter a 2 in the Maintenance Code field to change the header information for the rule.  Enter a 3 in the Maintenance Code field to change the detail information for the rule.

3.   Change the descriptive data for the rule and press the Enter key.

4.   If all fields are valid, the rule is changed on the Rule Master File.

Reactivate or Deactivate an External Variable Rule

1.   Select the Rule Maintenance option from the Configuration Menu.

2.   On the Rule Maintenance Function Select screen:

a.   Enter the external program rule number in the Rule Number field.  All rules released by this rule must be deactivated before this rule can be deactivated.

b.   Enter a 4 in the Maintenance Code field to deactivate the rule.  Enter a 5 in the Maintenance Code field to reactivate the rule.

3.   Press the Enter key to deactivate or reactivate the rule.

4.   Press F3 to exit without deactivating or reactivating the rule.