assigning increment number, logic needed
Posted: Sat Nov 24, 2012 8:33 pm
Hi,
I have multiple files reading in using file pattern method,along with filename, in the output i am having batch header record(BH) and in that record, the second field should represent the number of the file. what logic shall be written in transformer(4 node transformer),
example, if i have 6 finput iles , then the output should be like this
BH|000001|X|Y|Z
DL|....
DS|...
BT|....
BH|000002|X|Y|Z
DL|...
DS|...
BT|.... like wise for the third file i lll be having 000003 in the BH record,
we also have at output file level File header record(FH) and FileTrailer record(FT) as shown below
FH|A|B
BH|000001|X|Y|Z
DL|....
DS|...
BT|....
BH|000002|X|Y|Z
DL|...
DS|...
BT|....
FT|....
I have multiple files reading in using file pattern method,along with filename, in the output i am having batch header record(BH) and in that record, the second field should represent the number of the file. what logic shall be written in transformer(4 node transformer),
example, if i have 6 finput iles , then the output should be like this
BH|000001|X|Y|Z
DL|....
DS|...
BT|....
BH|000002|X|Y|Z
DL|...
DS|...
BT|.... like wise for the third file i lll be having 000003 in the BH record,
we also have at output file level File header record(FH) and FileTrailer record(FT) as shown below
FH|A|B
BH|000001|X|Y|Z
DL|....
DS|...
BT|....
BH|000002|X|Y|Z
DL|...
DS|...
BT|....
FT|....