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

Copy a member from one PDS to other and then do changes


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vpr_118
Warnings : 1

New User


Joined: 07 Apr 2008
Posts: 64
Location: chennai

PostPosted: Fri Jan 23, 2009 9:10 am
Reply with quote

Hi,

Can we dynamically copy a member in a pds to other pds. Then open the copied member and do changes it.

Final result must be the changed member in front of the programmer.

Can we copy one line at a time from source to destination.

I do not want to submit a job using rexx macro.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Jan 23, 2009 9:28 am
Reply with quote

Hello,

Is there some reason to copy one line at a time?

Simply copy the member from the "current" pds to the target pds. Then, edit the "new" member making whatever changes you want to make.
Back to top
View user's profile Send private message
vpr_118
Warnings : 1

New User


Joined: 07 Apr 2008
Posts: 64
Location: chennai

PostPosted: Fri Jan 23, 2009 9:40 am
Reply with quote

Thank you for the suggection.
Yes this i a good way out.

But is it possible to copy a member to pds with the same name.
Then open the new member and edit the same?
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Fri Jan 23, 2009 9:53 am
Reply with quote

Hi,

there is a difference when one does not know how to do it, but when one does know , why not try it?


Gerry
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Jan 23, 2009 10:09 am
Reply with quote

Hello,

Quote:
Then open the new member and edit the same?
Yup, go for it icon_smile.gif
Back to top
View user's profile Send private message
vpr_118
Warnings : 1

New User


Joined: 07 Apr 2008
Posts: 64
Location: chennai

PostPosted: Wed Jan 28, 2009 10:19 am
Reply with quote

Hi,

Please find the code below.

address isredit
"c all D04BP D04BT"
address isredit
"c all 'AAAA' 'BBBB'"
"RES"
"SAVE"
"CUT"
"CANCEL"
" "

DO
OUTPDS=STRIP("'"||OUT_PDS||"'")
JOB=("'"||OUT_PDS||"("||JNAME||")"||"'")
ADDRESS ISPEXEC
"ISPEXEC EDIT DATASET("JOB")"
ADDRESS ISREDIT
"PASTE"
"SAVE"
END

It says 'paste' is invalid commad.

Can any one tell what is the command to paste the cut line.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Wed Jan 28, 2009 12:44 pm
Reply with quote

Mmmmmm, methinks you are doing this the wrong way around. It looks as though you are doing the changes before the copy, and you issue the SAVE command which saves the changes in the original member which you then try to copy.

To do the copy, take a look at LM services which are detailed in the ISPF services manual.

Another way is the copy command, when you open the new member you can do something like

"ISREDIT COPY 'Dataset name(member)' AFTER "0
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Wed Jan 28, 2009 10:17 pm
Reply with quote

Your EDIT command should include an initial macro. Do your changes from the initial macro.
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts VB to VB copy - Full length reached SYNCSORT 8
No new posts Need COBOL COPY Help in MVS Environment COBOL Programming 4
No new posts Issue after ISPF copy to Linklist Lib... TSO/ISPF 1
No new posts DB2 Table - Image copy unload IBM Tools 2
No new posts How to copy the -1 version of a membe... TSO/ISPF 4
Search our Forums:

Back to Top