cancel
Showing results for 
Search instead for 
Did you mean: 

Dummy file for picking the original file from ftp Folder

Former Member
0 Kudos

Hi all ,

I have created out bound (Idoc to File) interface which is working properly in production.In this interface ".csv file" is created at the target FTP sever with below nameing convention.

Ex: Stock_quantity_YYYYMMDDThhmmss.CSV

Customer requirement is:

There should be onother file in same ftp server (same folder) with same file but different extension i.e.

Stock_quantity_YYYYMMDDThhmmss.CEM.

This is a dummy file (Stock_quantity_YYYYMMDDThhmmss.CEM) and it contains no data.

Reason: At customer end they are using a script to transfer .csv files based on the .cem files placed in same folder.

Logic is if .CEM file is avilable in that particular folder then the script will search for .csv file.

if both files(.sem&.cem) are available in the folder then scrpit process the .csv file to the application.

Please give me some suggestion on this issue...............

Regards

Satya tanuku

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member216353
Participant
0 Kudos

Hi Satyatanuku,

Actually the client requirement can be pondered about, because if the client application is able to process a ".CEM" file then is will be capable of processing ".CSV' also. Well for this, a minor change at the client application would be needed.

I'm only telling this point because, In PI to achieve this the best option would be write a script and place the script in the FTP path.

This script will be invoked by PI receiver communication channels when the interface gets executed.

The script will be called in "Run operating system command after message processing" step of the channel.

Script Logic -- You can use the same dynamic attributes that you would use to create a file with the name ".CSV" to create a dummy/empty file with the same name along with ".CEM" extension.

The problem is maintenance of the script, wheneve there is an change in the file nameing convention or the extension, the script has to be changed.

Let us know, if this was helpful and the approach you would finalize.

Regards,

Mohammed Younus

Former Member
0 Kudos

Hi,

You can create a batch file with FTP commands, which will create a .CEM file (only after .CSV file has been written) on FTP server. You can place this batch file on PI server and can invoke the script using file channels' OS command.

But another issue that I can think of is - you want same name with exact same timestamp for both the files. That may not be possible by this approach, unless and until you extract the CSV filename and create the CEM file with that file name.

Regards,

Neetesh

Former Member
0 Kudos

Hi

If the receiver file communiction channel uses File System (NFS) transport protocol, then you can write a script to generate the dummy file and configure the script in the "Run operating system command after message processing" section. This script would generate the required trigger file as soon as the csv file is created.

Regards

rajasekhar_reddy14
Active Contributor
0 Kudos

hI,

Better to chnage your file name or chnage your scripting code .

identify why your scripting code behaving like this,because .csv extension file should not copied right?

Regards,

raj