Understanding Variable-Based Extraction

When you perform a computation-based extraction, you can slice by statement or by variable. What's the difference? Suppose you are interested in calculations involving the variable X in the example below:

MOVE 1 TO X 
MOVE 1 TO Y 
DISPLAY X Y.

If you perform statement-based extraction (if you slice on the statement DISPLAY X Y), all three statements will be included in the component. If you perform variable-based extraction (if you slice on the variable X), only the first and third statements will be included. In variable-based extraction, that is, Component Maker tracks the dependency between X and Y, and having determined that the variables are independent, excludes the MOVE 1 to Y statement.

Note: If you slice on a variable for a Cobol component, you must select Variable in the Component Type Specific options for computation-based extraction.