on 09-24-2008 10:09 AM
Hi,
I have UDF to generate queue,and it was implemented by someone. Now i need to use the same UDF in new mapping for generating new queue.
Here the Problem is UDF has some varaible "m" it wasn't declared in the UDF and working fine in previous mapping.
Now i'm getting some syntax errors when i'm using the same in new mapping like variable not delcared.
Now i need to knowIs this variable was globally declared? if so how can i declare the same in my new mapping
here i'm posting the code...
public void GenerateQ(String[] tdid,String[] zi20,ResultList result,Container container){
int i = tdid.length;
int j = zi20.length;
int k = i +j;
String s;
MappingTrace mt = container.getTrace();
for (int x =0; x<j; x++)
{
if(x ==0){
m = m + 1;
s = String.valueOf(m);
result.addValue(s);
*result.addValue(s); *
}
else if ( zi20[x].equals(ResultList.CC))
{
// mt.addInfo("Inside elseif");
m = m + 1;
s = String.valueOf(m);
// mt.addInfo(s);
result.addValue(s);
}
else
{
// mt.addInfo("Inside else");
s = String.valueOf(m);
// mt.addInfo(s);
result.addValue(s);
}
}
here m is variable for counter if i declared int m=0; UDF is not working properly it shows the counter always 1
can anybody suggest on this
regards,
Sandeep
Hi,
Open message mapping editor and upper right tool tip with "Edit java section" there u cn declare the global variable. at initialization section. declare m = 0;
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
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.