Error in executing Datastage job

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
srini_ramesh
Participant
Posts: 13
Joined: Fri Oct 08, 2004 6:19 am

Error in executing Datastage job

Post by srini_ramesh »

We have developed a server job. We are using the DsrunJob utlity to execute the server job. if the Job is running for a longer duration then it gives the following return code 141.

But if the same job is running for short durations then it does not produce the error.

We found a macro in file Sqlext.h
(found under /install/branded_odbc/include in the unix box) .This macro is defined as follows:
#define SQL_DROP_TABLE 141.

Is there any relation between this and the return code which we are getting from the job.

Could you pl advice on this.
Thanks
ogmios
Participant
Posts: 659
Joined: Tue Mar 11, 2003 3:40 pm

Re: Error in executing Datastage job

Post by ogmios »

It's not because you can find the number in a header file that they are related :wink:

What do you get for error messages in director in the job you execute?

Ogmios
In theory there's no difference between theory and practice. In practice there is.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Can you be precise about which utility you are using to run the job? Is it dsjob (command line interface), or the SDK routine UtilityRunJob?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
srini_ramesh
Participant
Posts: 13
Joined: Fri Oct 08, 2004 6:19 am

Re: Error in executing Datastage job

Post by srini_ramesh »

srini_ramesh wrote:We have developed a server job. We are using the DsrunJob utlity to execute the server job. if the Job is running for a longer duration then it gives the following return code 141.

But if the same job is running for short durations then it does not produce the error.

We found a macro in file Sqlext.h
(found under /install/branded_odbc/include in the unix box) .This macro is defined as follows:
#define SQL_DROP_TABLE 141.

Is there any relation between this and the return code which we are getting from the job.

Could you pl advice on this.
Thanks
-----------------------------------------------------------------------------------
We are calling the dsjob utility through unix to call the job.After calling the job we check the "$?" ie the status being returned from the job. When we print this value we get "141".
Now we are not clear on this value being returned.
ogmios
Participant
Posts: 659
Joined: Tue Mar 11, 2003 3:40 pm

Re: Error in executing Datastage job

Post by ogmios »

Can you first tell us what the last error messages are in the job that failed while executing (from DataStage Director), this may shed some light on your problem

Then use dsjob with option "-jobinfo" on the job and post this as well.

I've seen exit code 141 before, but it's not one of the "known" return codes and I only got it 1 or 2 times and never consistently.

Ogmios
In theory there's no difference between theory and practice. In practice there is.
srini_ramesh
Participant
Posts: 13
Joined: Fri Oct 08, 2004 6:19 am

Post by srini_ramesh »

Thanks for your response . We are calling the job like as follows.:

/var/opt/ascential/install/uv/unix/bin/dsjob -run -wait -warn 800 <Project Name> <Job Name>

ret_cd="$?"
echo "Job Return Code: $ret_cd"
/var/opt/ascential/install/uv/unix/bin/dsjob -jobinfo <Project Name> <Job Name>


This is the value of return code that I have got.
Job Return Code: 141

This is the job info:
Job Status : RUN OK (1)
Job Controller : not available
Job Start Time : Wed Dec 22 00:17:14 2004
Job Wave Number : 3
User Status : not available
Job Control : 0
Interim Status : NOT RUNNING (99)
Invocation ID : not available
Last Run Time : Wed Dec 22 01:39:52 2004
Job Process ID : 0
Invocation List : OG40OgHdr001

Also I get 141 for all those jobs which are running for long time ( say more than 1 hour ).

Thanks
ogmios
Participant
Posts: 659
Joined: Tue Mar 11, 2003 3:40 pm

Post by ogmios »

Is it possible you get timeouts because of the timeout defined in DataStage Administrator. What's your value set to?

Most of the times mine are set to 24 hours, this timeout is supposed to be for clients but dsjob may be considered a client too. Chaning it will require a DataStage bounce.

Ogmios
In theory there's no difference between theory and practice. In practice there is.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

ogmios wrote:this timeout is supposed to be for clients but dsjob may be considered a client too.
Yes! This setting affects both the dsjob -wait command and the DSWaitForJob function.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

In earlier releases, $? returned the exit status of dsjob, not necessarily of the DataStage job itself. In recent releases (7.1 and later?) this behaviour was changed. For a couple of interim releases, it was necessary to specify -jobstatus rather than -wait to have the exit status report the final status of the job.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply