All,
I have a file with below format.
Header --> *H*
Detail
Trailer --> *T*
File should have,
*H*
<Country Name ....>
<Country Name ....>
*T*
I want to capture where Header <> *H* and Trailer <> *T*. The tricky thing is, I don't know what will come apart from *H* and *T*.
If I write like <> *H* , It will capture other records
Scenario 1:
Even I can't go with number of rows...Incase If I received file something like
*H*
#T*
#H#
*H#
I have to capture the remaining 3 records...
Scenario 2:
File has only 1 header, but it has
#H$
How should I identify this unknown header?
Inputs are welcome!
Extract & Save Unknown Headers
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 729
- Joined: Tue Apr 28, 2009 10:49 pm
Extract & Save Unknown Headers
Karthik
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Read each row of the file as a single VarChar of suitable size (or even unbounded).
Parse and filter in a downstream Transformer stage. Use appropriate substrings (in stage variables) for the first, second and third characters, and perform the logic on those.
Parse and filter in a downstream Transformer stage. Use appropriate substrings (in stage variables) for the first, second and third characters, and perform the logic on those.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.