I have a file which is 40 bytes fixed block. Most if the records contain first 20 bytes only. There are a few records which have full 40 bytes. I am trying to write out a file with 20 bytes record size, as shown. If the input file has 4 records, you can see that we will have 5 records in the output. I tried to use sort inRec with IFTHEN logic By checking byte 1 and byte 21 for non blank it did not work. I tried HIT NEXT, it too would not create 2 records Reading a single record. Any help in making me think in the right direction is highly appreciated. Thanks - sreeni
Input
Aaaaaaaaaaaaaaaaaaaa
Bbbbbbbbbbbbbbbbbbb
CccccccccccccccccccccDddddddddddddddddddd
Eeeeeeeeeeeeeeeeeeee
Bbbbbbbbbbbbbbbbbbb
CccccccccccccccccccccDddddddddddddddddddd
Eeeeeeeeeeeeeeeeeeee
Output
Aaaaaaaaaaaaaaaaaaaa
Bbbbbbbbbbbbbbbbbbb
Ccccccccccccccccccccc
Ddddddddddddddddddd
Eeeeeeeeeeeeeeeeeeee
Code'd