z/OS ISPF Edit and Edit Macros
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


C—Copy Lines

z/OS ISPF Edit and Edit Macros
SC19-3621-00

The C (copy) line command copies lines from one location to another.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-C--+---+----------------------------------------------------><
      '-n-'   

Read syntax diagramSkip visual syntax diagram
>>-CC----------------------------------------------------------><

n
The number of lines to be copied. If you do not type a number, or if the number you type is 1, only the line on which you type C is copied.

Description

To copy one or more lines within the same data set or member:

  1. Type C in the line command field of the line to be copied. If you also want to copy one or more lines that immediately follow this line, type a number greater than 1 after the C command.
  2. Next, specify the destination of the line to be copied by using either the A (after), B (before), or O (overlay) line command.
  3. Press Enter. The line or lines are copied to the new location.

To copy a block of lines within the same data set or member:

  1. Type CC in the line command field of both the first and last lines to be copied. You can scroll (or use FIND or LOCATE) between typing the first CC and the second CC, if necessary.
  2. Use the A (after), B (before), or OO (overlay) command to show where the copied lines are to be placed. Notice that when you use the block form of the C command (CC) to copy and overlay lines, you should also use the block form of the O command (OO).
  3. Press Enter. The lines that contain the two CC commands and all of the lines between them are copied to the new location.
Note: Only blank characters in the lines specified with O or OO are overlaid with characters in the corresponding columns from the source lines. Characters that are not blank are not overlaid. The overlap affects only those characters within the current column boundaries.

To copy lines to another data set or member:

  1. Type either CREATE or REPLACE on the command line.
  2. Use one of the forms of the C command described previously.
  3. Press Enter.
  4. On the next panel that PDF displays, type the name of the data set or member that you want to create or replace.
  5. Press Enter. The lines are copied to the data set or member that you specified.
Note: To copy lines into an existing data set or member without replacing that data set or member, edit the existing data set or member and use the COPY primary or macro command.

Examples

The example in Figure 1 shows how to copy data by using the C and B line commands. Type C in the line command field of the line you want to copy. Type B in the line command field of the line that you want the copied line to precede.

Figure 1. Before the C (Copy) line command
Screen dump.
When you press Enter, the line where you typed the C command is copied preceding the line where you typed the B command, as shown in Figure 2.
Note: If you press Enter before specifying where you want the data to go, the editor displays a MOVE/COPY pending message at the top of the panel. The line is not copied until you specify a destination.

While in MOVE/COPY pending mode, you can issue FIND and LOCATE primary commands, but you cannot use a CHANGE command to change data until after the copy completes.

Figure 2. After the C (Copy) line command
Screen dump.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014