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

merge two files


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
RM0C13920

New User


Joined: 16 Dec 2009
Posts: 6
Location: bbbd

PostPosted: Mon Apr 05, 2010 7:35 pm
Reply with quote

The two files will be merged and sorted into account number sequence, with a Header and Trailer record created from the latest generation of the file, with the record count updated to show the new total.
account number starts from 2 byte upto 14 byte length

Please let me know the how to do this by Icetool or Sort

Finally I need to merge two files GDG with header and trailor from Latest version and in trailor count should be new total number records.
and also It should be account number sequence which starts from 3 byte till length of 14 bytes.
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Mon Apr 05, 2010 7:39 pm
Reply with quote

Could you please be a little more vauge with your specifications?

This is way too much detail.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Apr 05, 2010 8:56 pm
Reply with quote

Hello,

Quote:
Please let me know the how to do this by Icetool or Sort
You need to show some sample input, the output you want from that sample input, and the explain the rules for getting from the input to the output. Mention the recfm and lrecl of the files.
Back to top
View user's profile Send private message
RM0C13920

New User


Joined: 16 Dec 2009
Posts: 6
Location: bbbd

PostPosted: Mon Apr 05, 2010 9:03 pm
Reply with quote

gdg1

0120100406hdr
1030100012345678
1030100012345677
99002tlr


GdG2

0120100405hdr
1030100012345289
1030100012345680
1030100012348680
99003tlr
i need to merge with record like thT and bold is trailor count

o/p file
0120100406hdr
1030100012345289
1030100012345677
1030100012345678
1030100012345680
1030100012348680
99005tlr (trailor count is latest and header and trailor is from latest version and sequenced by accout number
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Mon Apr 05, 2010 9:24 pm
Reply with quote

RM0C13920,

Use the following DFSORT JCL

Code:

//STEP0100 EXEC PGM=SORT                         
//SYSOUT   DD SYSOUT=*                           
//SORTIN   DD DSN=your.gdg.gen(-1),DISP=SHR   
//         DD DSN=your.gdg.gen(-0),DISP=SHR   
//SORTOUT  DD SYSOUT=*                           
//SYSIN    DD *                                   
  OMIT COND=(1,1,CH,EQ,C'9')                     
  SORT FIELDS=(1,15,CH,A),EQUALS                 
  OUTFIL STARTREC=2,REMOVECC,                     
  TRAILER1=('99',COUNT-1=(M11,LENGTH=3),'TLR')   
//*
Back to top
View user's profile Send private message
RM0C13920

New User


Joined: 16 Dec 2009
Posts: 6
Location: bbbd

PostPosted: Tue Apr 06, 2010 8:02 pm
Reply with quote

Thanks alot..
Its working
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 5
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
No new posts Joinkeys - 5 output files DFSORT/ICETOOL 7
Search our Forums:

Back to Top