cancel
Showing results for 
Search instead for 
Did you mean: 

How to Send the Output file to both Archive and Target folder

sahithi_moparthi
Contributor
0 Kudos

Hi,

   I am wrkng on file-file Scenario.In the Receiver Side using NFS file system.My req is that i have to Send the Output file to the Target Folder and also to  the Archive folder using same Communication channel.

          Any inputs on the above would be highly appreciated.

Regards,

Sahithi M

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

Hi Sahithi,

To achieve this requirement, two receiver Agreements required.

You can create the 2 receiver agreements & 2 communication channels and make the necessary changes.

Regards,

Venkat.

zameerf
Contributor
0 Kudos

Hi Sahithi,

Why don't you make use of the Archive option in Processing Tab/Processing Mode in Sender File channel? so that once the file is picked by Sender channel it would be archived and then you can use the receiver channel to place in target directory.

sahithi_moparthi
Contributor
0 Kudos

Hi Zameer,

        yes..in sender channel we can see the Archive option so that we can Archive the input file.

           But my req is that have to archive the Target file in both the Locations(Archive & Target).But in Reciever channel we don't have option like Archive.so how can we archive the target file??

zameerf
Contributor
0 Kudos

ok, i missed your requirement to archive output file.

I guess you can try with OS commands/Shell scripts in receiver channel to copy the file to another directory.

Or

You can use a multi mapping with same Message Type twice in receiver side of message mapping. Then two UDF's to respective root node of Message Type where you can dynamically set the directory path and enable ASMA properties in receiver channel. So that whenever the mapping gets executed, two messages will be the output, one at each directory.

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

You can use a UNIX script to copy the output file to the archiving directory.

You just need to place the name of your script under the Run OS Command After Message Processing

in the receiver file adapter.

Hope this helps,

Mark

sahithi_moparthi
Contributor
0 Kudos

Hi,

Could you Please help me how to set the directory path Dynamically & also how to use MultiMapping in the Message Mapping??

zameerf
Contributor
0 Kudos

Can you first try with UNIX command in receiver channel Run Operating System Command After Message Processing?

cp /directory1/filename1 /directory2/filename2

sahithi_moparthi
Contributor
0 Kudos

Hi Zameer,

   I tried with the OS command.But in the Receiver channel, got the warning message like:Error while Executing the OS command.

sahithi_moparthi
Contributor