I have numerous segmented files that share a common key but beyond that are defined differently.
How can I merge these files and sort on the common key in the process.
Any help would be greatly appreciated.
Merging and Sorting segmented, delimited files
Moderators: chulett, rschirm, roy
Let me know if you need more...
I have multiple files that contain a different set of data for claims processing. The files are:
Claims
Pharmacy
Prescriber
Patient
Insurance
etc...
The first 86 characters are the key they have in common...
Client, Group, Plan, Patient, Health Service ID, Health Service Item No, Record ID
followed by various columns of random data that pertain to that segment.
I need to sort all these files together by this key. The columns/data will not be modified at all. Im having problems because the files do not contain the same metadata.
I have multiple files that contain a different set of data for claims processing. The files are:
Claims
Pharmacy
Prescriber
Patient
Insurance
etc...
The first 86 characters are the key they have in common...
Client, Group, Plan, Patient, Health Service ID, Health Service Item No, Record ID
followed by various columns of random data that pertain to that segment.
I need to sort all these files together by this key. The columns/data will not be modified at all. Im having problems because the files do not contain the same metadata.
OK, that helps somewhat. So, what is the ultimate goal here? The creation of a single file with all of this combined, sorted by the common key and all of the variable record metadata (and record lengths) preserved?
Key1
Claims data for Key1
Pharmacy data for Key1
Prescriber data for Key1
Patient data for Key1
Insurance data for Key1
etc...
Key2
Claims data for Key2
Pharmacy data for Key2
Prescriber data for Key2
Patient data for Key2
Insurance data for Key2
etc...
![Question :?:](./images/smilies/icon_question.gif)
Key1
Claims data for Key1
Pharmacy data for Key1
Prescriber data for Key1
Patient data for Key1
Insurance data for Key1
etc...
Key2
Claims data for Key2
Pharmacy data for Key2
Prescriber data for Key2
Patient data for Key2
Insurance data for Key2
etc...
![Question :?:](./images/smilies/icon_question.gif)
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers