cancel
Showing results for 
Search instead for 
Did you mean: 

create empty file

Former Member
0 Kudos

Hello Experts,

I have a requirement something like this.

I have file to file scenario.

I have multiple files in sender folder coming everyday. I have PI File adapter scheduled at some perticular time to process these files. For each sender file one receiving file is created.

Now the requirement is, my client wants that once all the files from sender folder processed and create files at receiver end, they want PI to create one Empty file to indicate that all the files are processed.

Is it possible? If yes then how?

Thanks,

Hetal

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Hetal,

This requires some more explanation please and also some considerations from the design perspective. Just a rough outline for you.

1) Sending side is that within your organization or is it some kind of outside data?

2) Your sender channel is that only opened once during the day or at regular intervals?

3) What's the aim of creating an empty file?

regards,

Former Member
0 Kudos

Hiiiii,

Answer for ur quesitons:

1) Sending side is that within your organization or is it some kind of outside data?

Ans: Its within our organization.

2) Your sender channel is that only opened once during the day or at regular intervals?

Ans: Its open just once in a day but if needed we can open on regular intervals.

3) What's the aim of creating an empty file?

Ans: Actually there are around 3000 files coming from Sender and PI is processing them and dropping it at receiver end.

Now after PI drops the files at receiver end, another process (we have some other process on receiver side which is inside the organization) will start processing those files. But they dont want to be time dependent, what they want is once PI will process and keep all the files on receiver side then PI should drop one empty file on receiver side, so when receiver process will see this empty file, it will understand that PI has processesed all the files so they can start processing those received files.

Hope i hv cleared your dobts.

Thanks,

Hetal

Former Member
0 Kudos

Hi Hetal,

I have couple of questions and solutions for you.

1. Even though you achieve to create empty file, how would you be sure that all the other 3000 files are processed at receiver side.

2. What if a particular file went into error and the rest of the files gets processed in receiver. How are you going to inform the receiver of the same.

If creating an empty file is just a indicator, you can create it with a dummy communication channel and make it active after the first communication channel processes all the messages.

Say for Eg., channel 1 processes all files around 6:00pm. You can schedule channel 2 to create a dummy file at 6:30.

Though this will create an empty file, there is no check that can be made that all 3k files are processed.

Former Member
0 Kudos

Thanks Kris.

But i dont want my dummy communication channel on time basis.

Lets say 3000 files bunch is just delta, but sometimes there are around 30k files and going further in future it seems its going to grow more.

So for first communication channel it might take more time to process all the files. where as second communication channel (dummy) will create empty file at 6:30 where as first comm channel is still processing data.

I need some solution which will indicate that yes now process is complete, first comm channel is not getting any more data, so now it should be file to create empty file or anything.

Thanks,

Hetal

Former Member
0 Kudos

Hetal,

Are you sure not a single file from the 3000 files will be an empty file? No matter what technique you use to create an empty file as an indicator, it is important to make sure that there will be no empty files among those 3000 odd files.

You can write a script to check if the source folder is empty, then create an empty file. This script will run from your file channel (NFS). If you are using FTP, then write a batch file for the same.

Hope this helps.

Regards,

Neetesh

Former Member
0 Kudos

Thanks Nitesh.

It worked.

Thanks,

Hetal