on 05-02-2007 3:30 PM
Hi
I have done file to file scenario. I have file with file name ex: file20070129.txt. First time i will pick this file and i will send it to destination by mistake if i read the same file on the next day or the same day i have to send an error message to destination. How to achive this scenario.
Thanks & Regards
Ravi Shankar B
Hello Ravi,
To avoid these mistakes please use the mode "Delete" in your sender file adapter.
Also if you cannot delete those files you can run a unix job which will move the file in some archive folder
Thanks
Amitanshu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
I know if i use delete we can avoid such mistakes. But by mistake if any one places the same file in the same directory manually or if some one created the another file to file scenario with same file name(content may be different) in these situations xi will read the duplicate file or same file which manually placed by some one. So when ever these situation arises i would like to send an error message to reciever.
How to do this
Thanks & Regards
Ravi Shankar B
Hey
i m not sure how are u gonna implement this scenario but its gonna be a tedious job if u want to store all the file names.just suppose ur gettin 1000 files everyday,then u need to strore these 1000 files so within a month u will have 30,000 files:)
do u want to waste resources to compare ur file name with these 30,000 files.
better option would be to dedicate ur directory to only ur scenario, and make sure no one access that.in that way no one can post file in ur dir. so no question of duplicate entries
thanx
ahmad
Hi Ravi,
Okay If two XI Servers are accessing the same file you can try some thing like this
1) Configure 2 File Sender Adapters in both XI Servers.
2) Assume File_Sender_1 Picks up the file first(Takes the file to Server1)
3) Set the "FileName" as "Pickable.*"
3) Use the Command line function to rename the picked file say from (Pickable to Picked )
4) Now go to the second server and configure it's file sender adapter
5) Set the "FileName" as "Picked.*"
6) Set Processing Mode as"Delete" in this adapter.
Try this setting in both of your adapters.
For Command Line funtions see::-
/people/michal.krawczyk2/blog/2007/02/08/xipi-command-line-sample-functions
1)Windows batch Commands::
http://labmice.techtarget.com/articles/batchcmds.htm
2)Linux
: /people/michal.krawczyk2/blog/2005/08/17/xi-operation-system-command--error-catching
Hope this will help you, try it.
Regards
Piyush
Pl:reward points if it is help full.
ravi
a quick thought on this, havent tried it but can check this out:
1. when a file is read, take the file name and store it ins a DB/FILE using lookup.
2. When the interface is scheduled to run for the second time, check if the same file is found in the DB/FILE again using lookups.
3. If yes throw an exception.
above 3 points needs to be programed in one udf.
you can try archiving the file once read thats one simple solution !!!
http://help.sap.com/saphelp_nw04/helpdata/en/e3/94007075cae04f930cc4c034e411e1/content.htm
- processing mode as archive !!!
Else i think you will have to go in to implement a module to do the checks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey
once u read the file,u can delete it or send it to archives folder.
this will make sure u dont have that file in sender directory,so there is no question of readin it again
thanx
ahmad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.