Page 1 of 2

Running datastage job through Unix shell script

Posted: Tue Feb 09, 2010 2:52 am
by sourabhverma
Hi All,

I am trying to trigger the datastage jobs through unix shell script & untill yesterday all the jobs were running fine but today when i tried to execute the same job through same shell script i am getting error.

This is the error messge i am receiving after executing the script:

Status code = -99 DSJE_REPERROR
The job sqRunMainFlow is completed with status : 255


Any help is appreciated.

Posted: Tue Feb 09, 2010 3:02 am
by ArndW
If you look at your director log for job "sqRunMainFlow" what does it show? What have you changed since yesterday? Also, what is the dsjob -run command you are using?

Posted: Tue Feb 09, 2010 3:03 am
by sourabhverma
I would like to make one more point here that when i try to run the same job through datastage client, it is working properly.

Posted: Tue Feb 09, 2010 3:09 am
by sourabhverma
Hi ArndW,

Thanks for the reply.

In the morning when i reset the job this is what the log is saying:

From previous run
DataStage Job 95 Phantom 8630
DataStage Phantom Finished.

Also, This is the command i am using for running the job:
${DSHOME}/bin/dsjob -run -wait -jobstatus -param pEmailLst=${EmailLst} -param pCountryCode=${Cntry} ${DS_PROJ_ODS} sqRunMainFlow

Posted: Tue Feb 09, 2010 3:17 am
by ray.wurlod
Arnd asked you to tell us what is in the job log when you run the job from the dsjob command. You have not yet done so.

Posted: Tue Feb 09, 2010 3:23 am
by gssr
sourabhverma wrote:I would like to make one more point here that when i try to run the same job through datastage client, it is working properly.
As you can run the job from the Client, the Problem should be in your Unix Shell Script that you used to call the DS Job.
Check the error message in your Script!!!

Posted: Tue Feb 09, 2010 3:25 am
by sourabhverma
I have not made any changes in the script as well as in the datastage job. when i run the job thru script, nothing is available in the director because the script not at all triggeres the job.

These are the logs of the yesterday`s completed run :

sqRunMainFlow..JobControl (@Coordinator): Summary of sequence run
06:03:03: Sequence started
06:03:03: sqTopLevelBatch (JOB sqTopLevelBatch) started
06:36:55: sqTopLevelBatch (JOB sqTopLevelBatch) finished, status=2 [Finished with warnings]
06:36:55: sqRunInvoicingSeq (JOB sqRunInvoicingSeq) started
06:36:56: ExecRunServiusageSH (COMMAND sh) started
16:18:19: ExecRunServiusageSH finished, reply=0
16:18:19: sqRunInvoicingSeq (JOB sqRunInvoicingSeq) finished, status=1 [Finished OK]
16:18:19: Sequence finished OK

Posted: Tue Feb 09, 2010 5:02 am
by ray.wurlod
Then please prove to us that the shell variables all have values assigned.

Posted: Tue Feb 09, 2010 10:44 am
by ArndW
06:36:56: ExecRunServiusageSH (COMMAND sh) started
16:18:19: ExecRunServiusageSH finished, reply=0
What does this long-running shell script do? Could it return an error?

Posted: Tue Feb 09, 2010 10:45 am
by sourabhverma
Hi Ray,

I did not make any change into the script & DS job, yesterday it ran fine. I tried to check the variables also but they are pretty much fine, i mean all the variables are acepting values properly but script gives the error while trying to trigger the datastage sequencer job.

Posted: Tue Feb 09, 2010 10:47 am
by sourabhverma
Hi ArndW,

yesterday the job was completed without any issue but today after facing the problem when i resetted the job then only i got these phantom logs.

Posted: Tue Feb 09, 2010 10:57 am
by anbu
Try running dsjob command from command line and check whether it triggers job

Posted: Tue Feb 09, 2010 10:58 am
by anbu
Try running dsjob command from command line and check whether it triggers job

Posted: Tue Feb 09, 2010 10:59 am
by sourabhverma
The long-running shell script inturn calls other datastage jobs lying in other DS project and always returns zero.

Posted: Tue Feb 09, 2010 11:35 am
by anbu
sourabhverma wrote:The long-running shell script inturn calls other datastage jobs lying in other DS project and always returns zero.
Are you able to run job sqRunMainFlow from command line using dsjob?