cancel
Showing results for 
Search instead for 
Did you mean: 

file to file with out message mapping and using variable substitution

former_member581827
Participant
0 Kudos

Hi,

Can any one send me a scenario where we can have file to file scenario with out message mapping and where i can use variable substitution.

As of now i am using integrate configurations where i cant use variable substitution as the message does not reflect in integration engine. I need to populate time stamp between <filename><timestamp>.txt.pgp

I am as of now using configuration scenario.

The time stamp always writes before the last file extension.

Let me know your thoughts?

Thanks,

Chandra.

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Usage of DynamicConfigurationBean is what you need to do.

Just follow this and you will be done.

http://wiki.sdn.sap.com/wiki/display/XI/CombiningthreedifferentaspectsofPIinoneshot

Since you dont have any mapping here ignore the UDF part.

Rest, The post above points to teh thread that i raised few days back on the same issue. Refer to that for more.

Note : One should not be checking Use Adapter specific message attributes in receiver file channel but check it for sender.

Regards

Soumen...

madhusudana_reddy2
Contributor
0 Kudos

Hi,

Receiver file adapter will support adding timestamp, you no need to do any variable substitution for this. Simply you can use this add time stamp option under file construction mode.

If you want to use your own timestamp format to file before file extention, then where will you generate the timestamp???. It should be in mapping. Otherwise you can not genarate the timestamp in any area of PI. At this time you can use variable substituion or dynamic configuration for setting the timestamp for the file.

thanks,

Madhu

Former Member
0 Kudos

Hi Chandra,

u can use the Variable substitution even without IR contents also(Mapping....).

in the receiver communication channel just specify the path u want to access for a value...

eg: filename payload:mt_name,1,records,1,name,1

and in th file name give it as %filename%.txt... or vt ever ur requirement

Babu

udo_martens
Active Contributor
0 Kudos

Hi Chandra,

variables for file adapter can only work if your message is type XML.

I assume in your file transfer scenario you do not have XML (file transfer is binary, right?).

I think the easiest way to achieve the wished filename would be command line (script) what is renaming the file.

Regards,

Udo

former_member581827
Participant
0 Kudos

Hi Udo,

Thanks for your reply.

The target file name is <filename><timestamp>.txt.pgp. where filename is constant and we need to add timestamp when ever we are sending file.

I dont have any idea of command line, It would be great if you can send me some blogs where i can refer about how to write command line in PI.

Thanks,

Chandra.

Former Member
0 Kudos

Hi Chandra,

Have a look at this thread to get original filename.. Then after you got the original filename just add the timestamp in File Construction Mode.

Write if you need help

former_member190389
Active Contributor
0 Kudos

Hi,

If possible , you can send in the timestamp as an xml tag and then use it in variable substitution.