cancel
Showing results for 
Search instead for 
Did you mean: 

dynamic file name configuration

Former Member
0 Kudos

Hi

We have an input as follows:-

US16USAJ05061UC010007042Theel,Jerald G

US16USDN05061UC010007042Theel,Jerald G

US16USB405061UC010007042Theel,Jerald G

US16USAJ05061UC010007042Theel,Jerald G

Based on the field starting from 5th to 8 th character, how can we dynamically name files in the output folder based on an input field?

We are using FCC in sender and receiver.

Thanks in advance

Accepted Solutions (0)

Answers (4)

Answers (4)

aashish_sinha
Active Contributor
0 Kudos

Hi,

Use the blog given by Prateek, it is the best way to do dynamic configuration for file name. You can do a liitle bit of massaging in that UDF as per your requirement of File name like substring the values you want coming into your udf as input.

regards

Aashish Sinha

Former Member
0 Kudos

sorry forgot to mention

we are not using file sender , we are using soap sender with fcc, so the option of variable substitution is not possible

thanks

SudhirT
Active Contributor
0 Kudos

Hi,

you need to do it in Receiver File CC.

former_member194786
Active Contributor
0 Kudos

Hi Pratichi,

Use Michals blog for the same:

It can be achieved using Adapter Specific Message Attributes. Extract the 5th to 8th place string using substring function and then set the filename in the UDF using put parameter.

Regards,

Sanjeev.

Former Member
0 Kudos

HI,

Use substring function in the mapping and give the the values as 5 and 8.

Map to the any field in the Target Structure.

Use the variable substitution in the Receiver File adapter.

Go throgh the following blogs.

Regards

Goli Sridhar

SudhirT
Active Contributor
0 Kudos

Hi,

Little correction you dont need to write the UDF as the input is coming in a

Source field just pass that sourcefield with the standard substring function with value 5,3

And In you Receiver CC enable the Variable substitution put the value for variable as payload: your field. and write the variable %var1%.xml in place of file name.

Thanks!

Edited by: sudhir tiwari on Nov 12, 2008 12:40 PM

prateek
Active Contributor
0 Kudos

In the mapping, use substring function and assign the required filename value to any field of the target structure. Then perform variable substitution to get the dynamic filename based on payload data.

Regards,

Prateek