Posted: Mon Nov 01, 2004 5:01 am Post subject: How to merge to datasets to one?
Hello,
I have two dataset with the same format and I want to merge them to one(without any condition) using SPLICE of ICETOOL to realize it.
//TOOLIN DD *
SPLICE FROM(IN) TO(OUT8) ON(1,4,CH) WITH(1,100) WITHALL
//
I try the above JCL. Since I just want to merge, how can I omit the condition to let them merge to one dataset?
kolusu,
I have searched message for this topic and not found solution, I am afraid
you will let me to do the search again. _________________ cheers,
Andy
Joined: 26 Nov 2002 Posts: 12377 Topics: 75 Location: San Jose
Posted: Mon Nov 01, 2004 6:14 am Post subject:
Andy,
I cannot provide you a solution without any sample data. Provide us with sample data, LRECL, RECFM & positions and format of the fields to be merged . Mean while check this links which might help you
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Tue Nov 02, 2004 11:05 am Post subject:
Andy,
The SPLICE operator of DFSORT's ICETOOL is for joining fields from different records on a key, or for matching records on a key.
The MERGE statement of DFSORT is for merging records from different files that are each already sorted on a key.
What you appear to want to do is concatenate the records from TRY1 after the records from TRY2. For that, you would use the COPY statement of DFSORT as follows:
Code:
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... TRY2 data set
// DD DSN=... TRY1 data set
//SORTOUT DD DSN=... TRY3 data set
//SYSIN DD *
OPTION COPY
/*
Alternatively, you could use this DFSORT/ICETOOL job with a COPY operator:
Code:
//S2 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=... TRY2 data set
// DD DSN=... TRY1 data set
//OUT DD DSN=... TRY3 data set
//TOOLIN DD *
COPY FROM(IN) TO(OUT)
/*
_________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum