Skip to Content
0

Generating dynamic File name with extension .xml

Nov 01, 2016 at 06:39 AM

75

avatar image

Hi,

We are working on scenario jdbc to sftp where requirement is generate a file name dynamically with extension .xml where file name receiving from the db in one field named as MESSAGEID in which i used dynamic configuration udf and enabled asma respective file name is generating.

But required file name with extension .xml how to in add in .xml to the field MESSAGE ID in the udf.

Please suggest

Regards Pavan

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

6 Answers

Best Answer
Raghuraman S Nov 01, 2016 at 06:51 AM
0

Hello Pavan,

In the UDF you can hardcode in the code +".xml"+ if the requirement like hardcoding .xml.

Share
10 |10000 characters needed characters left characters exceeded
Praveen Gandepalli Nov 01, 2016 at 07:05 AM
0

Hi Pavan,

Use below reusable function library for dynamic configuration without writing every time.

Reuse FunctionLibrary for DynamicConfiguration and Message Header Attributes

Regards,

Praveen.

Share
10 |10000 characters needed characters left characters exceeded
Pavan Dogiparthy Nov 01, 2016 at 08:00 AM
0

Hi all,

Thanks for ur reply it has been resolved in udf function i have added '.xml'

Regards

Pavan

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Close the question then, Always close the question after its resolved the problem.

0

sure Praveen. Thanks

0
Evgeniy Kolmakov Nov 01, 2016 at 07:41 AM
0

Hi Pavan!

Just one addition to Praveen's and Raghu's answers: if you pass the value used as file name to target payload than you can use Variable substitution functionality of receiver SFTP adapter.

Define file name scheme as: %fname%.xml

Regards, Evgeniy.


Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Evgeniy,

In this case do i need to use dynamic file configuration

Do we need to give sender message type or receiver message type in reference tab.

vb.jpg

I have given receiver message type and got error.

error-vb.jpg

Regards

Pavan

vb.jpg (31.1 kB)
error-vb.jpg (76.0 kB)
0
Raghuraman S Nov 01, 2016 at 09:23 AM
0

Hello Pavan,

You hsould either of this not both.

Share
10 |10000 characters needed characters left characters exceeded
Evgeniy Kolmakov Nov 01, 2016 at 02:32 PM
0

Hi Pavan!

You should set path to field inside your target structure as variable value.

For structure like:

<MT_Message>

<Header>

<Field1>value 1</Field1>

<Field2>Filename</Field2>

</Header>

</MT_Message>

variable value should be set like this:

MT_Message,1,Header,1,Field2,1

where the number after element name is the index of element in structure tree.

You do it for target structure.

No other actions like writting UDF required in this case.

Regards, Evgeniy.

Share
10 |10000 characters needed characters left characters exceeded