Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to copy a member from a pds concatenation list.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
jasorn

Active User


Joined: 12 Jul 2006
Posts: 153
Location: USA

PostPosted: Fri Dec 09, 2011 4:10 am    Post subject: How to copy a member from a pds concatenation list.
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

Site Director


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

PostPosted: Fri Dec 09, 2011 4:21 am    Post subject:
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

Active User


Joined: 12 Jul 2006
Posts: 153
Location: USA

PostPosted: Fri Dec 09, 2011 5:05 am    Post subject:
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: 1703
Location: Australia

PostPosted: Fri Dec 09, 2011 6:25 am    Post subject:
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

Site Director


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

PostPosted: Fri Dec 09, 2011 6:38 am    Post subject:
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:
http://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

Active User


Joined: 12 Jul 2006
Posts: 153
Location: USA

PostPosted: Fri Dec 09, 2011 7:30 am    Post subject:
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

Active User


Joined: 12 Jul 2006
Posts: 153
Location: USA

PostPosted: Fri Dec 09, 2011 7:38 am    Post subject:
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: 1703
Location: Australia

PostPosted: Fri Dec 09, 2011 7:53 am    Post subject:
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

Active User


Joined: 12 Jul 2006
Posts: 153
Location: USA

PostPosted: Fri Dec 09, 2011 8:00 am    Post subject:
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

Site Director


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

PostPosted: Fri Dec 09, 2011 9:58 am    Post subject:
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

Active User


Joined: 12 Jul 2006
Posts: 153
Location: USA

PostPosted: Fri Dec 09, 2011 10:20 am    Post subject:
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

Site Director


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

PostPosted: Fri Dec 09, 2011 12:53 pm    Post subject: Reply to: How to copy a member from a pds concatenation list
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: 8593
Location: Back in jolly old England

PostPosted: Fri Dec 09, 2011 12:59 pm    Post subject:
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

Active User


Joined: 12 Jul 2006
Posts: 153
Location: USA

PostPosted: Fri Dec 09, 2011 1:02 pm    Post subject:
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: 1715
Location: UK

PostPosted: Fri Dec 09, 2011 4:33 pm    Post subject:
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

Active Member


Joined: 07 Feb 2009
Posts: 984
Location: Oostende, Belgium

PostPosted: Fri Dec 09, 2011 4:40 pm    Post subject:
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

Active User


Joined: 12 Jul 2006
Posts: 153
Location: USA

PostPosted: Sat Dec 10, 2011 9:27 pm    Post subject:
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    Post subject:
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

Active User


Joined: 12 Jul 2006
Posts: 153
Location: USA

PostPosted: Wed Dec 14, 2011 5:00 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
No new posts Cobol list of programs being called biswajit.dattagupta COBOL Programming 5 Tue Nov 01, 2016 2:10 am
No new posts Single COPY CICS TS datasets and when... Kyle Carroll CICS 2 Tue Oct 11, 2016 9:47 pm
No new posts reorder screeNS using SWAP LIST? mrsidhu12 TSO/ISPF 5 Thu Sep 01, 2016 2:19 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us