I have a main file with duplicates on Key field and a lookup file with unique values on key
When I use SPLICE to compare these two files based on key and tried to assign a field from lookup file to main file in the output, I'm facing the following problem.
The unique keys in main file are spliced as exected.
The duplicates in main file which has a match in lookup file are spliced as expected.
But the duplicates in main file which do not have a match in lookup file are spliced together and the results are not valid. I need these record as-is in the output file.
Can anyone please help me with a logic and please let me know if there are any similar posts( I'm unable to find a similar one).
Please find the control statements
IN1 is my lookup file and IN2 is my main file. All files are 276 LRECL FB.
Please note that I'm facing problem only with the records in IN2 having duplicate key and not finding a matching key in IN1. I want those record in output as-is.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Please show an example of the records in each input file for all cases (relevant fields only) and the expected output. Give the starting position, length and format for all relevant fields.
I found that the duplicate records in IN2 file which is "TRIVANDRUM " which do not find a match with IN1 is spliced each other I'm getting only one record in the output.
But my requirement is to keep the Non matching IN2 records as-is in the output file.