Pasting Multiple Places



TSO Programming, ISPF, SDF, SDSF and PDF, FTP, TCP/IP Concepts, SNA & SNA/IP etc...

Pasting Multiple Places

Postby Smittyx6 » Thu Jan 26, 2012 9:34 pm

Is there a way to paste blocks of code in multiple locations in a dataset?
I have cut 10 blocks of code and need to paste 15 places inside of a dataset.
I can use the paste with the 'A' at the line number to do it once, is there a variation of this command that will allow the paste to apply all 15 places at once?
Thanks,
Kevin
Smittyx6
 
Posts: 2
Joined: Thu Jan 26, 2012 9:29 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Pasting Multiple Places

 

Re: Pasting Multiple Places

Postby BillyBoyo » Thu Jan 26, 2012 10:02 pm

Have you tried PF1, assuming you are in the ISPF editor? There is a "K" that you can append to the A/B which will "keep" the line(s) copied so they can be copied in more than one place. Just with the last one, leave the "K" off. Does that do what you want?

If not, or as an extra, you could look at a little edit macro in rexx.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Pasting Multiple Places

Postby Ed Goodman » Fri Jan 27, 2012 1:46 am

That one tricked me! You have to enter the AK, AK and a final A all at once. You can't just do an "AK" and press enter, then go find the next spot and do another "AK" and press enter.
Ed Goodman
 
Posts: 342
Joined: Thu Feb 24, 2011 12:05 am
Has thanked: 3 times
Been thanked: 17 times

Re: Pasting Multiple Places

Postby Smittyx6 » Fri Jan 27, 2012 2:46 am

Thanks for the replies.
I got this work inside the dataset.
Couldn't get it to work with cut and paste to another dataset.
I can paste and then cc to all the other places with ak.
Thanks,
Kevin
Smittyx6
 
Posts: 2
Joined: Thu Jan 26, 2012 9:29 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Pasting Multiple Places

Postby BillyBoyo » Fri Jan 27, 2012 4:31 am

Ed, seems I can :-)

Kevin, a couple of things if you want to copy from one member into multiple places in another.

You can CREATE a member by specifyig C/M in the member where it comes from. Then COPY new-membername on the command line into where it wants to go.

Or you can COPY original-member-name line-start line-end on the command line to get particular lines from another member/dataset.

If you want to copy into multiple places in this other file, try prefixing the COPY with &. The & causes any command to be retained on the command line. Then you can use the PF keys to get to the next location, and put an A in the prefix area. If you need to do the copy, do a locate/find and then another copy, you can have a look at RETRIEVE to get the copy command back. Best when set to a PF key, RETRIEVE recovers commands one at a time.

Also look at CUT/PASTE to/from the CLIPBOARD. Look at multiple edit commands on the same line.

Lots of stuff to learn about the editor, it is always worth spending some time with the help/tutorial when you have a particular task you've not done before.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Pasting Multiple Places

Postby Schlabb » Fri Feb 10, 2012 6:40 pm

You can use "PASTE KEEP" to keep the data in the clipboard when unloading the data. This can be repeated as often as you want to until you issue PASTE without any parameter.

There is an action "Edit_Settings" on the ISPF editor panel which allows you to customize the functionality of CUT/PASTE.
It's worth to read the manuals again (ISPF User's Guide) because CUT/PASTE has some more interesting modes and features.
Stefan
There are 10 types of people in the world: Those who understand binary, and those who don't.
User avatar
Schlabb
 
Posts: 5
Joined: Fri Feb 10, 2012 6:01 pm
Has thanked: 0 time
Been thanked: 0 time


Return to TSO & ISPF

 


  • Related topics
    Replies
    Views
    Last post