Is it possible to relate two files by key fileds when one of them contain multiple records corresponding the key.
Lets take an example.
My Driver file contains only one field [Account no]
Code:
123
234
345
456
567
My transaction file looks like this with two fields [Account No], [Record Type]
Code:
123 01
123 02
123 03
119 01 <= Should be excluded in output , doesn't exist in driver file
119 02 <= Should be excluded in output, doesn't exist in driver file
234 01
234 02
345 03
Now my output requires all the records from transaction file corresponding to the account present in driverfile.
Desired output wud be like :
Code:
123 01
123 02
123 03
234 01
234 02
345 03
As per my knowledge splice operator can be used only in case there is an one to one correspondence in driver and transaction file. I am really looking for a cool solution for this.
Hi I ve got a similar situation here. I've got two input files FILEA and FILEB (both Variable blocked files). FILEA contains the key in the first 15 characters (position 1, length 15). FILEB contains the key split into two different positions (position 1, length 6 and position 10, length 9). FILEA has no duplicates but FILEB has duplicates based on the keys.
Now For each FILEA record, I need to pull all matching records (based on key) from FILEB to a new file - FILEC. FILEA and FILEB are already in sort oredr of the key.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Please show an example of the records in each input file and the records you expect for output. If fileA can have duplicates within it, show that in the example. If fileB can have duplicates within it, show that in the example.