EIM : you can use any tool of your choice to read the file and load the EIM tables.
XML: EAI File Transport + EAI XML Converter + EAI Siebel Adapter could be used to read the file and insert or update the database.It is easier if the XML is already generated by the external system in Siebel Message format as that is already an integration object (IO) representation and IO is what EAI Siebel Adapter will need as input anyway.If your XML is in any other format, you will need some extra effort mapping the resulting property set to IO format.
Custom business service: If you go the route of coding yourself. You will have to pick a delimiter and an escape char and increment the logic to check for the escape chars and delimiters .The code sample simply searches for the next delimiter in the line that has been just read.
Example:
File Should be in the format (AB)
BS eScript:
var SearchStr;
var LineVal1,LineVal2;
FileName=Inputs.GetProperty("FileName");
fp=Clib.fopen(FileName,"rt");
if(fp==null)
TheApplication().RaiseErrorText("Unable to opent the file");
while(null!=(ConId=Clib.fgets(fp)))
{
SearchStr = "aaa";
LineVal1=LineVal1.replace("\n","");
LineVal1=LineVal1.replace(" ","");
LineVal1 = LineVal1.split("");
SearchStr = LineVal1[0];
LineVal2 = LineVal1[1];
if(SearchStr != "" && SearchStr != null)
//Invoke any function to do manipulations.
}
No comments:
Post a Comment