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
 

 

Code to merge two or three files

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Code to merge two or three files
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: 680
Location: NJ

PostPosted: Thu Jan 19, 2006 3:04 pm    Post subject: merge files
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: 464

PostPosted: Thu Jan 19, 2006 3:09 pm    Post subject: Re: merge files
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Job failing with USER = 4093 REASON C... Pradeepa S ABENDS & Debugging 1 Wed May 17, 2017 3:35 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 COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm


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