Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us