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
 
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 FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm
No new posts Speed-up/reduce CPU use of code prino PL/I & Assembler 0 Tue Sep 26, 2017 12:05 am
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

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