Flat File Processing

I’m sure this is out there somewhere but I couldn’t find it. What’s the service that reads a flat file (just a .txt) into the pipeline if you are pulling it in via file port polling? Thanks in advance.

You have to set your service i/p as Stream (ffdata) *object casesensite and read the file with the following services…

streamtoBytes
bytesToString (this step – see flatfile in the pipeline)
flatfile:ConvertToValues(to parse your FF)

HTH,
RMG

Okay, I follow you on this:

streamtoBytes
bytesToString (this step – see flatfile in the pipeline)
flatfile:ConvertToValues(to parse your FF)

But how do I set the input to ffdata?

You don’t have to set the input - when the file poller invokes your service, it passes the contents of the file as stream to your service. The name of the var in which it passes the stream is ffdata.

So just put in an input variable named ffdata, then in your service use this ffdata and handle it assuming it will contain the content of the file as stream.

HTH, Rohit

Okay, so I put in an object named ffData. Put the streamtoBytes and then the bytesToString. At no point do I see the data in the file in any of the vars.

… because the name of the var is ffdata and not ffData

~ Rohit

Okay, I changed the var name to ffdata and I’m still not seeing any data. I’m getting a variable called Content-type that says “text/plain”, so it looks like it is picking the file up, but it’s not listing the contents anywhere.

How are you trying to see the data in the pipeline??

For Debugging put a save pipeline under the bytesToString step and later use restorepipeline to check the string (has the content).Step thru your flow.

HTH,
RMG

That worked!!! Thanks for you help and patience!

Glad to know it worked…keep going…