Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    File object side effects (iWay 5.5)
Go
New
Search
Notify
Tools
Reply
  
File object side effects (iWay 5.5)
 Login/Join
 
Member
posted
Hi everybody

I have a little problem with the file object. I'm developing a process that read information from a file and makes queries to a database. It is a plain text file in which each record has a fixed width of characters. After reading the file, i transform it to xml.

I've chosen the CDF format in the iWay transformer. I've made many tests and it works well (in the iWay transformer application)

But i've problems when i publish it to the server. The file object, in read-mode, eats blanks. So, the file registers are no longer fixed width. For example (underscores are blank spaces)

"REG1______REG2______REG3_______REG4"

turns into

"REG1_REG2_REG3_REG4"

I would like to know if this problem is a bad parameterization of the file object or i have to do a exorcism to the server.

Greetings!

PD: Sorry, my english is horrible


iWay 5,5,13562,0
 
Posts: 2 | Registered: August 05, 2008Reply With QuoteReport This Post
<Todd_Rentschler>
posted
There is another way to do this and it is to use the file listener on a channel which would pass it into the system. You can pass the file in as flat and then pick it up with the transform object. I am not sure what is happening with the file object and why it is eating the spaces. If you send me the file, I can try it on my side and see if it happens here too. todd_rentschler@ibi.com
 
Reply With QuoteReport This Post
Member
posted Hide Post
ok thanx, i'll try to do it with the file listener


iWay 5,5,13562,0
 
Posts: 2 | Registered: August 05, 2008Reply With QuoteReport This Post
Member
posted Hide Post
Are you sure it is the file read that is changing the data? (Either this object or the file listener should pick it up without modifying it, and this has been well tested; and it seems odd that it would leave one blank). At what point are you looking at the data? if you put a file write immediately after the read, what does that give? What is the transformer doing CDF to XML? there are TRIM functions in there that may be On ...


iway
 
Posts: 4 | Registered: August 19, 2008Reply With QuoteReport This Post
<Todd_Rentschler>
posted
One thing you need to remember if you are using the file listener and then transforming from CDF to XML is to set the "Accepts non-XML (flat) only" to be true. The allows the CDF to get into the route correctly. One side effect is you will not be able to run any sort of pre-parser on the file if you needed to. That may or may not be an issue depending on the application.
 
Reply With QuoteReport This Post
<nklamen>
posted
Todd,
CSV transforms can be called using the XMLGpreParser if desired. Once the data has been converted it can be routed to the appropriate route.

Naomi
 
Reply With QuoteReport This Post
<Todd_Rentschler>
posted
There are two seperate options on how to handle the file coming in. Naomi is correct in that it can be parsed with the XMLGpreParser. Then the transform would need to be an XML to XML transform instead of CDF to XML. This is the best way to go in case you ever needed more preparsers within the channel. The second option is what I explained before where you can pull it in flat and then perform a CDF to XML transform. Two different options which can accomplish the same task.
 
Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    File object side effects (iWay 5.5)

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.