Advanced Bank Statement Import (BSI) Preprocessing

SOLVED

Hi,

Does anyone have an example of a 4GL script for preprocessing the input file on Advanced Bank Statement Import (BSI)?

I am trying to work with a CSV file downloaded from HSBCNet and I need to create a header line with the opening and closing balances. 

I know I can tick the 'Preprocessing' box and specify the script name in the Bank Import settings:

and it seems that I need a $PREPROCESS label in the script, but that is as far as I have got.

Any ideas would be very welcome!

Many thanks,

Martin