cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping: How to convert Blue color suppress to gray color suppres

former_member213558
Active Participant
0 Kudos

Dear All.

my scenario is JDBC to SFTP scenario.

so from JDBC end i'll get all the field, and i need to place the condition whenever the value come i need to generated the target segment/fields.and i need to avoid the file which come constant value  of "END"as well.

but when i do mapping , i'm getting all blue color suppress because no value at source side. because of blue color suppress value is not populating at target segment, please advise how i can get the gray color suppress in this case.  or some other way do we achieve?

fyr

Regards

Ramesh

Accepted Solutions (1)

Accepted Solutions (1)

engswee
Active Contributor
0 Kudos

I just want to add on that there is no such thing as a gray suppress.

A light gray section just indicates that there is a context change occurring in the queue. Values in light gray should be ignored (I don't know why XI/PI was designed that way but it has been a cause of confusion for many!) - the value there is just an indication of the last value of the context just before the context change occurred.

If you see "SUPPRESS" in light gray, it is similar to a null context - i.e. there are no values at all in that particular context.

former_member213558
Active Participant
0 Kudos

HI Eng.

Thanks for you reply.

since sender adapter is  JDBC  i always get row by row value. i spent all my time to finish this mapping and i completed almost, i struct only at this point, can you please suggest is there a way to change this suppress. do we have any UDF.

please do needful.

Answers (4)

Answers (4)

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Ramesh,

Any reason why you can't use removeContext after the ifWithoutElse statement?

Regards,

Mark

former_member213558
Active Participant
0 Kudos

Hi Mark.

Thank for your reply.

Yes, remove context is not works here, because CDRTRINF  comes some places only so the same hierarchy we need to maintain at  target end.

like  

if CDRTRINF has a value then i need to generate the segment else to be ignored. on top of that i should ignore the same field when it has a value "END".

please suggest me further.

Regards

Ramesh

former_member190293
Active Contributor
0 Kudos

Hi Ramesh!

Please clarify what exactly do you want to receive as output: just values without "SUPPRESS" or each value in separate context with empty contexts for suppressed values?

Regards, Evgeniy.

former_member213558
Active Participant
0 Kudos

Thank for your reply.

expecting blue color context  as gray color (i.e context change) as i mentioned in above screenshot. and i have a reason as well where i must to send these values to target side.

like  

if CDRTRINF has a value then i need to generate the segment else not. on top of that i should ignore the same field when it has a value "END".

please suggest me further.

former_member190293
Active Contributor
0 Kudos

Hi Ramesh!

If you create target sements in top-level context (no context changes for each segment) it will work with your mapping given above. If you need to create segments inside top-level context - just add SplitByValue function after IfWithoutElse.

Regards, Evgeniy.

former_member213558
Active Participant
0 Kudos

Hi

Thank for your reply.


i tried it, now i'm getting <null> instead of suppress. but i can see it's splitting accordingly. but <null> is coming for the condition of "END" as well. so that value is misplacing.


I'm not looking for any queue result for the input value of "END".

please help me how to avoid the "END" result queue.

Thanks

Ramesh

manoj_khavatkopp
Active Contributor
0 Kudos

So do you mean you need a output which has only "R11"(referring to above screenshot) and their should not be any <null> ?

former_member213558
Active Participant
0 Kudos

no null also acting as a context change here, but i'm getting one <null> for the condition of  and cases ( value and result of queue should be ignored) because the condition CDRTRINF  is not equals "END" we could not  pass any queue.

Example is

actual value is

R11

nodata at the struture

R11

nodata at the struture

nodata at the struture

nodata at the struture

END

R11

nodata at the struture

nodata at the struture



getting result is


R11

<null>

R11

<null>

<null>

<null>

<null>

R11

<null>

<null>


expected result is


R11

<null>

R11

<null>

<null>

<null>

R11

<null>

<null>

so finally we should  ignore the "END" value form the queue result ifself.

problem is, the third R11 value should go to 7th place of target system but not it going to 8th place.

hope this will you to understand my problem.

please suggest and do needful.

Regards

Ramesh

former_member190293
Active Contributor
0 Kudos

Hi Ramesh!

Please provide your source XML example and target XML desired output.

Regards, Evgeniy.

former_member213558
Active Participant
0 Kudos

Thank you for your support. this requirement has been done.

i asked the DB end to send the space to all the respected fields if value doesn't contain, earlier i get null. and in first mapping i mapped as is it, and the second mapping i placed my logic in segment level as if value contain space do not create and it's worked.

suman_sourabh
Participant
0 Kudos

Hi Ramesh,

Blue Suppress is nothing but the constant ResultList.SUPPRESS

If you want to replace the blue suppress then in UDF compare the input value with constant ResultList.SUPPRESS and if it equals then simply output will be ResultList.CC.

like:

input is var1,
UDF Type: Single value

////////////////////////////////////

if(var1.equals(ResultList.SUPPRESS)){

return (ResultList.CC);

}

else

return (var1);

/////////////////////////////////////

with this you can convert the Blue Suppress to gray suppress.

Hope this will help to get you desired result.

Thanks,
Suman

former_member213558
Active Participant
0 Kudos

Hi Suman.

Thank for your reply.

your UDF behaving as a remove context, i want to maintain the same blue color suppress as a gray color suppress as i maintained above screen shot.

please suggest further.

manoj_khavatkopp
Active Contributor
0 Kudos

Ramesh,

if there is no value in source side then for target field you want to generate empty field or pass any value ?

Blues suppress comes whenever you are using IfthenWithoutelse,IfSthenwithoutelse or create if in which case target field wont be created.

try using if-else and pass an empty constant in else condition so that to create target field .

Br,

Manoj

former_member213558
Active Participant
0 Kudos

Hi Manoj.

Thank you for your replay.

I thought the same solution but target segment/filed should not generate when values doesn't comes.at source end.

can you please guide me is there any other way we can achieve? or do we have any UDF to achieve this.

former_member213558
Active Participant
0 Kudos

Hi Manoj.

Even though if we go with "if-else" condition my second condition ( i need to avoid the fields which come constant value  of "END"as well.) result also will give "false". this false also will generate the empty target segment.

so here avoiding "END" value also not possible.

is there a way we can achieve by writing UDF.