Writing the file with layout
Posted: Thu Jan 06, 2011 2:59 pm
I have the requirement like below:
Two input files. one will have the file layout and the other will have values for that layout.
I need to read the layout and pull the values and have to write it in the output file.
for eg:
Layout of the file is
05 abc 9(5)
05 def9(8)
05 sdhf x(5)
File2 will have val for the layout mentioned above as 111112222222233333
what i need in output is in the below format
abc 11111
def 22222222
sdhf 33333
please help in coding this requirement.
Two input files. one will have the file layout and the other will have values for that layout.
I need to read the layout and pull the values and have to write it in the output file.
for eg:
Layout of the file is
05 abc 9(5)
05 def9(8)
05 sdhf x(5)
File2 will have val for the layout mentioned above as 111112222222233333
what i need in output is in the below format
abc 11111
def 22222222
sdhf 33333
please help in coding this requirement.