IO Adapter Write to a file

Hello People

I am using IO Adapter version 4.1.1 with maintenance pack2. We are trying to read a file from a directory on WAN to the local directory and also put the data in oracle database.

As a first step i tried to simply pickup the file from poll directory, read he content, publish the connonical and write it to a local drive. I was able to poll the file and publish the document but could not write to a directory. Using document tracker was checked to see if the documente as correct. I also tried creating the file with a constant value for the field.

Here is what i am doing.

My document has only one field name “FileRecData”.

For File Write operation
In the option tab i have for
data to output : ${FileRecData}
File name to write : c:\complete\temp\output.txt

In input tab the field defined is FileRecData

In output tab the field defined is File_Name

In Integration component
The value from cononical was assigned to FileRecData.

Even though i assign constant value to above file no file is created.

Any comments or tips.

regards
Rishi

Hello Helpers

I have version 4.1.1 installed but i do see IO adapter version2.0 available on advantage site. Is there any issue with the version

regards
Rishi

Never mind guys. Thanks for those who were going to help.

In the path or the file ma,e i was using back slask instead of forward slash.

regards

Hi:

Did you use the file name path like:

File name to write : c:\complete\temp\output.txt

I mean using double back slashes. When I preview this message, I found one back slash dispeared. I hope you had used the double back slashes.

ZGW

ZG Wei,

According to Rishi,

Path of the output File directory should be c:/complete/temp/output.txt …which works fine…

HTH.

Hi, RMG:

You can check Rsihi’s post, he used back slash, instead of forward slash.

In our work, we used the double back slashes for NT, and the forward double slashes for SUN Solaris.

Cheers!

ZG,

Yep no worries,he is getting output after changing filepath to forward slashes…

You are right regarding unix syntax.

Let us hang on…

Hi ZGW

I think i know what you are coming at…

If you are only using the drive name in you path you would use double back slash. Let’s say the output file name is “output.txt” and you want to create the file on drive let’s say “c:” . The path you would specify is

c:\output.txt.

Actually you could have represented the directory in following ways

  1. c:\output.txt
  2. c:/output.txt

All three of them will work.

But if you want to create the file in a subdirectory which is a subdirectory of other directory, then you need to use forward slash to specify the path. In my case i have a directory named “temp” in the directory “complete” on c: drive.

The file will be created if i represent the path as

c:/complete/temp/output.txt

but following representation will also work.

c:\complete/temp/output.txt (please note the forward slash for path).

or i beleive following representation will also work

c:\complete/temp.output.txt.

I hope i have answered you question.

regards
Rishi

Thanks Rishi for sharing your comments…

its will be clear for all…

Cheers-