Understanding Blocking

For COBOL programs, you can use a technique called blocking to produce smaller, better-defined parameterized components. Component Maker will not include in the slice any part of the calculation that appears before the blocked statement. Fields from blocked input statements are treated as input parameters of the component.

Consider the following fragment:

INP1.
  DISPLAY "INPUT YEAR (1600-2099)".
  ACCEPT YEAR.
   CALL 'PROG' USING YEAR.
  IF YEAR > 2099 OR YEAR < 1600 THEN
   DISPLAY "WRONG YEAR".

If the CALL statement is selected as a block, then both the CALL and ACCEPT statements from the fragment are not included in the component, and YEAR is passed as a parameter to the component.

Tip: Specify blocking in the blocking dialog accessed from the Interface options pane.