In this section, I will show some tricks for joining fields from two files in different ways using the JOIN KEYS function of DFSORT
A customer asked the following question:
I have two files with a key in bytes 1-3 and data in bytes 5-9.
File A has the following records:
000 $$$$$
001 AAAAA
002 CCCCC
003 EEEEE
004 GGGGG
and File B has the following records:
001 BBBBB
003 DDDDD
004 FFFFF
005 HHHHH
I want to join the data fields for pairs of records with the same key to get the following output:
001 AAAAA BBBBB
003 EEEEE DDDDD
004 GGGGG FFFFF
Note that each file is already sorted by the key.
Can I do that using DFSORT/ICETOOL?
The answer is Yes, you will see the complete JCL in this Video.
Download
0 formats
No download links available.
Join fields from two files on a key - DFSORT TRICK 6 | NatokHD