Hi,
I have set of records in a file. Each record has a header and trailor record. I want to omit few records based on one field. At the same time, i want to remove header and trailor record for that record also. Can any one please tell me the solution.
Example:
AAAA12345 --- Header record
Satish99207AAAA --- 99207 record.
Kumar99207AAAA --- one more record.
Sanju99207AAAA --- one more 99207 record
BBBB12345 --- Trailor record
AAAA12346 --- Again Header record
Rajkum56789jklhm --- other than 99207 record
BBBB12346 ---- Trailor record
AAAA12347 --- again header record
Doneku99207 ---- another data record
BBBB12347 --- Trailor record etc;
AAAA12348
kishjk56789
jamhjk56789
BBBB12348
Ques: I want to omit 99207 records including hedear and trailor using sort or any other utility
Expected result:
AAAA12346
Rajkum56789jklhm
BBBB12346
AAAA12348
kishjk56789
jamhjk56789
BBBB12348