Skip to Content

Generating dynamic File name with extension .xml

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

6 Answers

  • Best Answer
    Nov 01, 2016 at 06:51 AM

    Hello Pavan,

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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 01, 2016 at 07:05 AM

    Hi Pavan,

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

    Reuse FunctionLibrary for DynamicConfiguration and Message Header Attributes

    Regards,

    Praveen.

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 01, 2016 at 08:00 AM

    Hi all,

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

    Regards

    Pavan

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 01, 2016 at 07:41 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 01, 2016 at 09:23 AM

    Hello Pavan,

    You hsould either of this not both.

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 01, 2016 at 02:32 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded