on 08-06-2009 11:45 PM
HI Guys,
MY source file is comma seprated file (,) in the file i had quotes" " for the data like
"5000543","0.00","03/04/2009",
is there any way i can remove the quotes in file content conversion
Please help me on this
Regards
Srinivas
Thanks for your help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Srinivas,
I know you have closed this thread, but would like to point out that there is no need to use a UDF for this.
In your Sender File FCC, use these -
xml.enclosureSign = "
xml.enclosureSignEsc = " "
Regards,
Neetesh
Srinivas,
This should not be a big deal, because your fields are separated by a comma. So you need to keep in mind like you are doing the content conversion for a csv file.
See this blogs for some information:
/people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
/people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
In the second blog 1345 there are parameters for content conversion. So similarly mention your conversion parameters in your sender communication channel. So after converting to xml your input fields have values like:
field1: "5000543"
field2: "0.00"
field3: "03/04/2009"
So all your field values has with "". Now you can use either standard replace funciton or a udf as given above and then it will remove the quotes and then you can map according to your requirements. If you think sometimes you can get quotes and sometime not in the file then you can use function like startswith or endswith along with exists and can map accordingly.
Regards,
---Satish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
you can write UDF like bellow or use an function Standar Text ---> Replace
public String replace(String source,char oldChar,String newString){
String toReturn="";
int index=source.indexOf(oldChar);
if (index!=-1){
if (index!=0)
toReturn+=source.substring(0,index-1);
toReturn+=newString;
toReturn+=source.substring(index+1,source.length());
}
return toReturn;
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
FCC does not support that functionality.
Options:
1. Develop a module to delete the quotes.
2. Put a java mapping inside your message mapping
3. Handle it in your message mapping
Regards
Ivan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.