I've come across once scenario while using Join keys :
problem statement :Compare two different length of files(length of 10 & 18), write all key matched records from dataset-2 against dataset-1 into the one output data set.
Key Filed, would get vary from 1 to till 5 length from two data sets records.
Problem here is duplicates and incorrect mapping for example : dataset records is G1AJJ provided, basicaly it find first letter match from second file but its exact match would be G1.
what exactly i want is that is there any way to put varying key size while matching since this key filed expected to be varry from 1 to 5 length
Thanks for all in advance !!
Note - anyway im writing COBOL pgm to handle this but i just curios to know if any other way of doing it
CODE' D help people who spend their time on Your issues
Sir, Actaully some times first file would be having data with single length, that time it wont match but it expected to have match with any of record with same starting letter.
F1 1.5
F 2
HL126 2.1
G 3.1
G2HMN 4.7
G2456 3.5
G1QTY 4.9
EXPPECTED OUTPUT AFTER COMPRIOSN WOULD BE:
Code:
F 2
G1QTY 4.9
F1 1.5
G2456 3.5
Basically file 1 records should try to match same length of key in file 2 if not present with same key then try to find with length 4, like this till length 1 it has to match!!
Thanks you
CODE' D
learn to help people who spend time on Your issues