cancel
Showing results for 
Search instead for 
Did you mean: 

How to Remove SUPPRESS

Former Member
0 Kudos

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?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

Thank you very much ) )

Former Member
0 Kudos

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

Former Member
0 Kudos

Jovani,

You can use a standard if else along with exists functionality. So if soucefield --> exists --> then send sourcefield --> else --> constant or blank.

Regards,

---Satish

Former Member
0 Kudos

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

Answers (2)

Answers (2)

rajasekhar_reddy14
Active Contributor
0 Kudos

Use node functions remove context to remove supress values.

can you explain your prob bit clearly

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

Do like this

Map the source A to target K ( indicates that K should occur as many times as A occurs)

in e.g

logic removed as this will work if B segement occures inside A segment

sorry for the misunderstanding of the strucutre

HTH

Rajesh

Edited by: Rajesh on Jul 14, 2009 7:19 PM

Former Member
0 Kudos

Thank you for understanding and taking the effort.....

Would appreciate any help on this please...

thanks