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
 
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 FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm
No new posts Comparing 2 Files using Current time arunsoods SYNCSORT 9 Fri Sep 22, 2017 6:00 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 22 Sun Aug 27, 2017 10:35 pm
No new posts Match two files using multiple keys a... santoshks1987 SYNCSORT 11 Fri Aug 18, 2017 10:50 am

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