Skip to Content
avatar image
Former Member

Pick the file with dynamic name

Dear All

My scenario is file to idoc.

legacy system generates file with a file name as current date.txt which keeps on changing

eg: on 9th july file name is 09072009.txt and

on 10thjuly filename would be 10072009.txt

How do i pick such file and process it?

What should be the File Name in the sender communication channel?

Please help me in resolving this issue

Thanks

Bhasker

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    Jul 09, 2009 at 08:08 AM

    hi

    use

    *.txt

    srini

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 09, 2009 at 08:15 AM

    Hi!

    You might be also interested in File Content Conversion in Communication channel if it is flat file. It enables you to convert te file to previously defined xml format.

    Kind regards,

    Radek

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 09, 2009 at 09:30 AM

    Hello Baskar Raj,

    Your requierement can be acheived by using the combination of UDF and ASMA(AdapterSpecifieMessageAttriburrtes) which helps us greatly in meeting dynamic filename rquirements.

    1.You have to enable either FIlename,Time stamp or all the he ASMA in the sender side communication channel .

    2.Write the UDF that gets the file name (CURRENT DATE.txt)during runtime that is available from enabling ASMA in sender communication channel .

    3.change it to the name u want to modify (Replace with the new file name by getting time stamp from the ASMA attributes.

    4. Map the UDF output to any of the target nodes(can be messagetype node MT_ur msg type name).

    5.Enable ASMA on the target side also in that chek same file name.

    Code to be writen in UDF is mentioned by sunilchandra in the below thread u jus need to avoid filename in that and use only date format it will acheive ur requrement.

    regarding-target-file-name

    Thanks,

    Ram.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 16, 2009 at 10:42 AM

    Solved i have to use *.txt and process it and in mapping by getting the current file name i have to validate it and process the current dates file

    thanks

    Add comment
    10|10000 characters needed characters exceeded