cancel
Showing results for 
Search instead for 
Did you mean: 

Re: How to get FileName with with FileName_MMDDYY_HHmmss

Former Member
0 Kudos

Hi Gurus

I would like to append FileName_MMDDYY_HHmmss to the file name on the receiver File channel. I am using a standard PI provided File / FTP adapter.

  • I am trying to use another option than dymanic config UDF -- > Variable Substitution.
  • Variable substitution - does it need to get Date & Time values from the target payload to get the var1 ?!
  • Is there an option 7.1 or 7.3 where we can just pass FileName as a variable instead of using dynamic config UDF?! & Enabling ASMA

Please let me know your valuable suggestions - your help is greatly appreciated!!

Thank you,

Ritu

Accepted Solutions (1)

Accepted Solutions (1)

former_member184720
Active Contributor
0 Kudos

>>>Variable substitution - does it need to get Date & Time values from the target payload to get the var1 ?!

Yes. if you go with variable substitution and would like to add datetime(specific format) then it should be available in your target payload.

>>>Is there an option 7.1 or 7.3 where we can just pass FileName as a variable instead of using dynamic config UDF?! & Enabling ASMA


I don't think so. All the possibilities have been discussed here.(including os commands). What is the problem in going for DC UDF?

Dynamic file name and directory in Receiver File Adapter - summary of possibilities - Process Integr...

Former Member
0 Kudos

Hi Hareesh

The only reason I am trying to avoid dynamic config (UDF) is that I have to pass the value to a target field - I want try avoiding that as I do not have any target field available to store/map the FileName.

Is there a way I can still use dynamic config/UDF without having to pass the value to target field ?!

Can I may be just pass value to variable instead - would that work ?!

Please, let me know.

Thank you,

Ritu

former_member184720
Active Contributor
0 Kudos

You don't need a filed to map incase of dynamic configuration.

You can just map it to your message type.

your logic for dynamic file name -> UDF -> target message type.

Refer to below thread.

Former Member
0 Kudos

Hello,

>>The only reason I am trying to avoid dynamic config (UDF) is that I have to pass the value to a target field

You don't need any target field to map the DC UDF. You can simply map the output of a UDF to a Message Type name. Something like -

Input (if any) -> UDF -> MT_Name

Thanks

Amit Srivastava

engswee
Active Contributor
0 Kudos

Hi Ritu

In addition to the responses above:

Can I may be just pass value to variable instead - would that work ?!

Yes, using a variable as a target for a UDF works as well, it is also one of the common approaches in using DC via UDF.

Rgds

Eng Swee

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello,

What kind of scenario is urs? Is it a file to file pass through scenario or some transformation is involved?

  • Variable substitution - does it need to get Date & Time values from the target payload to get the var1 ?!

>> Inc ase of var substitution, in case if u need specific data time format then yes it has to come from the payload or u can simply use standard functionality of file adapter i.e. append date time stamp.

  • Is there an option 7.1 or 7.3 where we can just pass FileName as a variable instead of using dynamic config UDF?! & Enabling ASMA

>>If file name is coming in the message header (From sender) then u can use dynamic config bean  (standard AM) and using var substitution u can read the same and set ur file name.

Thanks

Amit Srivastava