Page 1 of 2

Start Loop End Loop

Posted: Thu Jan 06, 2005 4:17 pm
by JDionne
Has anyone used the Start Loop and End Loop stages in a Sequencer job?
My thinking on them was that i would put the start loop then link it to the jobs i wanted it to do and end it with the end loop and loop it all together. When I do this and try to run it it says that the job that I am trying to run is not a runable job. Is there any good place to get a few examples of the use of these stages? The help is helpless.
Jim

Posted: Thu Jan 06, 2005 6:05 pm
by ketfos
Hi,
I am using Start Loop and End loop and job Activity Stage Inbetween. I call a datastage job in Job Activity Stage.

The sequencer job runs without any problem.

Are you able to run the job independently?

Ketfos

Posted: Thu Jan 06, 2005 7:25 pm
by ray.wurlod
"Job not in a runnable state" means that the job needs to be compiled or reset - either it has never been compiled, or it's most recent run was stopped or aborted.
Did you compile your job sequence?

Posted: Fri Jan 07, 2005 8:14 am
by JDionne
ray.wurlod wrote:"Job not in a runnable state" means that the job needs to be compiled or reset - either it has never been compiled, or it's most recent run was stopped or aborted.
Did you compile your job sequence?

Ya the jobs have been compiled they state that in the director. I also set up the jobs in the sequencer to reset and then run if needed.....
Ill go over it one more time.
any other thoughts?

Posted: Fri Jan 07, 2005 8:27 am
by JDionne
I went back and recompiled all of the jobs even though they were listed as compiled and tried again. It worked perfectly. Thanx for the help

Posted: Mon Feb 07, 2005 3:51 pm
by JDionne
I have a new problem with this same job. Thats why I am posting under this topic. I have this job set to run in a loop 3 times. I also have it schedualed to run every 4 hours. The patern that I am finding is that if the job is started by the schedualer and the file is in place that the job needs, the wait for file stage just hangs indefinatly. Why does this happen and is there a work around?
Jim

Posted: Mon Feb 07, 2005 4:32 pm
by ketfos
Hi,

What is your action set to "If the file is present"?

Make sure that path is correct and file is actually there.

Ketfos

Posted: Mon Feb 07, 2005 5:19 pm
by Sainath.Srinivasan
Check whether the file is opened by some other process. Windows, by default, locks files when it is opened by one process and hence the second has to wait for it to be released.

You can try to cut / delete your file from Windows explorer. If it raises a sharing violation, it will imply the existence of a file lock.

Also you can check for properties in
1.) wait period for the file (appearence / disappearence)
2.) loop count and any waiting timer
3.) action after the 'wait for file'
etc

Posted: Tue Feb 08, 2005 8:06 am
by JDionne
Sainath.Srinivasan wrote:Check whether the file is opened by some other process. Windows, by default, locks files when it is opened by one process and hence the second has to wait for it to be released.

You can try to cut / delete your file from Windows explorer. If it raises a sharing violation, it will imply the existence of a file lock.

Also you can check for properties in
1.) wait period for the file (appearence / disappearence)
2.) loop count and any waiting timer
3.) action after the 'wait for file'
etc
Im doing a numeric loop my settings ar
from 1
step 1
to 3
my file is present and is not locked.
I dont know where the waiting timer is
and the action is wait for file when file appears.

When the job is started with the schedualer and the file is present the job will not see the seed file. I have cut it out of the dir and moved it back i have change the name and changed it back I have renamed it the correct name, even thoug it was already named that. Nothing I do seems to get this job to start

Posted: Tue Feb 08, 2005 8:19 am
by Sainath.Srinivasan
Can you see what it says in the 'director log' for the job when the job 'appears' to be hanging. This will give you a clue on what stage the job is waiting.

Maybe you had crossed the waiting stage but did not have an exception when the file is not present or maybe there was no code to perform after successfully locating the file !!??

Posted: Tue Feb 08, 2005 8:41 am
by JDionne
Sainath.Srinivasan wrote:Can you see what it says in the 'director log' for the job when the job 'appears' to be hanging. This will give you a clue on what stage the job is waiting.

Maybe you had crossed the waiting stage but did not have an exception when the file is not present or maybe there was no code to perform after successfully locating the file !!??
The job runs correctly when run manualy so i know there is no problem with the job.
the log says

Code: Select all

Msg456_DB2_Master_Sequencer..JobControl (DSWaitForFile): Will wait until 10:36:01 for file 'G:\456MSG\456msg.txt' to be present
could this be a permision issue?
I have the location of the file mapped on the ETL server...

Posted: Tue Feb 08, 2005 9:01 am
by Sainath.Srinivasan
Maybe you can see the time of the message. That will give you an idea of how long the sequencer is designed to wait. You can also check it in the wait-for-file activity stage.

Posted: Tue Feb 08, 2005 9:03 am
by JDionne
Sainath.Srinivasan wrote:Maybe you can see the time of the message. That will give you an idea of how long the sequencer is designed to wait. You can also check it in the wait-for-file activity stage.
Its set up to wait for one hour, but i physicaly remove the file and put it back and the job still does not launch. This only happens when the job is run from the schedualer

Posted: Tue Feb 08, 2005 9:07 am
by Mike
Since it works when you run manually and not when you schedule it: Use the administrator client to check which user is being used to run the scheduled job. It might be a difference in drive mappings between your user id and the scheduled job's user id.

Mike

Posted: Tue Feb 08, 2005 9:14 am
by Sainath.Srinivasan
Try reducing the wait time to zero (or 1 minute)

You may use a loop of 1 to 60 covering the wiat-for-file-activity stage. On presence of the file, you can exit. On failure, continue with the loop.

This is only a test and work-around and not the final solution.