I would like to merge column data of multiple records with LRECL 10 bytes onto a single record
The first 6 bytes of input is the key and for same data of first 6 bytes, the data on the 8th,9th and 10th byte that comes in multiple records should come in single record (if key matches)
Input is
ABCDEF X
ABCDEF Y
ABCDEF Z
MNOPQR X
MNOPQR
MNOPQR
UVWXYA
Output is
ABCDEF XYZ
MNOPQR X
UVWXYZ
ABCDEF X
ABCDEF Y
ABCDEF Z
MNOPQR X
MNOPQR
MNOPQR
UVWXYA
Output is
ABCDEF XYZ
MNOPQR X
UVWXYZ
So if there is data in 8th byte or 9th byte or 10th byte, just put everything in single record. If there is no data (sapces), just have spaces on that column in the signel record.
Please let me know whether it confuses you else I can provide more examples.
Appreciate your help.
Thanks
Vinu