View previous topic :: View next topic
|
Author |
Message |
Cloink
New User
Joined: 12 Sep 2018 Posts: 14 Location: UK
|
|
|
|
Hi,
I want to copy from one pds to another via a member listing (edit/view/browse, any, doesn't matter).
I want to replace the member in the target PDS.
I have already told it which PDS to copy to.
I always forget to /-select the 'Replace like named members' option.
It goes back to the member list panel with the prompt *NO-REPL because the target member exists.
Q1.
How do I now tell it that I blinking well want the target member replacing? Because now it knows the target pds and does not popup the panel where the 'Replace like named members' option appears!
While I'm here...
Q2.
I now want to copy to a different PDS - how do I force the popup panel to allow me to change the target?
Q3.
I want to copy to another member-name in the SAME pds, from the member listing panel - is that possible, or do I have to go in and edit/view a member and use the CRE command?
Thank you, Clark. |
|
Back to top |
|
 |
expat
Global Moderator

Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
It all sounds possible using option 3.3
I think that replace is specified as an option on the first panel.
Unfortunately this is all from memory as I haven't seen a mainframe for about 4 years now  |
|
Back to top |
|
 |
Cloink
New User
Joined: 12 Sep 2018 Posts: 14 Location: UK
|
|
|
|
I'm not in 3.3, I'm in a member listing. |
|
Back to top |
|
 |
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
Then go to option 3.3, specify your options, press enter to get the member list and then select the members, specifying new-name where appropriate. |
|
Back to top |
|
 |
Cloink
New User
Joined: 12 Sep 2018 Posts: 14 Location: UK
|
|
|
|
I'm not in 3.3, I'm in a member listing. I don't want to go to 3.3 because I should be able to do it from a member listing.
I don't want alternatives, I know there are alternatives, I want the questions answered - even if it is to say "It can't be done.".
Thank you. |
|
Back to top |
|
 |
expat
Global Moderator

Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
It probably can be done if you really do want to reinvent the wheel and write you own set of macros and/or programs that emulate what can be done from 3.3
You say a member listing, from which ISPF option, or is it some home grown application that you are in. Please give us some useful information. |
|
Back to top |
|
 |
Cloink
New User
Joined: 12 Sep 2018 Posts: 14 Location: UK
|
|
|
|
DSLIST (3.4 if you like), then E/V/B against a PDS in the list.
Like going into 3.1 with these options:
Code: |
Enter "/" to select option
/ Confirm Member Delete
/ Enhanced Member List |
I also have these options set in my option Zero Settings:
Code: |
Member list options
Enter "/" to select option
Scroll member list
/ Allow empty member list
Allow empty member list (nomatch)
/ Empty member list for edit only |
|
|
Back to top |
|
 |
Willy Jensen
Active Member

Joined: 01 Sep 2015 Posts: 744 Location: Denmark
|
|
|
|
I agree that the 'C' option in the member list is not very good, so I wrote a small program MCP to do member copy from the member list.
Program MCP
Code: |
/* Copy member from ISPF member list rexx */
parse value '' with indid outdid
arg p
parse var p mcpind'('mcpinm')'
if left(mcpind,1)="'" then mcpind=mcpind"'"
address ispexec
"control errors return"
"display panel(mcp#)"
if rc>8 then call close 'Display rc' rc
if rc>0 then exit 0
"lminit dataset("mcpind") enq(shr) dataid(indid)"
if rc<>0 then call close 'Lminit' mcpind 'rc' rc
"lminit dataset("mcpoutd") enq(shr) dataid(outdid)"
if rc<>0 then call close 'Lminit' mcpind 'rc' rc
p=''
if mcprepl='Y' then p='REPLACE'
"lmcopy fromid("indid") frommem("mcpinm")",
"todataid("outdid") tomem("mcpoutm")" p
if rc<>0 then call close 'Lmcopy' mcpind 'rc' rc zerrlm
Call close 'Copy' mcpind mcpinm 'to' mcpoutd mcpoutm 'done'
Close:
parse arg zedlmsg
if zedlmsg<>'' then do
"vput zedlmsg"
"setmsg msg(isrz000)"
end
if indid<>'' then "lmfree dataid("indid")"
if outdid<>'' then "lmfree dataid("outdid")"
exit 0 |
Panel MCP#
Code: |
)ATTR
@ type(input) caps(on) just(left) color(turq) hilite(uscore)
" type(text) color(blue ) skip(on)
+ type(text) color(green) skip(on)
)BODY expand(\\)
%\ \Member copy\ \+
%Cmd =>_zcmd \ \+
+
+
%Input
+ Dataset @mcpind +
+ Membert @mcpinm + +
+
%Output
+ Dataset @mcpoutd "name or '='
+ Membert @mcpoutm + "name or '='
+
%Options
+ Replace @z+
)INIT
.zvars = '(mcprepl)'
if (&mcprepl EQ &Z) &mcprepl = N
)PROC
ver (&mcpind,nb)
ver (&mcpinm,nb)
ver (&mcpoutd,nb)
ver (&mcpoutm,nb)
ver (&mcprepl,nb,list,N,Y)
)END |
Still work in progress, feel free to modify. |
|
Back to top |
|
 |
