Previous Topic: Construct Resolution in Code

Next Topic: Selecting the Proper User Points

Using Single Compound Conditions

It is common to repeat a function in a multiple condition CASE structure. For example:

.—CASE |—CTL.Order Header Status is *Open | internal-function |—DTL.Order Detail Status is *Unprocessed | internal-function |—CTL.Order Value is *LT CTL.Credit Limit | internal-function

Because each internal function is implemented as separate inline code, the code will be repeated, creating a large source module.

However, instead of repeating the function reference, you can use a single compound condition. This eliminates the need to repeat the function references and reduces the number of source lines generated. For example:

.—CASE |— (c1 OR c2 OR c3) | |— c1 CTL.Order Header Status is *Open | |— c2 RCD.Order Detail Status is *Unprocessed | |— c3 CTL.Order Value *LT CTL.Credit Limit | internal-function '— ENDCASE