View previous topic :: View next topic
|
Author |
Message |
techslam
New User
Joined: 03 Dec 2010 Posts: 87 Location: India
|
|
|
|
I have two input files :-
1) Master file
Code: |
HHH00285YYYYY <---------- header record
TTT <--------- trailer record
|
2) Count File
I need a sort job that will read both these files as input and then update/create new MASTER file with new count in postion (4,5)
New count must be the count read from COUNT file + 1 ,
ie, in above example , my new MASTER file must be creted as below :
Code: |
HHH00456YYYYY <---------- header record with updated count 455+1=456
TTT <--------- trailer record
|
Thanks for all the help provided. |
|
Back to top |
|
|
techslam
New User
Joined: 03 Dec 2010 Posts: 87 Location: India
|
|
|
|
Is this not achievable through DFSORT ? |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
Ok but did you try something ?
I am pretty sure this forum has few examples
Based on the input you have provided
1.I assume your master file has two records and count file has 1 record
2.I would suggest a 2 step approach , 1 with SYMNAMES and the next with a basic sort with OVERLAY |
|
Back to top |
|
|
Gabriel Araujo Alves
New User
Joined: 20 Jul 2010 Posts: 38 Location: Brazil
|
|
|
|
If you have a field in common in both files , you might use JoinKeys. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
JOINKEYS will work, whether or not there is a match existing in the data (one can always be made with JNFnCNTL).
However, Pandora's suggestion is much more efficient and would be the recommended way to do it. Examples here. |
|
Back to top |
|
|
techslam
New User
Joined: 03 Dec 2010 Posts: 87 Location: India
|
|
Back to top |
|
|
|