cancel
Showing results for 
Search instead for 
Did you mean: 

Pick the file with dynamic name

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi

use

*.txt

srini

Answers (3)

Answers (3)

Former Member
0 Kudos

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

former_member750652
Contributor
0 Kudos

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.

Thanks,

Ram.

Former Member
0 Kudos

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