Hi,
I have variable length file where the length can vary between 50 to 20050 bytes. The file structure is as shown below,
Fixed data of 50 bytes length.
Array of 50 bytes which occurs from 0 to 400 times with a depending on clause. Offsets 49 and 50 of the file (last 2 bytes of fixed data) contains the value of array occurance.
Our requirement is to write all the records having a value of '01' in the first two bytes in any occurance of array into an output file.
For eg:
if first record in file have '01' in 51 & 52 offset (ie first two fields of first occurance of array), that record should be written to output file.
if second record is having '01' in 101 & 102 offset (ie first two fields of second occurance of array), that record should also be written to output file.
Similary if '01' is present in first two bytes of any other occurance of array, those records should be written into output file.
Please guide us in writting the sort card for above requirement where variable length file needs to be handled.
Thanks in advance.
Regards
Nobin