on 04-18-2006 2:41 AM
I am using FCC in receiver file adapter.
My file is getting generated.
In target structure one field is optional and hence target xml element doesnt have value. hence that field is not there in txt file. with this what happens next subsequent field gets shifted to my optional field place and then i get error field length is not correct.
I want to put 2 spaces if that optional field length is 2 char and then there should be field separator(space) and the subsequent column.
I am already giving fixedfieldlegnth of all the fields.
Pl can anyone suggest how to do this.
thanks,
sharada
Hi Sharada,
Anyway you have a field seperator and fixed field length options set on the FCC parameter list.
So what you have to do is just map your source field like this <b>SRC FLD -> [MapWithDefault (Def. value SPACE)]-> TRGT FLD</b>, this will ensure the occurance of this TRGT fld and other FCC options like FixedFieldLength and FieldSeperator will work normally and it will keep rest of the fileds in their correct position.
Regards,
Ananth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sharada,
Do your normal mapping to the target field that is optional.
Use a If function before mapping the field.
Check if the node is created in usual mapping, else map a constant with 2 spaces.
DO something like this:
Mapping ---------------->
equalsS ----> if
constant(empty Value)--->
constant(2 spaces)--> then -> tgtField
Mapping -----------> else
regards,
P.Venkat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Is it alright if, in the target message,an empty xml tag is created?
i.e , if there is no field in the source, a dummy <field></field> will be create in the target without any value in it.
If this is ok, then you could use message mapping to solve this.
if <field> exists -> then-> map to -
> <Tfield> else map---> " " to <Tfield>
In content conversion use <b>fieldFixedLengths</b>with a value 0
Regards,
Smitha.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sharada,
In message mapping, check for the existance of target field. If the field doesnt exist, then map a constant of 2 spaces to the target field.
This way you wont get subsequent fields shifted to the optional field.
Regards,
Uma
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Pl canone suggest on this
thanks,
Sharada
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.