Start Loop End Loop

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

JDionne
Participant
Posts: 342
Joined: Wed Aug 27, 2003 1:06 pm

Start Loop End Loop

Post 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
Sure I need help....But who dosent?
ketfos
Participant
Posts: 562
Joined: Mon May 03, 2004 8:58 pm
Location: san francisco
Contact:

Post 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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
JDionne
Participant
Posts: 342
Joined: Wed Aug 27, 2003 1:06 pm

Post 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?
Sure I need help....But who dosent?
JDionne
Participant
Posts: 342
Joined: Wed Aug 27, 2003 1:06 pm

Post 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
Sure I need help....But who dosent?
JDionne
Participant
Posts: 342
Joined: Wed Aug 27, 2003 1:06 pm

Post 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
Sure I need help....But who dosent?
ketfos
Participant
Posts: 562
Joined: Mon May 03, 2004 8:58 pm
Location: san francisco
Contact:

Post 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
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post 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
JDionne
Participant
Posts: 342
Joined: Wed Aug 27, 2003 1:06 pm

Post 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
Sure I need help....But who dosent?
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post 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 !!??
JDionne
Participant
Posts: 342
Joined: Wed Aug 27, 2003 1:06 pm

Post 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...
Sure I need help....But who dosent?
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post 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.
JDionne
Participant
Posts: 342
Joined: Wed Aug 27, 2003 1:06 pm

Post 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
Sure I need help....But who dosent?
Mike
Premium Member
Premium Member
Posts: 1021
Joined: Sun Mar 03, 2002 6:01 pm
Location: Tampa, FL

Post 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
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post 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.
Post Reply