Reputation: 1
I am quite new to the world of Integration and IBM Integration Bus Toolkit. I am doing a small exercise with IBM Integration Bus Toolkit, whereby my small application picks up an .txt file in a specified directory and moving it into another one (I am using Message Flow to do it). I can even specify the file name for the output file
What I wanna do now is appending the file name of the output file by adding the current date to it (e.g. output-20180225.txt) but I am not quite sure how and where to do it.
I know there is a function CURRENT_DATE
but I am not so sure how to apply it to the file name.
Upvotes: 0
Views: 1335
Reputation: 1
you should use local environment tree and in the you modify you file name like this :
Example File name -- Response_20180621035622333.txt
DECLARE currtime CHARACTER CAST(CURRENT_TIMESTAMP AS CHARACTER FORMAT 'yyyyMMddHHmmssSSS');
SET OutputLocalEnvironment.WrittenDestination.File.Name='ResponseFile_'||currtime||'.txt';
this will set the new file name every time with current time stamps.
Upvotes: 0
Reputation: 703
Using Compute node and writing the following code:
SET OutputLocalEnvironment.WrittenDestination.File.Name = $yourfilename;
Upvotes: 0