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
 

 

Merging two sequential files

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Merging two sequential files
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: 3158
Location: Tucson AZ

PostPosted: Thu Feb 08, 2007 2:55 pm    Post subject:
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    Post subject: re:merging of two ps files
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: 3158
Location: Tucson AZ

PostPosted: Thu Feb 08, 2007 3:15 pm    Post subject:
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: 1187
Location: Bangalore,India

PostPosted: Thu Feb 08, 2007 3:15 pm    Post subject:
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 Moderator


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

PostPosted: Thu Feb 08, 2007 9:56 pm    Post subject:
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:

www.ibm.com/servers/storage/support/software/sort/mvs/srtmpub.html
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 getting three output files out of JOI... migusd SYNCSORT 7 Mon Jun 05, 2017 11:30 pm
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am
No new posts Dynamic split of files under groups sril.krishy DFSORT/ICETOOL 4 Mon Apr 17, 2017 1:09 pm


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