The LPEX Editor allows you to extract contiguous COBOL
statements into a new paragraph.
Before you begin
Before you begin, you must open a file with the LPEX Editor
and the file must contain COBOL code that includes a Procedure Division.
About this task
The action is enabled based on the validity and the completeness
of selected text:
- Validity
- Means that the action is enabled only when text is selected in
the Procedure Division of the COBOL source. Furthermore, if you select
a COBOL word or variable name, the action is disabled.
- Completeness
- Means that the selected text contains one or more valid COBOL
statements. It also means that if you select a partial statement such
as an IF statement or a partial PERFORM statement, the action is disabled
until you extend the selection to select the complete IF or PERFORM
statement.
To extract a paragraph, complete the following
steps:
Procedure
- Select valid text and right-click. A menu
is displayed.
- Click Refactor > Extract Paragraph. An Extract
Paragraph window is displayed.
- In the Extract Paragraph window, perform
the following tasks:
- Fill in the New paragraph name field.
- Optionally fill in the End paragraph name and Commentfields.
- Specify the extraction location: Closest
valid location or At the end.
- If you want to extract the paragraph into a new section,
select the Extract into a new section check
box, and type the new section name, and specify the section after
which the new section is to be placed.
- If you want to generate paragraph comments, select the Generate
paragraph comments check box.
- Perform one of the following actions:
- Click OK.
- Click Preview after optionally selecting Force
preview.
A "Found problems" window
is displayed.
- Click Continue. If
you clicked Preview in the previous step, a
preview window is displayed.
- If a preview window is displayed, click OK.