Hi All,

Please can any one provide me sort code for below requirement...please let me knwo if more details required

Here we have three fields 1. Description(1:15), 2.CCY(Currency)(21:3), 3. AMT(Amount)(29:19)

I have to handle negative values also ...

Input data:

DESCRIPTION CCY AMT

------------- --- ----

INR 200

INR 200

---- ---

SUB TOT INR 400

INR 200

INR 200

---- ---

SUB TOT INR 400

EUR 1200

EUR 1200

---- ----

SUB TOT EUR 2400

KUW 200

KUW 200

---- ---

SUB TOT KUW 400

KUW 200

KUW 200

---- ---

SUB TOT KUW 400

zUR 1200

zUR 1200

---- ----

SUB TOT zUR 2400

Output data Required:

DESCRIPTION CCY AMT

---------- --- ----

INR 200

INR 200

---- ---

SUB TOT INR 400

INR 200

INR 200

---- ---

SUB TOT INR 400

CCY TOT INR 800

--- ---

EUR 1200

EUR 1200

---- ----

SUB TOT EUR 2400

CCY TOT EUR 2400

--- ---

KUW 200

KUW 200

---- ---

SUB TOT KUW 400

KUW 200

KUW 200

---- ---

SUB TOT KUW 400

CCY TOT KUW 800

--- ---

zUR 1200

zUR 1200

---- ----

SUB TOT zUR 2400

CCY TOT ZUR 2400

--- ---

GRND TOT 6400