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
 

 

merge two files

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: merge two files
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: 662
Location: Pennsylvania

PostPosted: Mon Apr 05, 2010 7:39 pm    Post subject:
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

Site Director


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

PostPosted: Mon Apr 05, 2010 8:56 pm    Post subject:
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    Post subject:
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    Post subject: Reply to: merge two files
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    Post subject:
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    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 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 Dynamic split of files under groups sril.krishy DFSORT/ICETOOL 4 Mon Apr 17, 2017 1:09 pm
No new posts Compare two files and subtract values ameetmund DFSORT/ICETOOL 7 Fri Mar 31, 2017 3:35 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm


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