Page 1 of 1

Need help on DFSORT/ICETOOL - File Lookup

Posted: Tue Jul 18, 2017 11:56 pm
by kved
Hi,

I would need help in comparing 2 files (say, F1 and F2) with different RL's, and key is in different positions and both the files are in PD(packed decimal) format. File(F1) is a lookup file, which has unique records in the key, and the File 2 (F2) is the data file and has duplicates in the key value. And my requirement is to compare F2 with F1, and when F2 has a key match with F1, write the contents of my F2 to the output which is basically a filtered version of my F2. Output is set to have dupes, meaning when a key is matched in the lookup file (F1), write any of number of matches from F2 to my output.

Example :

Input File 1 (Lookup file) - F1 : RL - 100 , RF - FB

101
103
105
107
109
201
203

Input File 2 ( Data File ) - F2 : RL - 260 , RF - FB


100 aaa
101 bbb
102 ccc
103 ddd
104 eee
105 fff
106 ggg
107 hhh
108 iii
109 jjj
200 kkk
201 lll
202 mmm
203 nnn
204 ooo
205 ppp

Expected Output : RL - 260 , RF - FB

101 bbb
103 ddd
105 ffff
107 hhh
109 jjj
201 lll
203 nnn.

Any help on this topic would really be appreciated.
Thank you for your time.

Regards,
VedaK