IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Merging two sequential files


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sindhuvava
Currently Banned

New User


Joined: 05 Dec 2006
Posts: 17
Location: Chennai

PostPosted: Thu Feb 08, 2007 2:51 pm
Reply with quote

hi all,

can anyone help me???
how to merge two sequential files fully into another sequential file.
i tried using sort but i am not aware what to be given inside the sysin for merging the entire records in the files.

//STEP1 EXEC PGM=SORT
//SORTIN01 DD DSN=K3060AH.TEST.DTL.FILE5,DISP=SHR
//SORTIN02 DD DSN=K3060AH.TEST.DTL.FILE6,DISP=SHR
//SORTOUT DD DSN=K3060AH.TEST.DTL.FILE
//SYSIN DD *

/*
Back to top
View user's profile Send private message
William Thompson

Global Moderator


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

PostPosted: Thu Feb 08, 2007 2:55 pm
Reply with quote

Are you merging on any key field or sequence or just copying one file after the other?
Back to top
View user's profile Send private message
sindhuvava
Currently Banned

New User


Joined: 05 Dec 2006
Posts: 17
Location: Chennai

PostPosted: Thu Feb 08, 2007 2:58 pm
Reply with quote

have to copy one file after the other so that the output file should contains the entire contents of both the input files
Back to top
View user's profile Send private message
William Thompson

Global Moderator


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

PostPosted: Thu Feb 08, 2007 3:15 pm
Reply with quote

Any copy utility should work, just concatenate the input.
Sort info can start here: DFSORT/ICETOOL Reference Material
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Thu Feb 08, 2007 3:15 pm
Reply with quote

Hi There,

This can be achieved by Concatenating files
You can use following jcl for this

Code:
//PRINT EXEC PGM=IEBGENER                                       
//SYSPRINT DD SYSOUT=*                                           
//SYSIN    DD DUMMY                                             
//SYSUT1   DD DSN=ur first file name,DISP=SHR             
//         DD DSN=ur second file name,DISP=SHR           
//SYSUT2   DD DSN=o/p file name,                   
//         UNIT=DISK,SPACE=(TRK,(1,1),RLSE),DISP=(,CATLG,DELETE),
//         DCB=(LRECL=80,BLKSIZE=800,RECFM=FB)   
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Thu Feb 08, 2007 9:56 pm
Reply with quote

Here's the DFSORT job:

Code:

//STEP1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=K3060AH.TEST.DTL.FILE5,DISP=SHR
//       DD DSN=K3060AH.TEST.DTL.FILE6,DISP=SHR
//SORTOUT DD DSN=K3060AH.TEST.DTL.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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 0
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
Search our Forums:

Back to Top