View previous topic :: View next topic
|
Author |
Message |
NaliniNaveen
New User
Joined: 13 Jul 2022 Posts: 4 Location: India
|
|
|
|
Hello Everyone,
I have many PS say 50 PS files which I want to copy to a single PDS. Is it possible with IEBCOPY or with anyother utility?
Appreciate your response.
Thanks |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Do all the sequential files have the same DCB -- record format, record length, DSORG? |
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1305 Location: Bamberg, Germany
|
|
|
|
Perhaps an Instream Proc is the best option. Please provide some more details. |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1198 Location: Dublin, Ireland
|
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 724 Location: Denmark
|
|
|
|
To expand on Garry's suggestion, if all have the save recfm/lrecl then you can use IEBUPDTE like so:
// EXEC PGM=IEBUPDTE,PARM=NEW
//SYSPRINT DD SYSOUT=*
//SYSUT2 DD DISP=SHR,DSN=your.pds
//SYSIN DD *
./ ADD NAME=member1
// DD DISP=SHR,DSN=your.first.ps
./ ADD NAME=member2
// DD DISP=SHR,DSN=your.second.ps
and so on and so forth. |
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1305 Location: Bamberg, Germany
|
|
|
|
If you want to automate it, a PROC is more suitable, and also covers different input formats. |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2115 Location: USA
|
|
|
|
Willy Jensen wrote: |
To expand on Garry's suggestion, if all have the save recfm/lrecl then you can use IEBUPDTE like so:
// EXEC PGM=IEBUPDTE,PARM=NEW
//SYSPRINT DD SYSOUT=*
//SYSUT2 DD DISP=SHR,DSN=your.pds
//SYSIN DD *
./ ADD NAME=member1
// DD DISP=SHR,DSN=your.first.ps
./ ADD NAME=member2
// DD DISP=SHR,DSN=your.second.ps
and so on and so forth. |
This is fine, but only works for RECFM=FB,LRECL=80 |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2115 Location: USA
|
|
|
|
Code: |
//PS2PDS PROC QUAL=xxxx Dataset qualifier
//NEWMEMBR EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD DISP=SHR,DSN=aaaa.bbbb.cccc.dddd.&QUAL
//SYSUT2 DD DISP=OLD,DSN=common.output.library(&QUAL)
// PEND |
If your output library is PDSE, then you can use DISP=SHR when writing to it. |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2115 Location: USA
|
|
|
|
For clarity (since there is no reaction)…
Code: |
//jobname JOB jobparameters
//*
//PS2PDS PROC QUAL=xxxx Dataset qualifier
//NEWMEMBR EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD DISP=SHR,DSN=aaaa.bbbb.cccc.dddd.&QUAL
//SYSUT2 DD DISP=OLD,DSN=common.output.library(&QUAL)
// PEND
//*
//DSN1 EXEC PS2PDS,QUAL=SAMPL1
//DSN2 EXEC PS2PDS,QUAL=SAMPL2
//DSN3 EXEC PS2PDS,QUAL=SAMPL3
//DSN4 EXEC PS2PDS,QUAL=SAMPL4
. . . . . . . .
//DSN99 EXEC PS2PDS,QUAL=SAMPL99
//
|
|
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1305 Location: Bamberg, Germany
|
|
|
|
@sergeyken: This is what I was referring to. |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2115 Location: USA
|
|
|
|
Joerg.Findeisen wrote: |
@sergeyken: This is what I was referring to. |
Nothing works here nowadays except ready-to-copy-and-paste solutions. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3073 Location: NYC,USA
|
|
|
|
It’s bit of a rush, give sometime for TS to come back with question or give try on suggestions made above. |
|
Back to top |
|
|
NaliniNaveen
New User
Joined: 13 Jul 2022 Posts: 4 Location: India
|
|
|
|
Thank you everyone. I have created one as per @Sergeykan directed.
Thank you so much for all your support. |
|
Back to top |
|
|
|