File Adapter File Write Operation

Is there a difference in the File Write EAI operation implementation in Windows 2000,Sun Solaris UNIX , AIX environment.

Is the difference in the new line charcter alone. Should we take care other criterias also.

It would be very helpful if someone could share their experience on this.


Moderator’s Note: This thread moved from Integration Server:Development to Enterprise Server:Development.

Because the adapter is written in Java, my guess is that the adapter makes proper adjustment based on its host machine.

I do not know what the underlying code is, however, to definitively say if the line separator is hard-coded as \r\n, \n, or if the adapter uses the PrintWriter class, for example, which has the method println().

println() uses the host platform’s own notion of line separator rather than the newline character. While that may work well if you are working on UNIX, once you move to other environments, you may find that you outputted (and formatted) data is goofed.

If your File/IO adapter is the target adapter only, this will not be an issue; your adapter must only map from the UDM into the host machine’s native format.


Then if the target adapter is running on SUN Solaris and the file to be delivered is on Windows environment then it is a issue.

If the adapter uses the host platform format then file write operation in the SUN Solaris may not match the expected one on the taget directory on Windows environment.

So the devleopment process has to take care of it.

It depends on how you pass the data. If you pass the data as fields of a UDM, then you will not have a problem; the target host will convert the raw UDM fields into a string which is then written to file.

If you are passing a string as a field of a UDM, however, you are correct – you will have formatting issues.

You are discovering here that is good practice to leave as many UDM fields as raw, unformatted data as long as possible. That way, your subscribing adapters can perform whatever actions upon that data in autonomy. That is, without affecting other adapters or sownstream applications.

If you read from a Solaris box, get the data into a UDM and publish it. Let the Windows adapter subscribe and format the UDM fields as a local file.

Thanks Dan,

I will do some more work on this and getback