Removing TOKENS

Hi,
Does anyone knows if it is possible to eliminate token 0 at all times? I am getting header info in token 0 that is creating unnecessary file.
Or
Does anyone know how I can always remove line number 1 from the input string?

Thank You,
Sebastian

Sebastian,

Sending the sample flow.It only removes the first H entry.If there are any H entries in the middle, then it doesn’t work.

HTH
ramesh


TokenRemove.zip (4.3 k)

Ramesh,

I used the tokenValue and mapped it to fileContent in wroteToFile. But I am still getting extra file with the H<header> info. The tokenValue should now hold the value of each token after it was split by the delimiter. So it should only output tokens without the first one. Correct?

Sebastian

Sebastian,

Did you use the $iteration variable anywhere?If not use it as it is in the sample and include the writeToFile and now map the tokenValue to the fileContent.It should work.

HTH
ramesh.

Sebastian,

After splitting,the first token is also inculded.In order to exclude it,you have to use the $iteration variable and if it is equal to 1, do nothing,else,Write the TokenValue to a file.

ramesh.

I have mapped the tokenValue to fileContent. Am I missing something?

Sebastian

pckg
TOKEN_TEST.zip (5.6 k)

Ramesh, I was playing around with it and I must changed something b/c now its working. :slight_smile: So far so good! Now I have to incorporate this whole thing into another pckg. Thank you for the help! :slight_smile:

Ramesh, I guess I have one small issue. After I added your solution I am getting the new tokens correctly in the toList. Then I am looping thru toList and I am writing the contents to a file. Example I have only 2 tokens the loop is looping twice thru the toList which is correct but is writing the same token twice in two different files. It should write token one and then token two. Can’t figure out why token 2 is not being written?

LOOP over /valueList
-Branch
–SEQ %$iteration%!=1
—MAP
—appendToStringList
LOOP over /toList
-getCurrentDateString
-writeToFile

Ok I figured it out. I made a change:

LOOP over /valueList
-Branch
–SEQ %$iteration%!=1
—MAP
—appendToStringList
—getCurrentDateString
—writeToFile

I had to drop toList in the writeToFile and now I am getting correct files.