View previous topic :: View next topic
|
Author |
Message |
jasorn Warnings : 1 Active User
Joined: 12 Jul 2006 Posts: 191 Location: USA
|
|
|
|
Is there another other utilities to extract a member name from a pds contacatenation list besides iebptch? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
What do you mean by "extract".
And why a "concatenation list"?
Examples would probably help. . . |
|
Back to top |
|
|
jasorn Warnings : 1 Active User
Joined: 12 Jul 2006 Posts: 191 Location: USA
|
|
|
|
dick scherrer wrote: |
Hello,
What do you mean by "extract".
And why a "concatenation list"?
Examples would probably help. . . |
I want to know generally but the specific use I have is I want to copy a synmanes file from a concatenation list so that for testing it can come from dev, qa, prod library without needing to maintain versions in each. Much like what is common with linklibs.
I just mean copy the member from the first pds the member is in. For example if the the concatenation list has PDS1, PDS2, and PD3, and the member exists in PDS2 and PDS3 I want to copy it from PDS2 and not PDS3. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
I'm not sure I understand you correctly but why not have 3 separate steps.
STEP1 copies from PDS1
STEP2 copies from PDS3
STEP3 copies from PDS2
If member exists in PDS3 and PDS2, STEP3 will overwrite STEP2.
Gerry |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
Back to top |
|
|
jasorn Warnings : 1 Active User
Joined: 12 Jul 2006 Posts: 191 Location: USA
|
|
|
|
Thanks Dick,
I have the manual. Sometimes I'll read the manual and think something isn't possible but it is. So I ask.
But yes, IEBPTPCH does extract from a concatenation list. Since you questioned that, I went ahead and tested it again since it's been a while since I used it. But I think it's worked this way for years. |
|
Back to top |
|
|
jasorn Warnings : 1 Active User
Joined: 12 Jul 2006 Posts: 191 Location: USA
|
|
|
|
Well, let's say the concatenation list grows, then the number of steps gets to be more. IEBPTPCH does this but just leaves you with the 'MEMBER NAME' record to remove.
But also if you use a utility that will fail of the member doesn't exist, then this will fail because by design we don't want the member to exist in pds1 unless it's being changed.
gcicchet wrote: |
Hi,
I'm not sure I understand you correctly but why not have 3 separate steps.
STEP1 copies from PDS1
STEP2 copies from PDS3
STEP3 copies from PDS2
If member exists in PDS3 and PDS2, STEP3 will overwrite STEP2.
Gerry |
|
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
I tried PUNCH for 2 PDS in a concatenation and only the first PDS in a concatenation printed.
When printing specific members and duplicate members exist, member from first concatenation only printed.
If member did not exist in first concatenation, it printed from second concatenation.
Code: |
PUNCH TYPORG=PO,MAXNAME=99,MAXFLDS=99
MEMBER NAME=FRED
MEMBER NAME=FRED1
MEMBER NAME=SORT0001
MEMBER NAME=SORT0002
MEMBER NAME=DFSPARM
RECORD FIELD=(80)
|
Gerry |
|
Back to top |
|
|
jasorn Warnings : 1 Active User
Joined: 12 Jul 2006 Posts: 191 Location: USA
|
|
|
|
Right, IEBPTPCH does this it just has the MEMBER NAME in the output you need to remove. That's why I'm asking if there is another utility that does this, hopefully without the MEMBER NAME record. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
But I think it's worked this way for years. |
Possibly has - i've just never needed this functionality and remained ignorant.
Depending on how much effort you'd be willing to invest, you could wirte a bit of code to identify which dataset is the "first" to contain the member name(s) you want and then generate the jcl/utility statements to copy them to the target dataset.
And, this may be overkill. . . |
|
Back to top |
|
|
jasorn Warnings : 1 Active User
Joined: 12 Jul 2006 Posts: 191 Location: USA
|
|
|
|
dick scherrer wrote: |
Hello,
Quote: |
But I think it's worked this way for years. |
Possibly has - i've just never needed this functionality and remained ignorant.
Depending on how much effort you'd be willing to invest, you could wirte a bit of code to identify which dataset is the "first" to contain the member name(s) you want and then generate the jcl/utility statements to copy them to the target dataset.
And, this may be overkill. . . |
Just went with removing the MEMBER NAME record with sort. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Thank for the update
d |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Wouldn't IEBCOPY work, performing a direct PDS to PDS copy ? |
|
Back to top |
|
|
jasorn Warnings : 1 Active User
Joined: 12 Jul 2006 Posts: 191 Location: USA
|
|
|
|
expat wrote: |
Wouldn't IEBCOPY work, performing a direct PDS to PDS copy ? |
I don't think IEBCOPY will copy the first occurance of a member in a concatenation to the output. At least I couldn't get it to work. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
Just run a test : IEBCOPY will copy from the first dataset in a concatenation but does not look in the other datasets so if your member is in the 2nd, 3rd etc it will not be found.
However, you can specify more than one input DDname so you do not need to concatenate. But this may not fit your requirements. |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
|
|
Doesn't the LMCOPY do this for up to, IIRC, 16 data sets? Not very hard to run it in batch... |
|
Back to top |
|
|
jasorn Warnings : 1 Active User
Joined: 12 Jul 2006 Posts: 191 Location: USA
|
|
|
|
Nic Clouston,
I did. I try to do my due diligence before asking. I'm just dumb and don't always get what the manuals are trying to tell me.
But yes IEBCOPY works for this, too. I'll pick the one that's best performance wise. |
|
Back to top |
|
|
jon_s_rice
Active User
Joined: 24 Mar 2005 Posts: 102 Location: Douglasville, GA USA
|
|
|
|
I think this is what you are looking for.
Code: |
//*--------------------------------------------------------------------*
//* COPY PDS MEMBERS *
//*--------------------------------------------------------------------*
//COPY EXEC PGM=IEBCOPY,REGION=1M
//NDVRLIB1 DD DSN=SP.NDV.DEVE.COPYLIB,DISP=SHR
//NDVRLIB2 DD DSN=SP.NDV.TEST.COPYLIB,DISP=SHR
//NDVRLIB3 DD DSN=SP.NDV.QA1.COPYLIB,DISP=SHR
//NDVRLIB4 DD DSN=SP.NDV.QA2.COPYLIB,DISP=SHR
//NDVRLIB5 DD DSN=SP.NDV.STAGE.COPYLIB,DISP=SHR
//NDVRLIB6 DD DSN=SP.NDV.PROD.COPYLIB,DISP=SHR
//USERLIB DD DSN=&SYSUID..TEST.COPYLIB,DISP=SHR
//SYSIN DD *
COPY INDD(NDVRLIB1,NDVRLIB2,NDVRLIB3,NDVRLIB4,NDVRLIB5,NDVRLIB6), X
OUTDD=USERLIB
SELECT MEMBER=(PTZIW027,PTZIW043,PTZIW202)
//SYSPRINT DD SYSOUT=* |
This will copy from the first library it finds.
Edited to add code-tags...Anuj. |
|
Back to top |
|
|
jasorn Warnings : 1 Active User
Joined: 12 Jul 2006 Posts: 191 Location: USA
|
|
|
|
Forgot an '=' between ' INDD' and '('
Code: |
//*--------------------------------------------------------------------*
//* COPY PDS MEMBERS *
//*--------------------------------------------------------------------*
//COPY EXEC PGM=IEBCOPY,REGION=1M
//NDVRLIB1 DD DSN=SP.NDV.DEVE.COPYLIB,DISP=SHR
//NDVRLIB2 DD DSN=SP.NDV.TEST.COPYLIB,DISP=SHR
//NDVRLIB3 DD DSN=SP.NDV.QA1.COPYLIB,DISP=SHR
//NDVRLIB4 DD DSN=SP.NDV.QA2.COPYLIB,DISP=SHR
//NDVRLIB5 DD DSN=SP.NDV.STAGE.COPYLIB,DISP=SHR
//NDVRLIB6 DD DSN=SP.NDV.PROD.COPYLIB,DISP=SHR
//USERLIB DD DSN=&SYSUID..TEST.COPYLIB,DISP=SHR
//SYSIN DD *
COPY INDD=(NDVRLIB1,NDVRLIB2,NDVRLIB3,NDVRLIB4,NDVRLIB5,NDVRLIB6), X
OUTDD=USERLIB
SELECT MEMBER=(PTZIW027,PTZIW043,PTZIW202)
//SYSPRINT DD SYSOUT=*
|
|
|
Back to top |
|
|
|