on 01-01-2012 4:26 AM
Hi, I need help on below condition.
I want to disply the field in last line of output file.
There are 2 segment
1. Line 0....unbounded 2. Unit 0...Unbounded
I am creating output file with no records = no of line items If i get 5 Line segments the I am creating 5 records in output file. It is ok for me.
But , Now Units segment also unbonded with 2 fields 1. qualif 2. posnr
If Qualif = 10 then I need to map POSNR to target field.
Here I want to disply this posnr value in last record of a file. first four lines of this field is null and last line of a file should have to display this field value.
Please help me on this
Thanks,
Enivass
Edited by: enivas on Jan 2, 2012 10:53 AM
Hello,
This needs a UDF:
Qualif -> UDF -> target
Posnr -> /
UDF is of context type:
arguments: qualif
posnr
String temp = "";
for(int a=0;a<qualif.length;a++){
if(qualif[a].equals("10")){
temp = posnr[a];
break;
}
}
for(int a=0;a<qualif.length;a++){
if(a<qualif.length-1){
result.addSuppress();
}
else
result.addValue(temp);
}
Hope this helps,
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
if( if without else) Qualif = 10(Here use equal function of test) then mapwith default then remove context then sort then collapse context then copy by value (4) then map this to the target posnr.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.