MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to merge to datasets to one?

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
ANDY
Beginner


Joined: 07 Feb 2004
Posts: 127
Topics: 67

PostPosted: Mon Nov 01, 2004 5:01 am    Post subject: How to merge to datasets to one? Reply with quote

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
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12377
Topics: 75
Location: San Jose

PostPosted: Mon Nov 01, 2004 6:14 am    Post subject: Reply with quote

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

http://www.mvsforums.com/helpboards/viewtopic.php?t=10&highlight=merge

http://www.mvsforums.com/helpboards/viewtopic.php?t=2820&highlight=merge

http://www.mvsforums.com/helpboards/viewtopic.php?t=2633&highlight=merge

Thanks

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ANDY
Beginner


Joined: 07 Feb 2004
Posts: 127
Topics: 67

PostPosted: Mon Nov 01, 2004 8:40 pm    Post subject: Reply with quote

TRY1 sample data:

EQRX111 2004-07-31SFINTDEFEDSMTP
EQRX124 N199109000919
EQRX126 N199109

TRY2 sample data:

CURRENT 199110
CURRENT 199110 ss
0101BABENTER 9999500
0101BUYUK 9999500
0101UBA 9999500

Expectation TRY3:

CURRENT 199110
CURRENT 199110 ss
0101BABENTER 9999500
0101BUYUK 9999500
0101UBA 9999500
EQRX111 2004-07-31SFINTDEFEDSMTP
EQRX124 N199109000919
EQRX126 N199109


//STEP002 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=ANDY.TEST.TRY1,DISP=(OLD,KEEP)
// DD DSN=ANDY.TEST.TRY2,DISP=(OLD,KEEP)
//OUT DD DSN=ANDY.TEST.TRY3,
// DISP=(,CATLG,DELETE),
// DCB=(LRECL=80,BLKSIZE=0,DSORG=PS,RECFM=FB),UNIT=SYSDA,
// SPACE=(CYL,(50,10),RLSE)
//TOOLIN DD *
SPLICE FROM(IN) TO(OUT) ON(1,4,CH) WITH(1,303) WITHALL
//
_________________
cheers,
Andy
Back to top
View user's profile Send private message
Cogito-Ergo-Sum
Advanced


Joined: 15 Dec 2002
Posts: 637
Topics: 43
Location: Bengaluru, INDIA

PostPosted: Tue Nov 02, 2004 12:54 am    Post subject: Reply with quote

Uh.. You want merge whereas your example shows simple concatenation. You mean concatenation when you say merge, is it?

Use SORT, where SORTIN is concatenated input of two datasets. In SYSIN, put OPTION COPY.
_________________
ALL opinions are welcome.

Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes.
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Tue Nov 02, 2004 11:05 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ANDY
Beginner


Joined: 07 Feb 2004
Posts: 127
Topics: 67

PostPosted: Wed Nov 03, 2004 12:26 am    Post subject: Reply with quote

Hello friends,

This is a good forum. Everyone is warm and kind to help others.

Thank you many times.
_________________
cheers,
Andy
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group