Need JCL for Concatenating multiple DS to 1 DS

In this Mainframe Forum - You can post your queries on JCL, OS/390 JCL, MVS JCL, z/OS JCL, JES2 & JES3

Moderators: Frank Yaeger, DikDude, Moderator Group

Post Reply
orchestrate
Member
Posts: 19
Joined: Mon Jul 11, 2011 8:57 pm

Need JCL for Concatenating multiple DS to 1 DS

Post by orchestrate » Mon Jul 18, 2011 9:00 pm

Hi All,

Anyone have JCL for Concatenating multiple DS to 1 DS.

Thanks

User avatar
Frank Yaeger
Moderator
Posts: 812
Joined: Sat Feb 18, 2006 5:45 am
Location: San Jose, CA
Contact:

Post by Frank Yaeger » Mon Jul 18, 2011 9:44 pm

Well, you haven't given any details (RECFM, LRECL, an example of input and output), so I'll just suggest:

Use concatenation for the input. Use MOD for the output.
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort

User avatar
Gurugars
Active Member
Posts: 107
Joined: Sat Oct 23, 2010 2:17 pm
Location: Chennai,India.

Post by Gurugars » Tue Jul 19, 2011 12:16 pm

Hi,

By assuming that you have fixed length dataset, this will help you.

Code: Select all

//STEP01 EXEC PGM=IEBGENER                                   
//SYSPRINT DD SYSOUT=*                                       
//SYSUT1 DD DSN=TSOGKUM.TRG.JCLBACK1,DISP=SHR             
//       DD DSN=TSOGKUM.TRG.JCLBACK2,DISP=SHR             
//       DD DSN=TSOGKUM.TRG.JCLBACK3,DISP=SHR             
//SYSUT2 DD DSN=TSOGKUM.TRG.TESTPS01,DISP=(MOD,CATLG,DELETE),
//         SPACE=(TRK,(2,2)),UNIT=SYSDA,                     
//         DCB=(LRECL=80,RECFM=FB,BLKSIZE=800),DSORG=PS      
//SYSIN DD *
Last edited by Gurugars on Tue Jul 19, 2011 1:56 pm, edited 1 time in total.
Guru:-)

You're never fully dressed without a smile :)

orchestrate
Member
Posts: 19
Joined: Mon Jul 11, 2011 8:57 pm

Post by orchestrate » Tue Jul 19, 2011 1:01 pm

Yeah, Awesome.. Thanks buddy. :)

orchestrate
Member
Posts: 19
Joined: Mon Jul 11, 2011 8:57 pm

Post by orchestrate » Tue Jul 19, 2011 2:47 pm

What are the changes i could make in this to get concatenate multiple PDS to single.?

Thanks in advance

orchestrate
Member
Posts: 19
Joined: Mon Jul 11, 2011 8:57 pm

Post by orchestrate » Tue Jul 19, 2011 3:34 pm

here the infos are

Record format . . . : FB
Record length . . . : 80

But for PDS concatenation. Please help. Thanks

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Tue Jul 19, 2011 4:05 pm

you need to use different utilities to 'merge' pds members from on pds to another.
look in this manual for PDS manipulation.
or to create one (or more) ps files from pds members.
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

orchestrate
Member
Posts: 19
Joined: Mon Jul 11, 2011 8:57 pm

Post by orchestrate » Tue Jul 19, 2011 7:58 pm

Creating one or more PS files based on PDS member is not possible, since we have huge no of members in those PDS.

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Tue Jul 19, 2011 8:42 pm

look in the link i gave you and look at iebpunch.

that will create a single ps from all your pds members, with headers for each member.
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

DikDude
Moderator
Posts: 1001
Joined: Fri Jul 22, 2011 8:39 am
Location: usa

Post by DikDude » Fri Jul 22, 2011 9:04 am

look in the link i gave you and look at iebpunch.
Maybe IEBPTPCH?
Have a good one

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Fri Jul 22, 2011 9:24 am

DikDude wrote:Maybe IEBPTPCH?
yeah, that is a better spelling of the utility.
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Fri Jul 22, 2011 10:27 am

also,

IEBPTPCH creates 81 char FBA with (at my site) a V in column 1.

the following SORT will reformat to an 80 char FB file, removing the V
and replacing columns 73 80 with spaces.

Code: Select all

//STEP030  EXEC PGM=SORT
//TOOLMSG  DD  SYSOUT=*
//DFSMSG   DD  SYSOUT=*
//SYSOUT   DD  SYSOUT=*
//SORTIN   DD  DSN=BRENHOD.PDS.QSAM.PUNCH,
//             DISP=SHR
//SORTOUT  DD  DSN=BRENHOD.PDS.QSAM,
//             DISP=(NEW,CATLG,DELETE),
//             SPACE=(CYL,(150,150),RLSE),
//             DCB=(RECFM=FB,BLKSIZE=0)
//SYSIN    DD  *
 SORT FIELDS=COPY
 INREC PARSE=(%01=(ABSPOS=2,FIXLEN=72)),
       BUILD=(%01,8C' ')
/*
if you want to leave in the original 73 - 80,
use these control cards:

Code: Select all

 INREC PARSE=(%01=(ABSPOS=2,FIXLEN=80)),
       BUILD=(%01)
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others