Creating a program from condition

To create a program from condition means to create a new program with all statements treating the value of a selected data item as if it were hard-coded, removing code paths that were not executed.

Note: The original program will not be modified.
  1. In the COBOL editor, place the cursor on the data item.
  2. Right-click in the editor and then click COBOL Refactoring > Create Program from Condition
  3. In the Create a Program from Condition field, type a name for the new file.
  4. Type a condition value and select Equal or NotEqual
  5. Click Create.
  6. The new program is created, added to your project and open in the editor.

If you want to revert the code slicing changes and remove the new file from your project, click Edit > Undo.