on 07-14-2009 1:01 PM
I want to write a udf,
i want to remove SUPPRESS when ever i find SUPPRESS in my input?
Can someone help me out in the code?
Hi hankovak,
Here you have a UDF to delete SUPPRESS values.
public void RemoveSuppress(String[] a,ResultList result,Container container){
for (int i=0; i<a.length;i++)
{
if (!a<i>.equalsIgnoreCase(ResultList.SUPPRESS))
{
result.addValue(a<i>);
}
}
I hope this helps you
Regards
Ivan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The source is not sending me a field X @ all,
ie. PI will not even get that field, so even if i use map with default it doesn't create that node,
what i see in the source queue is a GREY SUPPRESS,
what i am trying to achive is that when ever i see a GREY SUPPRESS i need to remove it and replace it with a blank field...
what is the logic i have to code in the UDF for this?
thanks
There is slight correction in code
-
public void RemoveSuppress(String[] a,ResultList result,Container container){
for (int i=0; i<a.length;i++)
{
if (!a<i>.equalsIgnoreCase(ResultList.SUPPRESS))-----> Replace "a" with a(i)
{
result.addValue(a<i>);----
> Replace "a" with a(i)
}
}
-
Write a in within square bracket instead of round bracket
i am not able to save in square bracket
Hope this helps:)
Edited by: Varalakshmi SB on May 19, 2011 7:42 AM
Use node functions remove context to remove supress values.
can you explain your prob bit clearly
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think better to provide more inputs on your requirement
Actually you can use remove context node function for the same (as not sure about your sceanrio ,need more details)
you can add the suppress functionaltiy to the context using RESULTLIST.CC (which is copy of the content and indicates the contex)
Rajesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
please help me out here....
A 1-unbounded
a.seq#
B 0-unbounded
b.seq#
b.item
//if b.seq# equals a.seq# map it to k.seq# in the target else if b.seq# doesnt exist then the target K will not have a P node....
Target
<K>1-unbounded is mapped from a
k.seq# equals a.seq#
<P> mapped from <B>
p.item
now a record in source has a A information and may have B(multiple) information too, target K will b created for every A in source, the P in target is optional and will be created as many number of times ther is a B with a matching seq # as As
ie,
Src
A
1
/A
A
2
/A
A
3
/A
B
2
england
/B
B
2
india
/B
B
2
UK
/B
target shuld have
<K>
1
</K>
<K>
2
<P>england</P>
<P>india</P>
<P>UK</P>
</K>
<K>
3
</K>
Edited by: hankovak jovani on Jul 14, 2009 2:32 PM
Edited by: hankovak jovani on Jul 14, 2009 2:33 PM
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.