cancel
Showing results for 
Search instead for 
Did you mean: 

Can file name get from partial field value ?

Former Member
0 Kudos

Hi, Friend:

I have file receiver with FCC, I used variable substitution (I have to use this rather than dynamic configuration, since there are multiple files created by multi-mapping), so the file name is pass via payload to adapter.

In advanced tab, we can assigned to a variable like: payload:MT_XXXX,1,Filename,1

Now I do not want full value of Filename, I just need part of the value of it.

I will not consider an option of create another field to store part of the value, since after FCC, a blank line is created which is not acceptable by our integration partner.

Is there any way to get it ?

Thanks

Liang

Accepted Solutions (1)

Accepted Solutions (1)

madhusudana_reddy2
Contributor
0 Kudos

Hi,

Create another node, under that node(FileNode) create one filename element like Filename. Use content conversion like below

FileNode.fieldFixedLengths 0

FileNode.fixedLengthTooShortHandling Cut

FileNode.endSeparator '0'

the above content conversion will not generate new line.

thansk,

madhu

Former Member
0 Kudos

Madhu:

Thanks for the input.

I have already tried this option, but I did not use the third line, it generates a blank line.I will give it a try.

Regards

Liang

Edited by: Liang Ji on Jun 11, 2010 3:13 PM

Former Member
0 Kudos

Thank madhu.

You save me a lot of work. I almost there but just endseparator is not defined as '0'.

Liang

Former Member
0 Kudos

Hi Liang,

Do u solve this query?

I am also working on a interface like this. if use the parameter fixedLengthTooShortHandling, PI will cut any field value to expect length. So no exception is thrown even if some value is greater than expected length. Do you have any suggestion to handle the exception.

Former Member
0 Kudos

Kevin:

If you can see from what Madhusudana Reddy suggested:

I created a node, saying "Tail" in end of structure, add one child node to it saying "Filename"

Now in my mapping program, I can pass real file name I wanted to child node "Filename"

In Variable substitution, I get the whole value of the node "Filename" when we naming the created file.

In FCC, I used Madhusudana suggested, it would not created blank line when using Tail.endSeparator '0'

Hope this give you some hints

@Carlos:

Java Mapping is different approach which we do not want to go at this stage.

Regars

Liang

Former Member
0 Kudos

Hi,

Build your logic in mapping program to store the file name and use this in receiver CC.

Even you can try to map this into root node also.Not sure this.please check

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello Liang,

Have you explored the option of writing an Adapter Module or an OS script? By standard functionality of PI, I don't think this is achievable.

Regards,

Neetesh

Former Member
0 Kudos

Hi, Neetsh and Amsi:

Thanks for your input.

The problem for those interface are all the requirements from partner are rigid, they do not allow change a little at all.

Therefore we have so many constraints.

Writing adapter module will interfere the FCC, I believe, the behavior could be unexpected.

If we rely on adapter module, we do not need FCC anymore. that is might be my last option

Regards

Liang

former_member193386
Active Contributor
0 Kudos

what do You think to build a javamapping for this process?

Former Member
0 Kudos

Any ideas ?

Thanks

Liang

Former Member
0 Kudos

Hi Liang,

This is actually quite different, because we can just pass the source payload value as it is as a file name.

But in your case u need to truncate some thing from source value and pass partial value.

to do some manipulation on that source field also we need to do some thing but that transformed value we cant pass as always we can pas the source payload value.

will wait for other reply

Regards