I m using Mercator 6.7. I want to send several files using FTP adapter.
So in rule bar of map designer, using PUT("FTP",adapter specific commands ) i m able to send files.
Every file is of different names.
Case-1 : Now, for the ftp adapter can i include retry option with some attempts in rule of map designer.
FTP code :
VALID( PUT("FTP",
"-URL FTP://id:pwd@ipaddress//path/Alok/"+filename1+";type=A",
TEXT(FileContents)),
FAIL ( "Error in writing the file to specified directory- (" + LASTERRORCODE ( ) + "): " +
LASTERRORMSG ( )))
Case-2 : If i use the FTP adapter in output card settings of map designer or in IFD, then can i send files having different names.
eg : -URL FTP://id:pwd@ip address//path/Alok/filename;type=A
The above filename is not the same everytime.
Query about FTP Adapters- Mercator
The PUT function with FTP adapter does not return diagnostic messages very well. It is best to run a map with the adapter.
I usually run a map that has 1 input card and 1 output card both using a blob of data.
The command is
If you just want to pass the name of the file to the run map you could use
The R3:5 is the retry 3 times every 5 secs.
The filename in destination can be changed along with the input file name.
I usually run a map that has 1 input card and 1 output card both using a blob of data.
The command is
Code: Select all
=run("ftpadapter",echoin(1,data to ftp ) + " -OAFTP1R3:5 '-AUDIT+ -PT -T+ -URL ftp://" + User + ":" + Pword + "@" + IPadd + "/" + Destination + ";type=ASCII+"
+ " -MKD'")
Code: Select all
=run("ftpadapter","-IF1file name -OAFTP1R3:5 '-AUDIT+ -PT -T+ -URL ftp://" + User + ":" + Pword + "@" + IPadd + "/" + Destination + ";type=ASCII+"
+ " -MKD'")
The filename in destination can be changed along with the input file name.
-
- Participant
- Posts: 10
- Joined: Fri Sep 23, 2005 10:27 am
I disagree with the information regarding the usefulness of the PUT () function. I think that you can get useful debugging information with put by invoking similar to the following.
=VALID(PUT("FTP", "adapter commands", data), LASTERRORCODE() + LASTERRORMSG())
RUN() returns a return code for the execution of the run map.
My $.02
=VALID(PUT("FTP", "adapter commands", data), LASTERRORCODE() + LASTERRORMSG())
RUN() returns a return code for the execution of the run map.
My $.02
Hi,
The specific probs which i was facing related to FTP adapters was solved using RUN function. The PUT along with adapter commands is not working specific to my issue.
Now, i encountered another bad issue in the same.
Many times while connecting to target application i m getting the below message in FTP Trace file. I am retrying FTP for 2 times
Attempt #1 failed, will retry after 40 second delay.
WSASend: Socket error 32 occurred (There is no process to read data written to a pipe.).
Attempt #2 failed, will retry after 40 second delay.
WSASend: Socket error 32 occurred (There is no process to read data written to a pipe.).
After 1st attempt , a socket error comes. FTP waits for 40 secs and i m getting the attempt 2 failure in the very next line. Means FTP adapter is not trying to again open the url , login etc...
Pls give your comments. I could not find any thing more in Mercator to explore abt it.
In mercator.ini we have a settings like Idle, Soft Limit (SLim), Hard Limit (HLim). Changes these for FTP can help ? Pls provide your inputs on it.
Thanks in Advance.
The specific probs which i was facing related to FTP adapters was solved using RUN function. The PUT along with adapter commands is not working specific to my issue.
Now, i encountered another bad issue in the same.
Many times while connecting to target application i m getting the below message in FTP Trace file. I am retrying FTP for 2 times
Attempt #1 failed, will retry after 40 second delay.
WSASend: Socket error 32 occurred (There is no process to read data written to a pipe.).
Attempt #2 failed, will retry after 40 second delay.
WSASend: Socket error 32 occurred (There is no process to read data written to a pipe.).
After 1st attempt , a socket error comes. FTP waits for 40 secs and i m getting the attempt 2 failure in the very next line. Means FTP adapter is not trying to again open the url , login etc...
Pls give your comments. I could not find any thing more in Mercator to explore abt it.
In mercator.ini we have a settings like Idle, Soft Limit (SLim), Hard Limit (HLim). Changes these for FTP can help ? Pls provide your inputs on it.
Thanks in Advance.
Hi,
Thanks for the immediate reply.
1)
Using Run function , I tried increasing the retry attempts and time interval ( 4:100 secs ) but still getting the same probs.
2)
Now, In mercator.ini file IdleFTP=0 ( default). I will change to IdleFTP=20 and try it. Logically in mercator once a ftp fails, connection chks for FTPidle time. Once idle time is the connection gets close. Now the adapter trys to again open a connection and give another attempt based on time factor in retry option.
Correct me , if i m wrong. I am not very much sure abt it.
I will update soon after changing IdleFTP to 20.
3)
Is there any thing in mercator more to R&D in this matter.
Thanks
Thanks for the immediate reply.
1)
Using Run function , I tried increasing the retry attempts and time interval ( 4:100 secs ) but still getting the same probs.
2)
Now, In mercator.ini file IdleFTP=0 ( default). I will change to IdleFTP=20 and try it. Logically in mercator once a ftp fails, connection chks for FTPidle time. Once idle time is the connection gets close. Now the adapter trys to again open a connection and give another attempt based on time factor in retry option.
Correct me , if i m wrong. I am not very much sure abt it.
I will update soon after changing IdleFTP to 20.
3)
Is there any thing in mercator more to R&D in this matter.
Thanks