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

How to copy a member from a pds concatenation list.


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jasorn
Warnings : 1

Active User


Joined: 12 Jul 2006
Posts: 191
Location: USA

PostPosted: Fri Dec 09, 2011 4:10 am
Reply with quote

Is there another other utilities to extract a member name from a pds contacatenation list besides iebptch?
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 Dec 09, 2011 4:21 am
Reply with quote

Hello,

What do you mean by "extract".

And why a "concatenation list"?

Examples would probably help. . .
Back to top
View user's profile Send private message
jasorn
Warnings : 1

Active User


Joined: 12 Jul 2006
Posts: 191
Location: USA

PostPosted: Fri Dec 09, 2011 5:05 am
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Fri Dec 09, 2011 6:25 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Fri Dec 09, 2011 6:38 am
Reply with quote

Hello,

I do not recall IEBPTPCH allowing a pds or pdse concatenation for the sysut1 dd statement.

Possibly there has been an enhancement or my memory has eroded. . .

In the manual available at the top of the page, i see:

Quote:
SYSUT1 DD
Defines an input sequential or partitioned data set, or PDSE.


And more here:
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/handheld/Connected/BOOKS/dgt2u140/9.6.3
Back to top
View user's profile Send private message
jasorn
Warnings : 1

Active User


Joined: 12 Jul 2006
Posts: 191
Location: USA

PostPosted: Fri Dec 09, 2011 7:30 am
Reply with quote

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
View user's profile Send private message
jasorn
Warnings : 1

Active User


Joined: 12 Jul 2006
Posts: 191
Location: USA

PostPosted: Fri Dec 09, 2011 7:38 am
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Fri Dec 09, 2011 7:53 am
Reply with quote

Hi,

I tried PUNCH for 2 PDS in a concatenation and only the first PDS in a concatenation printed.

Code:
PUNCH TYPORG=PO   



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
View user's profile Send private message
jasorn
Warnings : 1

Active User


Joined: 12 Jul 2006
Posts: 191
Location: USA

PostPosted: Fri Dec 09, 2011 8:00 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Fri Dec 09, 2011 9:58 am
Reply with quote

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
View user's profile Send private message
jasorn
Warnings : 1

Active User


Joined: 12 Jul 2006
Posts: 191
Location: USA

PostPosted: Fri Dec 09, 2011 10:20 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Fri Dec 09, 2011 12:53 pm
Reply with quote

Thank for the update icon_smile.gif

d
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Fri Dec 09, 2011 12:59 pm
Reply with quote

Wouldn't IEBCOPY work, performing a direct PDS to PDS copy ?
Back to top
View user's profile Send private message
jasorn
Warnings : 1

Active User


Joined: 12 Jul 2006
Posts: 191
Location: USA

PostPosted: Fri Dec 09, 2011 1:02 pm
Reply with quote

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
View user's profile Send private message
Nic Clouston

Global Moderator


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

PostPosted: Fri Dec 09, 2011 4:33 pm
Reply with quote

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
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Fri Dec 09, 2011 4:40 pm
Reply with quote

Doesn't the LMCOPY do this for up to, IIRC, 16 data sets? Not very hard to run it in batch...
Back to top
View user's profile Send private message
jasorn
Warnings : 1

Active User


Joined: 12 Jul 2006
Posts: 191
Location: USA

PostPosted: Sat Dec 10, 2011 9:27 pm
Reply with quote

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
View user's profile Send private message
jon_s_rice

Active User


Joined: 24 Mar 2005
Posts: 102
Location: Douglasville, GA USA

PostPosted: Mon Dec 12, 2011 12:57 am
Reply with quote

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
View user's profile Send private message
jasorn
Warnings : 1

Active User


Joined: 12 Jul 2006
Posts: 191
Location: USA

PostPosted: Wed Dec 14, 2011 5:00 pm
Reply with quote

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
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts VB to VB copy - Full length reached SYNCSORT 8
No new posts How to create a list of SAR jobs with... CA Products 3
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
Search our Forums:

Back to Top