MainframeSupports
tip week 2/2010:

From the beginning ISPF was not equipped with a CUT and PASTE function for EDIT (and later VIEW). At some point in time IBM made two sample macros called CUT and PASTE, but those two macros had such a bad design that most installations made their own implementation. Those implementations had different names as IBM reserved the names CUT and PASTE. At the end of the 1980s I made similar commands called PUTS and GETS and later I used CUTS and PASTES. Other installations used or still uses PUT and GET and on your installation you may have homegrown CUT and PASTE commands with quite diferent names.

In 1999 IBM finally decided to implement CUT and PASTE as real EDIT/VIEW commands where the implementation finally matched the needs of the users. The only problem is that many of us has not yet discovered this because we are used to some homegrown version. I will admit that it is only three yeas ago I discovered that CUT and PASTE now works as it should have done from the beginning.

I will also admit that I am so used to the homegrown implementations that I use them instead although CUT and PASTE are pretty advanced with lots of useful functionality. As default CUT will replace the data in the clipboard from your previous CUT while PASTE will copy the contents of the clipboard without removing the data from the clipboard. If you want to append data to the existing data in the clipboard you may use CUT APPEND. Another good command is CUT DISPLAY which gives you access to view the contents of the clipboards and also shows you if you have created other clipboards than the default clipboard. You may create other clipboards if you write a name after CUT. After PASTE you just write the same name in order to paste data from your individually named clipboard.

By the way you are able to configure the way you want CUT and PASTE to work by using the command EDITSET/EDSET. This command also gives you access to configure other parts of EDIT and VIEW. Depending on how creative the ISPF responsible systems programmer has been when he or she installed ISPF you may use up to 11 individually named clipboards. Each clipboard may have a size up to about one megabyte of data. The clipboards are implemented as dataspaces. A dataspace is like an address space, but it can only contain data. Unfortunately it requires advanced assembler skills to be able to create and use dataspaces. Dataspaces lives just as long as the address space from where they were created. Therefore the clipboard data does not survive from one TSO session to the next.

Previous tip in english        Sidste danske tip        Tip list