View previous topic :: View next topic
|
Author |
Message |
Ralph_67
New User
Joined: 28 Feb 2007 Posts: 8 Location: India
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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:
Use [URL] BBCode for External Links |
|
Back to top |
|
|
Ralph_67
New User
Joined: 28 Feb 2007 Posts: 8 Location: India
|
|
|
|
Thanks Frank Its really working thanks a lot |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Ah, come on Ralph, was it a merge or a copy? |
|
Back to top |
|
|
|