cancel
Showing results for 
Search instead for 
Did you mean: 

Empty File at Target Directory

Former Member
0 Kudos

Hi Experts,

I am dealing with file to file scenario, where file is being posted to the target directory depending upon the condition, which is mentioned in Java Mapping. The Java Mapping is tested and is successfull. But, the problem is PI is generating file with 1KB (only one space) ain the alternate folder(where it shouldn't go depending upon the condition).

The folder is having no space constraint and the file size is just 2KB.

Empty file handling mode has been set to ignore. still its being generated

Please suggest.

Thanks & Regards,

Sushama

Accepted Solutions (1)

Accepted Solutions (1)

former_member187339
Active Contributor
0 Kudos

Hi Sushama,

>>But, the problem is PI is generating file with 1KB (only one space) ain the alternate folder(where it shouldn't go depending upon the condition).

So you are having two problems..one it is going to wrong folder

>>Empty file handling mode has been set to ignore. still its being generated

and second the file shoudl have been ignored since it contains a space.. Since the file was not empty (empty fiel = 0kb) it was written by file adapter....

Why your java mapping is generating a space.. can't you avoid that there itself.. else try to paste the code here and lets see if someone is able to help you or not

Regards

Suraj

Former Member
0 Kudos

Hi Suraj,

The file is being posted successfully to the target directory. Say for example I am putting 2kB file in source directory, then 2KB file is genrated in the target directory(fulfilling the condition). But, another file is being generated at the alternate folder,which is showing 1 KB size having one space in it. I am working in PI7.1 with SP8.

Please suggest!

Thanks ,

Sushama

former_member187339
Active Contributor
0 Kudos

Hi Sushama,

>>But, the problem is PI is generating file with 1KB (only one space) ain the alternate folder(where it shouldn't go depending upon the condition).

Check why it is going to another directory when the condition is false.. where are you checking this condition and paste here the condition which you have used for both the receivers

Regards

Suraj

Former Member
0 Kudos

Hi Suraj,

Here it goes::

for(int b=0;b<itemLineList.getLength();b++){

Node itemLineDetails = itemLineList.item(b);

NodeList itemLineDetailList = itemLineDetails.getChildNodes();

for(int c=0;c<itemLineDetailList.getLength();c++){

Node ItemDetailsNode = itemLineDetailList.item(c);

if(ItemDetailsNode.getNodeName().equalsIgnoreCase("MetaData")){

NodeList ItemDetailsList = ItemDetailsNode.getChildNodes();

status = checkIteminMDM(ItemDetailsList.item(1).getTextContent());

if (status){

getTrace().addInfo("in update");

populateCreateorUpdateHashMap(ItemDetailsNode,"update");

}

else{

getTrace().addInfo("in create");

populateCreateorUpdateHashMap(ItemDetailsNode,"create");

}

former_member187339
Active Contributor
0 Kudos

Hi Sushama,

I was not able to understand the requirement completely... Is this the java mapping which you have used??

Where are you checking the conditions for file creation (in Receiver determination or interface determination)

Regards

Suraj

Former Member
0 Kudos

Hi Suraj,

yes this is the code, rather a part of code.

Actually the requirement is::

PDM is sending files to MDM. If the data in the pdm already exists, it will update the same else it will be created.

THere are separate folders for create and update.

If the file is created it should be posted to create directory not in the update directory. But, unfortunately the file is also posted in update directory with one space

Please suggest..

No problem with java mapping since we have tested it. Its working fine

Also, since I am workling in Pi7.1, we can't impliment enhanced receiver/interface det here. Hence,the same is done by java mapping only.

Thanks & Regards,

Sushama

Edited by: sushama pandey on Dec 10, 2009 11:05 AM

Former Member
0 Kudos

It may be a misunderstanding of the requirement, but do we not need dynamic configuration for finding the directory to which the file should be placed?

Regards,

Ninu

Former Member
0 Kudos

Hi All,

Thanks a lot!!

I have done the same using dynamic configuration and now its working fine

Regards,

Sushama

Answers (0)