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 merge 7 files with 1 million records into single file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Ralph_67

New User


Joined: 28 Feb 2007
Posts: 8
Location: India

PostPosted: Thu Mar 01, 2007 3:11 am    Post subject: How to merge 7 files with 1 million records into single file
Reply with quote

I am having more than 7 input files which has more than 1 million records . I want to merge all the 7 files into single file

Could anyone please suggest a method for this?
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: Thu Mar 01, 2007 3:21 am    Post subject:
Reply with quote

Hello,

If they are already in the desired sequence, you can merge them.

If they are not in sequence, you can concatenate them as one input file to the sort and create an output file in the desired sequence.

In the relative size of sorting a few million records is not too large a number.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Thu Mar 01, 2007 3:29 am    Post subject:
Reply with quote

First, you have to clarify what you really want.

In order to "merge" the files, each file must already be in order by a particular key. The output would then also be in order by that key. A DFSORT merge job would look like this:

Code:

//MERGE EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN01 DD DSN=...  input file 1 (records in sorted order)
//SORTIN02 DD DSN=...  input file 2 (records in sorted order)
...
//SORTIN07 DD DSN=...  input file 7 (records in sorted order)
//SORTOUT  DD DSN=...  output file
//SYSIN    DD    *
  MERGE FIELDS=(p,m,f,s)
/*


where p,m,f,s is the start position, length, format and order.

If instead, you just want to "copy" the files one after another to the output file (no key), the DFSORT copy job would look like this:

Code:

//COPY EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file 1
//       DD DSN=...  input file 2
...
//       DD DSN=...  input file 7
//SORTOUT  DD DSN=...  output file
//SYSIN    DD    *
  OPTION COPY
/*


If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

www.ibm.com/servers/storage/support/software/sort/mvs/srtmpub.html
Back to top
View user's profile Send private message
Ralph_67

New User


Joined: 28 Feb 2007
Posts: 8
Location: India

PostPosted: Thu Mar 01, 2007 4:35 am    Post subject: Re: Merging files
Reply with quote

Thanks Frank Its really working thanks a lot icon_smile.gif
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Thu Mar 01, 2007 4:45 am    Post subject:
Reply with quote

Ah, come on Ralph, was it a merge or a copy?
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 5 Wed Jul 26, 2017 7:35 pm
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts SSH - known_hosts file configuration vasanthz All Other Mainframe Topics 2 Wed Jul 26, 2017 2:10 am
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am


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