[ name ]

[ { BEFORE | AFTER } line-label ]




The name of a Named Private Clipboard. If omitted, the standard Windows clipboard is used.



If specified, the clipboard is copied before, or after, a defined line label.

If a before/after line label is not specified, the clipboard is copied into the current edit file in one of the following ways:

  • before a B line command
  • after an A line command
  • repeatedly before the lines in a BB block
  • repeatedly after the lines in an AA block
  • into an O/OO block, overlaying the existing lines with lines from the clipboard
  • into an OR/ORR block, overlay-replacing the existing lines with lines from the clipboard
  • into an H/HH block, replacing the existing lines in that H/HH block


If ERASE is specified, the clipboard will be erased after the PASTE operation is completed.


PASTE copies data from the Windows clipboard to the current edit session.

To Paste data into an empty file:

On the Command line, type:


Press Enter. THe data is copied.

To Paste data into Edit data that is not empty:

Use the A,  B, AA, BB, or H/HH line commands to indicate where the copied data is to be inserted. However, a number indicating that the A or B command should be repeated cannot follow the line command.

On the Command line, type:


The O, OR, or H command can have a count to indicate the number of lines to be overlaid.

If the edit session is not empty, and you do not specify a destination with the A, B, AA, BB, H/HH, O/OO or OR/ORR line command, a error message appears in the upper-right corner of the panel, and the clipboard data is not copied.

See also information on CLIP mode, and Named Private Clipboards, in Windows Clipboard, Cut and Paste.

Mapping the CUT and PASTE primary commands

Because the CUT and PASTE primary commands perform a line-oriented copying and pasting of data, similar to how Ctrl-C and Ctrl-V perform a text-oriented copying and pasting of data, many users will want to create key mappings for the CUT and PASTE commands.

In order to be of the most benefit, you may wish to define these mappings so that the current cursor location is saved and restored, so that its location doesn't "jump around" as SPFLite processes these commands.

Here are some suggested key mappings using Alt-C and Alt-V you may wish to try:

Copying lines of text to the clipboard: Use C/CC or M/MM to define the line range first:

Map Alt-C to:        (SaveCursor)(Home)[CUT](Enter)(RestoreCursor)

Pasting lines of text from the keyboard: The key mapping inserts an A line command for you on the current line:

Map Alt-V to:        (SaveCursor)(LineNo)[A](Home)[Paste](Enter)(RestoreCursor)


Look closely at the syntax for PASTE, which is:


PASTE  [ name ]   [ { BEFORE | AFTER } line-label ]   [ ERASE ]


This means that if you want to use a line-label as the point where your data is pasted, you must also specify either BEFORE or AFTER. Neither of those keywords are assumed, and if you use a label but don't say BEFORE or AFTER, the command is illegal. That is true even if it happened to be one of the reserved .ZF/.ZFIRST or .ZL/.ZLAST labels.


However, you might be thinking, "Why doesn't SPFLite just assume I want all the lines inserted at the end if I say .ZLAST, or before the beginning if I say .ZFIRST?"  In other words, we might want these assumptions to be made:




SPFLite does not make these assumptions, for two reasons:


    1. This is how IBM ISPF works, and SPFLite strives to be compliant with ISPF whenever possible.
    2. The reason IBM did this is because when the label is an ordinary one like .ABC there is simply no way to determine if the lines go before or after. It is true that IBM (and SPFLite also) could "cheat" and just make those assumptions anyway, but that might not always be the correct thing to do.


Still, having to say PASTE AFTER .ZLAST seems like a lot of typing. Is there anything we could do to make it easier?


Yes. We can define two SET assignments, and use them on the command line to shorten this.


First, issue the following SET commands:




Now, when you want to insert after the end, do this:




and to insert before the beginning, do this:




Once these SET assignments are made, you can use PASTE =ZL and PASTE =ZF anywhere a regular command is used, including as aKEYMAP definition.  Using this SET technique is just and concise and easy to as PASTE .ZL and PASTE .ZF with the added advantage that this way will actually work!

Created with the Personal Edition of HelpNDoc: Full-featured EBook editor