cancel
Showing results for 
Search instead for 
Did you mean: 

wait_for_file() not working for certain file names

Former Member
0 Kudos

Data Services Version: 12.1.1.3

OS: Windows Server 2003.

Hello,

I'm using wait_for_file to poll for files in a certain directory. I've used this in the past for other projects and never had an issue until now.

What seems to be happening is with certain file names, wait_for_file is returning a 1 (meaning at least one file found), however the file list is coming back as blank.

For example:

If I put a file name called cs.p.P110113CN.b.110114 in the directory, I get a blank return file list.

If I then rename this to 110114, it works fine.

Here's the code I'm using:

wait_for_file($GV_InputDirectory || '*',0,0,1,$GV_InputFileName);

$GV_InputDirectory varchar(1000)

$GV_InputFileName varchar(100)

Any ideas why this might be happening? Renaming the file isn't really an option as it's a standard format that we've used for years.

Edited by: Craig Cartmell on Mar 7, 2011 11:16 AM

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Any ideas on this?

Is anyone able to test if they get the same issue?

Former Member
0 Kudos

I tried reproducing this on 12.1.1.1 and 12.2.3, I don't see any issue, the filename is returned and return value of the function is 1

I used the $GV_InputDirectory as

'C:\\temp\\Data\\'

what is the value of $GV_InputDirectory in your case ?

let me check this with 12.1.1.3

Edited by: Manoj Dhyani on Mar 12, 2011 4:38 PM

Former Member
0 Kudos

Hi,

Thanks for the reply.

$GV_InputDirectory is set to
wcs-dev-boweb2\c$\DebtManager\Dev\Interfaces\Bulk Payments\Agency\credit-security\Input\.

I'm wondering if it's something to do with the length of the directory/filename combined?

If I place a file called "110114" in there, wait_for_file() works perfectly. If I change it to "cs.p.P110113CN.b.110114", I have problems.

Former Member
0 Kudos

I don't think the issue is with directory + filename length, try this if you copy the file cs.p.P110113CN.b.110114 to
wcs-dev-boweb2\c$\DebtManager and use that as file directory do you get the file name ?

Former Member
0 Kudos

Hello,

Just did another little test and found that if I move the file from
wcs-dev-boweb2\c$\DebtManager\Dev\Interfaces\Bulk Payments\Agency\credit-security\Input\ to
wcs-dev-boweb2\c$\DebtManager\Dev\Interfaces\Bulk Payments\Agency\, it works.

I'm just going to keep playing about with it and see what I can come up with.

Thanks again.

Former Member
0 Kudos

Hi Craig,

I dont even know if this an optimal reply or even a suggestable answer

If the path name is
tl230\rpd\pdm\restore\

and you try to put it in a variable should it be

$G_PathName = '
\tl230
rpd
pdm
restore
'

Thanks

AJ

Former Member
0 Kudos

Thanks but I'm already escaping the slashes.

I'm still having pretty major problems with this and think it must be a bug in the product.

Without restructuring our interface folders I can't see a way around it.

Former Member
0 Kudos

Yes, I've also encounted this issue, please advise.

Many Thanks,

Paul