Page 1 of 1

waiting for file not working properly

Posted: Wed Jun 07, 2006 6:26 am
by Debarun
waiting for file not working properly as it seems to work.A variable from the Execute command (ie. CommandOutput) is populated with a value. It is then passed as the waiting for file stage parameter (like ... /abc/def/Execute_Command_1.#Command_Output#). The actual file retrieved from a folder stage is emp.txt. Hence, it should wait for file /abc/def/emp.txt . in the director log, it shows that it is waiting for /abc/def/emp.txt. surprisingly, it keeps on waiting...and .. do not find the file.

Posted: Wed Jun 07, 2006 7:38 am
by DSguru2B
You sure it is waiting for the file to appear or disappear :?:

Re: waiting for file not working properly

Posted: Wed Jun 07, 2006 9:29 am
by rwierdsm
Is the file (/abc/def/emp.txt ) actually there?

What is the text of the message in Director?

Rob

Posted: Wed Jun 07, 2006 3:49 pm
by ray.wurlod
The log message shows that the pathname is being generated successfully. Do you have a timeout set in the Wait For File activity? Do you have two output links from the Wait For File activity, the first with an OK trigger and the second (with an Otherwise or Failure trigger) to handle the fact that the timeout has occurred? Lead the second output to a Routine activity and invoke UtilityWarningToLog().

Posted: Wed Jun 07, 2006 10:04 pm
by kumar_s
Welcome Aboard :D
Is the job holding Folder stage is ahead or behind the WaitforFile activity?

Posted: Thu Jun 08, 2006 1:46 am
by Debarun
At first in a sequence, the execute_command stage executes a command 'ls'. Then it triggers to the wait_for_file_activity stage on condition that return value=0(indicating success). Henceforth, the wait for file has been asked to look for "/siebelapp/pfizer/datastage/Ascential/DataStage/Projects/test_team/INPUT/#Execute_Command_3.$CommandOutput#" .
Here had been the file name (i.e. the command_output of ls ) been hard coded then it runs well. But in this case, it is waiting for the file , as if there is no file of that name(emp.txt). When I checked the director Log --> there is yellow warning entry -->
"job11..JobControl (DSWaitForFile): Will wait until 17:35:58 for file '/siebelapp/pfizer/datastage/Ascential/DataStage/Projects/test_team/INPUT/emp.txt' to be present"
.So it is fetching the right file name from the command_output. But cannot match this with the filename of the file already present.

Posted: Thu Jun 08, 2006 1:51 am
by Debarun
@ray.wurlod, there are two output links from wait for file activity.One goes for OK aand is redirected to stage containing folder stage.The other when failed goes to notification activity.

Actually, the command_output i think is the main problem, its command output is not read properly in the following stages.

Posted: Thu Jun 08, 2006 9:10 am
by kumar_s
Do you mean to say that if emp.txt has been harcoded, it runs well?

Posted: Thu Jun 08, 2006 9:50 am
by rwierdsm
Is the file

Code: Select all

'/siebelapp/pfizer/datastage/Ascential/DataStage/Projects/test_team/INPUT/emp.txt'
actually there when you run the job in the regular way, i.e. emp.txt not hard coded?

If you are running the job two different ways as part of your test, maybe something has changed too?!?!