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


CUT—Cut and Save Lines

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

The CUT macro command saves lines to one of eleven named clipboards for later retrieval by the PASTE command. The lines can be appended to lines already saved by a previous CUT command or the lines can replace the existing contents of a clipboard.

Syntax

Read syntax diagramSkip visual syntax diagram
Macro command syntax

>>-ISREDIT--CUT------------------------------------------------->

   .-.ZFIRST--.ZLAST----.  .-DEFAULT--------.                        
>--+--------------------+--+----------------+--+----+--+---------+-->
   +-labela--labelb-----+  '-clipboard_name-'  +-X--+  +-APPEND--+   
   '-linenum1--linenum2-'                      '-NX-'  '-REPLACE-'   

>--+--------+--------------------------------------------------><
   +-ASCII--+   
   +-EBCDIC-+   
   '-UTF8---'   

linenum1
Relative line number identifying the start of a group of lines in the current member that are to be added to, or replace, data in the clipboard.
linenum2
Relative line number identifying the end of a group of lines in the current member that are to be added to, or replace, data in the clipboard.
labela, labelb
Labels identifying the start and end of the group of lines in the current member that are to be added to, or replace, data in 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|NX
Specify X to cut only lines that are excluded from the display. Specify NX to cut only lines that are not excluded from the display. The default is to cut all lines in the range (both excluded and nonexcluded lines) to the clipboard.
REPLACE|APPEND
Specify REPLACE to replace existing data in the clipboard. If you do not specify REPLACE, the lines in the current CUT are added to the end of the existing data within the clipboard.

If you specify APPEND, you add the data to the clipboard. This is the default.

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 copied from the session to the named clipboard. Lines are specified by label names on the CUT command. The edit macro CUT command always copies lines to the clipboard and does not delete them from the edit session.

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.

You can view the contents of clipboards and rename existing clipboards using the DISPLAY keyword of the CUT command.

Return codes

0
Normal completion
12
Parameter error. Insufficient storage, or no more clipboards available.
20
Severe error

Examples

To save all the lines in the current file to the default clipboard, appending them to lines already in the clipboard:
ISREDIT CUT .ZFIRST .ZLAST
To save all the lines in the current file to a clipboard named USERC1, replacing any lines already in the clipboard:
ISREDIT CUT .ZFIRST .ZLAST USERC1 REPLACE

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014