Posted: Tue Jan 04, 2011 7:54 am Post subject: Compare two files and merge data to one file
I have two files FileA and FileB. FileA and FileB have accounts(unique record key) 1-13 position.
File B has the packed decimal 4 bytes(15-18 positions) which should be inserted(overwrite) in fileA(27-30 position) for matching accounts.
I appreciate any help.
Code:
File A
----+----1----+----2----+----3----
8702381135801 H CB 23
8705322621992 H CB 23
8705233931804 H CB 21
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Tue Jan 04, 2011 11:30 am Post subject:
vak255,
Your description does not match the output. You mention that you need to replace the contents in pos 27-30 but your sample output shows that you actually overlaid the contents in pos 21-25.
The following DFSORT JCL will give you the desired results. I assumed that you want to overlay the contents in pos 27-30 and both files are of LRECL 80 and RECFM FB and you only need the match records.
Joined: 14 Jan 2009 Posts: 37 Topics: 0 Location: USA
Posted: Wed Jan 05, 2011 10:39 am Post subject:
Yak255:
The WER230A SORTOUT OUTREC FIELD OUTSIDE RANGE is issued because your REFORMAT statement is building a 84-byte record (80 bytes from F1 plus 4 bytes from F2), but your BUILD statement references a field that starts in position 82 for a length of 4 - this would be outside the range of your data.
I will review your earlier posting entries to see if we can help with a coding solution. _________________ Brian Wood
SyncSort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Wed Jan 05, 2011 11:15 am Post subject:
vak255 wrote:
I got few syntax errors and I have corrected it but now I am getting U0016 abend with the below message.
Vak255,
My original job works fine with DFSORT. The messages indicates you are using SYNCSORT. I'm a DFSORT developer. DFSORT and Syncsort are competitive products. I'm happy to answer questions on DFSORT and DFSORT's ICETOOL, but I don't answer questions on Syncsort. _________________ Kolusu
www.linkedin.com/in/kolusu
Please let me know if you require additional assistance. _________________ Brian Wood
SyncSort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum