on 11-01-2007 4:48 PM
Hi all,
I am doing file content conversion in sender File adapter. Here is the structure
[/
Header
Body
field1 - length 2
field2 - occurrence 1:1, length 3
field3 - length 2
field4 length 2
Trailer
Here is the fixed length file that is inputed into XI
<b>header22 2211trailer</b>
field2 occrence is 1:1 and as you se from the file example field2 from the body is empty(just space).But When I do the content conversion I don;t have this field showing up in my structure!??!!
I want to make sure that field2 appears even as empty field because that is screwing my mapping!?
Can you please have any idea how to make sure that field is in my input structure when I pass spaces?Can I force it somehow?
Thanks all.
jon,
Did you try using the following config on the adapter conent conversion?
Body.fieldContentFormatting = nothing
praveen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jon,
U need to use
If>Field>Exists
Then-->Field
Else-->Constant
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Srihari ,
Thanks much - i think that is what i need to do . can you please give me some details and explain me how to do it ?
Will in this case my Tag of the blank field be there (in the input structure) no matter if pass blak or not blank??We are talking about Input structure - right?
Thanks much
Hi Jon,
Yes you are right.
For Ex: ur XML is
<1>a</1>
<2>b</2>
and sometime is there is no value ur FCC will become
<1>a</1>
So what you have to do is in the message mapping take the source element
if <2> exists then <2>---->Target
else
<2>---->Constant(space)
and this "exists" is a standard function in NodeFunctions.
Regards,
jon,
what's your source message's "critical" tag occurence?
Try to give it minOccurs=1
Peter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Peter,
I am telling you - if blank field is passsed , after file content converison is done, the tag is not there..Is is just skipped!!
Now if I pass - some not blank value - 123 for example - the tag is again back in the structure? Is there anyway i can do to make sure my field2 tag is there no matter if i pass blank field or not blank ?
thanks mush!
its really starnge but i m doin the exact same thing and i m getting a field in structure irrespective of it being blank or filled.
for blank i get <field2/>
and for filled up values i get <field2>111</field2>
what is the occurence of body anyways?try making that 1-1 and test.
secondly if it does not work,use mapwithdefault function to atleast populate the receiver structure with a blank
Thanx
Aamir
mapping will not solve your problem,its an issue at AE level,the FCC is not converting the structure as per the sender data type,i don't know how any mapping function can solve at the sender level.mapping is executed much after the sender FCC:)
mapping will help in case of receiver not sender FCC.
Thanx
Aamir
Jon,
If everything is in one line then how you will read in XI with the structure you given. It will definitely throw an error.
Also if we have spaces in the file it reads into XI as spaces if the content conversion is ok. I think your content conversion is wrong here not the spaces issue.
Regards,
---Satish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi jon,
have you given fieldSepartor...??
what exactly is your input and what are you expecting...
regards
Ramesh P
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
there is no field separator - this is is just fixed length file.
the file is
headerBobyTrailer as
<b>header11 2244trialer</b>
where the blank space is field2 .
(I do not care about header, trailer)
How do you handle this in FCC on the file adapter? I really want to pass this blank value to the target structure??!
thanks all
User | Count |
---|---|
85 | |
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.