Hello jerry,

> I have a file of fixed length records

I suggest to make a 'file of type x' where type x is a union of packed
record, something like this:

type
  TRecordData = (rdFileHeader, rdBatchHeader, rdTransactionData);
  TFileRecord = packed record
    case TRecordData of
      rdFileHeader: (
        MessageType: array[0..2] of char;
        Date: array[0..8] of char;
        Company: array[0..3] of char;
        // ...
      );
      rdBatchHeader: (
        // ...
      );
      rdTransactionData: (
        // ...
      );
  end;

So you can read it using one and the same procedure.

---
Rgds, Wilfried
http://www.mestdagh.biz

_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to