waiting for file not working properly

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
Debarun
Participant
Posts: 5
Joined: Tue May 02, 2006 8:37 am
Contact:

waiting for file not working properly

Post 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.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

You sure it is waiting for the file to appear or disappear :?:
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
rwierdsm
Premium Member
Premium Member
Posts: 209
Joined: Fri Jan 09, 2004 1:14 pm
Location: Toronto, Canada
Contact:

Re: waiting for file not working properly

Post by rwierdsm »

Is the file (/abc/def/emp.txt ) actually there?

What is the text of the message in Director?

Rob
Rob Wierdsma
Toronto, Canada
bartonbishop.com
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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().
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Welcome Aboard :D
Is the job holding Folder stage is ahead or behind the WaitforFile activity?
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Debarun
Participant
Posts: 5
Joined: Tue May 02, 2006 8:37 am
Contact:

Post 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.
Debarun
Participant
Posts: 5
Joined: Tue May 02, 2006 8:37 am
Contact:

Post 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.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Do you mean to say that if emp.txt has been harcoded, it runs well?
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
rwierdsm
Premium Member
Premium Member
Posts: 209
Joined: Fri Jan 09, 2004 1:14 pm
Location: Toronto, Canada
Contact:

Post 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?!?!
Rob Wierdsma
Toronto, Canada
bartonbishop.com
Post Reply