IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Copy the lines to multiple destinations at one shot


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Murari Chakrakodi

New User


Joined: 26 Sep 2007
Posts: 13
Location: Bangalore,India

PostPosted: Wed Jul 15, 2009 9:27 pm
Reply with quote

Hi All,

Is there any way to copy the lines to multiple destination. We will use CC CC in the line to be copied and use A or B to copy into new destination after the line or before the line respectively. Can we have any command or tool to copy it to multiple destination?

Thanks,
Murari
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10879
Location: italy

PostPosted: Wed Jul 15, 2009 9:29 pm
Reply with quote

no, but You can try to write Your own edit macro to do it
Back to top
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Wed Jul 15, 2009 10:15 pm
Reply with quote

If you use the "CUT" primary command (with CC line command) and "&PASTE KEEP" primary command (with A or B line command) you can avoid putting the CCs in over and over again.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1248
Location: Richfield, MN, USA

PostPosted: Fri Jul 17, 2009 9:54 am
Reply with quote

The ISPF release I'm currently using allows multiple destinations for MOVE and COPY line commands, and block MM and CC also. See the help panels.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Fri Jul 17, 2009 11:24 am
Reply with quote

Or if you need to do this to many members / datasets, try writing an ISPF edit macro.
Back to top
View user's profile Send private message
diwa_thilak

Active User


Joined: 13 Jul 2006
Posts: 205
Location: At my desk

PostPosted: Wed Jul 22, 2009 12:13 am
Reply with quote

I beleive you cannot copy a set of lines to multiple datasets at a same time.
Instead you can retain the data using the CUT option and reuse.
Example
cc..cc the number of lines and enter CUT A1
it will store the data in a storage A1. You can re-use it as many times as you want by entering paste A1 in your destination dataset.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1248
Location: Richfield, MN, USA

PostPosted: Wed Jul 22, 2009 4:59 am
Reply with quote

diwa_thilak wrote:
I beleive you cannot copy a set of lines to multiple datasets at a same time.
I don't think we're talking about multiple data sets here; just moving or copying 1 or more lines to multiple locations in the same data set or PDS member. As I said, some of the newer releases of ISPF now have this function. Instead of keying A for copying a line after the destination line, key AK on each destination line number except for the last which will have just an A. AK means After Keep, BK means Before Keep. See the "What's new in this release" part of ISPF or check the help panels or Tutorial.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6248
Location: Mumbai, India

PostPosted: Wed Jul 22, 2009 4:20 pm
Reply with quote

Douglas Wilder wrote:
If you use the "CUT" primary command (with CC line command) and "&PASTE KEEP" primary command (with A or B line command) you can avoid putting the CCs in over and over again.
Nice shot Douglas.

Regards,
Ad
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6248
Location: Mumbai, India

PostPosted: Wed Jul 22, 2009 4:25 pm
Reply with quote

Hello Murari,

Did you try what Douglas has said -- that works pretty well for me. And unless you mean something different than what is posted by you in origianl post, it should suffice for your need.
Back to top
View user's profile Send private message
Ziquilix

New User


Joined: 17 Dec 2015
Posts: 3
Location: South Africa

PostPosted: Mon Oct 19, 2020 11:38 am
Reply with quote

I know this is resurrecting an old post but the actual answer which helped me is RRn and RR. This answer came up in Google which, I think, is not 100% accurate. So if you add a number to the Repeat block command you will coppy the blocked lines n times. icon_smile.gif
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2119
Location: USA

PostPosted: Mon Oct 19, 2020 6:12 pm
Reply with quote

There are enhanced ISPF EDIT line commands to specify multiple destination, in order to copy/move/paste the same chunk of lines to several points at once. Those are:

AK (After and Keep) - to insert after the marked line, and keep lines for extra insertions.

BK (Before and Keep) - to insert before the marked line, and keep lines for extra insertions.

You need to mark as many positions as you like with AK/BK, and finally mark the last of desired positions with regular A/B. After the Enter has been pressed, the same group of lines will be inserted simultaneously to all marked positions.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2454
Location: Hampshire, UK

PostPosted: Mon Oct 19, 2020 8:04 pm
Reply with quote

Quote:
RRn and RR

This does not help at all. The question is about copying lines to multiple destinations not repeating lines. It was also answered correctly by Terry back in 2009.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Mark Previous & next lines when a... DFSORT/ICETOOL 9
No new posts SORT JCL to merge multiple tow into s... DFSORT/ICETOOL 6
No new posts Use Copy Utility DB2 7
No new posts Using Multiple IFTHEN and WHEN condit... SYNCSORT 12
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
Search our Forums:

Back to Top