Copy and paste from a file with sequence numbers to a file with sequence numbers

This example illustrates how to copy and paste text with sequence numbers in the COBOL Editor and how the Enable Smart Copy preference affects a copy-and-paste operation.

Before you begin

Disable the Smart Copy feature:
  1. On the Preferences window, expand COBOL > Editor and then select Sequence Numbers.
  2. On the Sequence Numbers page, select the Manage sequence numbers checkbox and then clear the Enable Smart Copy check box.

Procedure

  1. In the COBOL Editor, open a COBOL source file that contains sequence numbers .
  2. Select several lines of text and then press Ctrl+C to copy the selected text.
    File in COBOL Editor with sequence numbers
  3. In the COBOL Editor, open another COBOL source file that contains sequence numbers.
  4. Position the cursor in column 8 on the line where you want to paste the copied text.
    File in COBOL Editor with sequence numbers
  5. To paste the copied text, press Ctrl+V.
    The copied text is added to the file and the added lines of text are numbered in columns 1-7 and in columns 72-80. The added sequence numbers are out of sequence.
    Pasted text with Smart Copy disabled
  6. To undo the updates, press Ctrl+Z.
  7. Enable the Smart Copy feature:
    1. On the Preferences window, expand COBOL > Editor and then select Sequence Numbers.
    2. Select the Enable Smart Copy checkbox and then click OK.
      Enable Smart Copy preference
    3. Copy and paste the block of text from the file that contains sequence numbers.
      The text is pasted. The sequence numbers in columns 1-7 are numbered in sequence. The sequence numbers in columns 72-80 are replaced with spaces.
      Text with sequence numbers pasted with Enable Smart Copy