Header in import file

Hi I am making af dataport in order to import some information. The import file contains 2 headerlines (from a mainframe system) that I dont use. How do I skip them in a easy way?? Thanks

You need to make new DataItem (for example Integer) without reading anything and with CurrDataport.SKIP in onAfterImportRecord trigger. You have to break this DataItem after two iterations. And you’ll get two lines skipped before your “main” DataItem begin. Best regards, Const.

You can also do a nonprinting report instead of a dataport. You can simply tell the report to skip anything which look likes the header line. Otherwise, you can parse the incoming text line. There is one big limitation with this approach which is that you can’t read lines with more than 250 characters. Happily, though legacy mainframe systems rarely produce lines longer than 128 to 160 characters :slight_smile: --Tim Horrigan Tim.Horrigan@emsolution.com ------- Tim Horrigan