Cloink
New User
Joined: 12 Sep 2018 Posts: 14 Location: UK
|
|
|
|
Thanks Willy. I also have my own MEMLIST rexx which facilitates some better member-line-cmds, but I'm not always in 'my' MEMLIST and it also has its own shortcomings, hence I often end up in standard member listing.
I have specifically avoided mentioning my rexx because I don't want it to muddy the water. I am in TSO/ISPF "proper", no personal rexx or customised environment in effect, just pure and simple TSO/ISPF environment.
3.4 > list of datasets > E/V/B against a PDS in the list - that member list panel, with the "Enhanced member list" in effect.
I can't help feeling there is a way to accomplish my aims if I spent a day reading the ISPF documentation to find out. I thought they were simple questions somebody could give me quick, simple answers to... |
|
Back to top |
|
 |
Cloink
New User
Joined: 12 Sep 2018 Posts: 14 Location: UK
|
|
|
|
Tch!
The answer is that once you have set the "Replace like-named members" option on the "COPY Entry Panel", this option remains selected for good. (Providing you have a clean exit from TSO/ISPF.) |
|
Back to top |
|
 |
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
Yes, you can copy from a PDS to the same PDS using 3.3. You specify a new name. For example -
Code: |
Menu Functions Utilities Help
------------------------------------------------------------------------------
COPY XXXXXX.ASM TO XXXXXX.ASM Row 00001 of 00182
Command ===> Scroll ===> PAGE
Name Prompt Size Created Changed ID
. ADDSTATS aaaaaaaa 299 2013/09/01 2013/09/01 11:33:41 XXXXXX
. ALLOCVOL 557 2010/12/06 2010/12/06 01:00:12 XXXXXX
. ALTDIR 384 2015/08/04 2015/08/04 18:13:32 XXXXXX |
This will copy member ADDSTATS to new member AAAAAAAA when you press your Enter key. |
|
Back to top |
|
 |
Cloink
New User
Joined: 12 Sep 2018 Posts: 14 Location: UK
|
|
|
|
I repeat: "I'm not in 3.3, I'm in a member listing."
And: "I'm not in 3.3, I'm in a member listing. I don't want to go to 3.3 because I should be able to do it from a member listing."
I answered my own question (essentially) 2 posts up... |
|
Back to top |
|
 |
Marso
REXX Moderator

Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
In the member listing, you type 'C' on the left of the member and a '/' on the right ("Prompt" or newname field).
This will cause the COPY Entry Panel to appear, even if it has already been displayed before.
This, I guess, answers the original questions. |
|
Back to top |
|
 |
enrico-sorichetti
Superior Member

Joined: 14 Mar 2007 Posts: 10894 Location: italy
|
|
|
|
Quote: |
In the member listing, you type 'C' on the left of the member and a '/' on the right ("Prompt" or newname field). |
only if You get to the MSL from 3.4
and you have the extended member list panel
I do not remember if it is possible to have the same from option 2 |
|
Back to top |
|
 |
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
Only from 3.4 (on my system which is not up-to-date). |
|
Back to top |
|
 |
Marso
REXX Moderator

Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
Yes, apparently only from 3.4
But it should be OK:
Cloink wrote: |
DSLIST (3.4 if you like), then E/V/B against a PDS in the list. |
|
|
Back to top |
|
 |
|