I need some help.
I have a flat file, which has HDR,TRL(header and tailor) and then inbetween i have multiple segments like INV,AWB and CHG. (those 3 segments will repeat ‘n’ no of times)…
i would like to get 1st block …i.e
INV|SINI44335|I|R|22052010|SGD|30|21062010|610249879|SIN|ABDUL
AWB|7740548863|610249879|T|TC|Z|NON REVENUE
CHG|X|IMPORT/EXPORT
need to placed in a file…say…ffdata and then need to use convert to values for 1st time, in second time i need to get
INV|SIN732106|O|N|05112009|SGD|30|05122009|610278761|SIN|ABDUL
AWB|2469885176|610278761|N|CREDIT/DEBIT|D|EXPRESS WWIDE
CHG|||-1|K|-0.50|-14.400000|0.000000|0.000000|0.000000|0.000000|0.000000|
these three lines to ffdata and then convert to xml…etc…
can any one provide me some suggestions…
sample file:
HDR|FFINV|3.0.0|APPLE|SIN|26052010|1809|
INV|SINI44335|I|R|22052010|SGD|30|21062010|610249879|SIN|ABDUL
AWB|7740548863|610249879|T|TC|Z|NON REVENUE
CHG|X|IMPORT/EXPORT
INV|SIN732106|O|N|05112009|SGD|30|05122009|610278761|SIN|ABDUL
AWB|2469885176|610278761|N|CREDIT/DEBIT|D|EXPRESS WWIDE
CHG|||-1|K|-0.50|-14.400000|0.000000|0.000000|0.000000|0.000000|0.000000|
TRL|7|1|14.50|265.980000|