Thank you for your replies. It is very helpful for me. The data I am working with contains sensitive information and I do not have the permission to share it, otherwise I would have sent a sample. The command worked but now I encountered another problem. The message is "data types not conformable for operation". Gretl asked for the aggregation option. But I do not want to aggregate. The right-hand variables have more than one match with the left-hand variables. The files contain both numerical and string variables that need to be matched (the count of matches is not helping). For example one column on the right-hand that needs to be matched to the left-hand through variable NUMBER (numerical variable) looks similar to this:
TYPEOFCONTROL (name)