You can use the ISPF cut command
EDIT COLIN.PDSE2(AA) - 01.07
Command ===> cut
****** ********************************* Top of D
000100 ddd
000200 bbbb
cc0300 44444
000400 5555
cc0500 666
000600 777
and this copies the lines into a working area, then use the paste command to insert the text, in the same or a different file.
What is in the clipboard?
The command cut display gave me
┌────────────────────────────────────────────────────────────────┐
│ Clipboard manager │
│ │
│ B - Browse C - Clear O - Toggle Read-only │
│ E - Edit R - Rename D - Delete │
│ │
│ Name Lines User Comment │
│ │
│ _ DEFAULT 3 ISPF Default Clipboard │
│ │
You can now enter B into the line command before DEFAULT to display the contents. This gave me
BROWSE CLIPBOARD:DEFAULT
Command ===>
********************************
44444
5555
666
Multiple clipboards
The command cut AAAA followed by CUT DISPLAY showed all the clipboards I have. This shows the clip board AAA I just created
┌────────────────────────────────────────────────────────────────┐
│ Clipboard manager │
│ │
│ B - Browse C - Clear O - Toggle Read-only │
│ E - Edit R - Rename D - Delete │
│ │
│ Name Lines User Comment │
│ │
│ _ DEFAULT 3 ISPF Default Clipboard │
│ _ AAA 2 │
│ │
You can have up to 11 clip boards.
Other clever things
- You can append or replace the data.
- You can have the data converted to ASCII, EBCDIC or UTF8 as part of the copy.
- You can select eXcluded or Not eXcluded (x or NX) lines.
Paste
You can use the PASTE , or the PASTE AA command to put the value from the specified (or defaulted) clipboard into your data.
You could use
paste AA After .zlast
to paste the data after the end of the file.