I've below requirement which I'm checking if it can be done via SORT.
There is a VB file/LRECL=504 which has around 8K records. It has a header and a trailer. The detailed records are grouped based on a 13 char long registration number. Under each registration number there can be multiple records which belongs to it. But the reg numbers will be always present in the record with first 10 chars as, say, XXXXXXXXXX. And its related records will immediately follow this record until next reg num record with XXXXXXXXXX is found.
XXXXXXXXXX - identifies the rec where reg num is present. In above example ABC1234567890 has 4 detailed records and DEF1357902468 has 8.
Similary there will be many registration number with varying detailed records under each reg num.
I have a list of reg nums with me for which I want to copy out those reg num and its detailed records to another file. I just explained the example with one file. In real case, I've 100 files to deal with.
So could you please help me out to achieve this using sort. And if its not possible, any other efficient method by which I can achieve this.