CUT—Cut and Save Lines
The CUT primary command saves lines to one of 11 named clipboards for later retrieval by the PASTE command. The lines can be appended to lines already saved by a previous CUT command or can replace existing lines in a clipboard.
Syntax
- labela, labelb
- Labels identifying the start and end of the group of lines the
CUT command is to copy or move to the clipboard.
For more information about using labels to identify a group of lines, see Labels and line ranges.
- linenum1, linenum2
- Relative line numbers identifying the start and end of the group of lines the CUT command is to copy or move to the clipboard.
- clipboard_name
- 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.
- X
- Cut only lines that are excluded from the display.
- NX
- Cut only lines that are not excluded from the display.
- REPLACE
- Replace existing data in the clipboard.
You can select REPLACE as the default by entering the EDITSET command on the editor command line. The default action depends on the setting specified in the panel displayed by the EDITSET. You should always specify REPLACE (or APPEND) in a macro because the user can change the default behavior.
- APPEND
- Add the data to the clipboard. You can select APPEND as the default by entering the EDITSET command on the editor command line. The default action depends on the setting specified in the panel displayed by the EDITSET. You should always specify APPEND (or REPLACE) in a macro because the user can change the default behavior.
- DISPLAY
- Show a list of existing clipboards. From this list you can browse, edit, clear, or rename the clipboards.
- ASCII, EBCDIC, UTF8
- When one of these keywords is supplied, if the data is using a different character set to that designated by the keyword, the data being placed in the clipboard is converted to the character set designated by the keyword and tagged as being in the designated character set.
Description
CUT saves copies of lines from an edit session to a clipboard for later retrieval by the PASTE command. The lines are moved or copied from the session to the named clipboard. Lines are specified by either the C (Copy) or M (Move) line commands, CC or MM block line commands, or label names. If the C or CC line commands or labels are used to identify the lines, the lines are copied to the clipboard. If the M or MM line commands are used to identify the lines, the lines are copied to the clipboard and deleted from the edit session (in effect, moving them).
All lines in the edit session are copied to the clipboard if you do not specify the lines using a label range on the CUT command, or through the C or M commands.
If you specify a clipboard name, lines are copied to that clipboard. If the specified clipboard does not yet exist, it is created. ISPF provides a default clipboard named DEFAULT. You can use up to 10 other clipboards that you define. The defined clipboards exist as long as you are logged on to TSO and are deleted when you log off.
CUT DISPLAY
Examples
CUT .ZCSR .ZLAST APPEND
CUT .ZFIRST .ZLAST USERC1 REPLACE
This example assumes that you have APPEND set as the default behavior in the EDITSET command panel. Because all lines are copied by default, in this case you could omit the labels .ZFIRST and .ZLAST.