Extracting a section or paragraph from a COBOL program to a new program

To extract the contents of a paragraph or section from a COBOL program and generate a new program follow the steps below.

Note: The original program will be modified to call the newly created program.
  1. In the COBOL editor, place the cursor on a paragraph or section.
  2. Right-click in the editor and then click COBOL Refactoring > Extract Section/Paragraph to Program
  3. In the Extract a Section/Paragraph from Program field, type a name for the new file.
  4. Click OK.
  5. The new program is created, added to your project and open in the editor. The original program is modified to call the new program.
Note: The code generated from a section or paragraph extract will depend on the context from which the extract was invoked. For example, if a section extract is invoked from a program that does not reference that section, then the generated program will not include any input or output parameters.

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