PASTE—Move or Copy Lines from Clipboard
The PASTE macro command moves or copies lines from a clipboard into an edit session.
Syntax
- clipboardname
- The name of the clipboard to use. If you omit this parameter, the ISPF default clipboard (named DEFAULT) is used. You can define up to ten additional clipboards. The size of the clipboards and number of clipboards might be limited by installation defaults.
- BEFORE
- The destination of the data that is being transferred from the clipboard. BEFORE copies the data before the specified label linenum or label.
- AFTER
- The destination of the data that is being transferred from the clipboard. AFTER copies the data after the specified label linenum or label.
- linenum
- A relative line number identifying the line after, or before, which the lines from the clipboard are copied or moved.
- label
- A label identifying the line after, or before, which the lines from the clipboard are copied or moved.
- KEEP
- Records are copied and not removed from the clipboard.
- DELETE
- Records are moved and deleted from the clipboard.
- ASIS
- The PASTE command determines the character set of the data in
the clipboard. If this is different to the character set being used
for the file being edited an automatic conversion occurs for the data
being pasted into the file.
If ASIS is specified, then the automatic conversion does not take place.
Description
PASTE copies or moves lines from a specified clipboard to the current edit session. If lines in the clipboard are longer than the lines in the edit session, they are truncated.
The portion of the line that is saved in the clipboard is only the data portion of the line. Line numbers are not saved. If the data was CUT from a data set that had sequence numbers and is PASTEd into an edit session without sequence numbers, or if it was CUT from a data set without sequence numbers and PASTEd into a session with sequence numbers, some shifting of data is likely to occur.
Return codes
- 0
- Normal completion
- 12
- Parameter error. Clipboard is empty or does not exist.
- 20
- Severe error
Examples
To paste data from the default
clipboard to the line after the last line in the edit session:
ISREDIT PASTE AFTER .ZLAST DELETETo
paste data from the default clipboard to the line after the first
line in the edit session, without clearing the contents of the clipboard:
ISREDIT PASTE AFTER .ZFIRST KEEP