Page 1 of 1

Merge 2 dictionnaries

Posted: August 23rd, 2014, 4:42 am
by htuser
Dear all,
I would like to know if it's possible to merge 2 dictionnaries into one (as concat do for files).
Thanks in advance,

Re: Merge 2 dictionnaries

Posted: August 24th, 2014, 12:49 am
by manojsoni
Hi

If both the dictionaries have same ids then it can be done

Just cut and paste the records from the one dictionary to second.

Manoj

Re: Merge 2 dictionnaries

Posted: August 24th, 2014, 1:04 am
by htuser
Thank you Manoj. But i would like to find a way to do it automatically in the event of multiples dictionnaries (as the concat tools do it for severals data file).
Regards,

Re: Merge 2 dictionnaries

Posted: September 25th, 2014, 11:51 am
by Gregory Martin
There's no way to automatically merge dictionaries because the header information in a dictionary can only appear once. If you concatenated three dictionaries together, you would have three header sections and three ID sections, which would be problematic. You could write code to read dictionaries two, three, etc. and only copy the data that occurs after the first [Record] entry. That would successfully combine dictionaries in most circumstances.