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

Code to merge two or three files


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
balacse98

New User


Joined: 17 Jan 2006
Posts: 2

PostPosted: Thu Jan 19, 2006 2:59 pm
Reply with quote

Hi all,

Can anybody give the code to merge two or three files?. I will b helpful if u give so..
Back to top
View user's profile Send private message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 677
Location: NJ

PostPosted: Thu Jan 19, 2006 3:04 pm
Reply with quote

Hi Bala,

Use this code....

Quote:

//JOB
//STEP1 EXEC PGM=SORT
//SYSPRINT DD *
//SORTINO1 DD DSN=DSNNAME,DISP=SHR
//SORT1NO2 DD DSN=DSNNAME,DISP=SHR
//SORT1NO3 DD DSN=DSNNAME,DISP=SHR
//OUTFILE DD DSN=NEWDSN,DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,
// SPACE=(TRK,(2,1),RLSE),
// DCB=(RECFM=FB,LREL=80,BLKSIZE=800)
//SYSIN DD *
MERGE FIELDS=(1,3,A,CH)
/*
//


hope the above code will b usefull....
Back to top
View user's profile Send private message
Rupesh.Kothari

Member of the Month


Joined: 27 Apr 2005
Posts: 463

PostPosted: Thu Jan 19, 2006 3:09 pm
Reply with quote

HI Bala,

Quote:
Can anybody give the code to merge two or three files?. I will b helpful if u give so..


Use following code. It may help u.

Code:
//STP0010  EXEC AIDCAMS                                 
//INPUT1   DD DSN=File1,DISP=OLD 
//              DD DSN=File2,DISP=OLD 
//              DD DSN=File3,DISP=OLD   
//OUTPUT1  DD DSN=Output file,     
//            DISP=(NEW,CATLG,DELETE),                 
//            DCB Paremeter
//            UNITparameter ,SPACE=(CYL,(1,1),RLSE)         
//SYSIN    DD *                                         
 REPRO IFILE(INput1) OFILE(OUTput1)                       
/*                                                     
//SYSOUT   DD SYSOUT=*       


Regards
Rupesh
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compile rexx code with jcl CLIST & REXX 6
Search our Forums:

Back to Top