dsjob command getting hanged when -jobstatus option is used.

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
saiwelcomes
Participant
Posts: 22
Joined: Thu Apr 19, 2012 3:31 am
Location: India

dsjob command getting hanged when -jobstatus option is used.

Post by saiwelcomes »

Hi,

I have used dsjob command to trigger the job in my server routine.

First of all I am checking the whether the job is in compiled/finished/aborted status using dsjob -jobstatus command.

If the job is in aborted state, i am going to reset the job.

But my problem is the dsjob -jobstatus which i have used to get the status of the job is not returning me the result for long time more than 30mins and getting hanged.

Especially when i use the dsjob command with -file switch, it is hanging. I have stored the datastage credentials in a file and given the path to it.

What could be the issue. I need a very urgent help on this.

Thanks in advance.
Regards,
Sai Krishna
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Re: dsjob command getting hanged when -jobstatus option is u

Post by chulett »

saiwelcomes wrote:I have used dsjob command to trigger the job in my server routine.

First of all I am checking the whether the job is in compiled/finished/aborted status using dsjob -jobstatus command.
That option is actually used to run a job and then wait until it is complete before passing back the status of the job. You need to be using "-jobinfo" instead and then grep'ing through the results to determine what happened the last time the job was run.
-craig

"You can never have too many knives" -- Logan Nine Fingers
saiwelcomes
Participant
Posts: 22
Joined: Thu Apr 19, 2012 3:31 am
Location: India

Post by saiwelcomes »

Yes. I am sorry. I am using -jobinfo to get the status of the job. dsjob command is not resulting any status and getting hanged.
Regards,
Sai Krishna
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Sorry, never seen an issue where a simple "-jobinfo" request would hang. Are you saying it always hangs for all jobs or you only have this problem with one particular job?
-craig

"You can never have too many knives" -- Logan Nine Fingers
PaulVL
Premium Member
Premium Member
Posts: 1315
Joined: Fri Dec 17, 2010 4:36 pm

Post by PaulVL »

Add more debugging statements to your routine.

Echo the command you are trying to submit (as built up by your routine). Then simulate that command on the command line with the same credentials you are using to execute the routine. remember that your routine will execute in your project directory.
saiwelcomes
Participant
Posts: 22
Joined: Thu Apr 19, 2012 3:31 am
Location: India

Post by saiwelcomes »

Yes. I have placed many DSLogInfo command after each step in my routine.

This problem is occurring when -file switch is used to retrive the domain, server, user, password from a file.

Any help plz..
Regards,
Sai Krishna
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Show us the actual syntax that you are using. Your routine code might also be useful.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
saiwelcomes
Participant
Posts: 22
Joined: Thu Apr 19, 2012 3:31 am
Location: India

Post by saiwelcomes »

Hi ray,

This is the code snippet used to get the jobinfo in my routine.

cmd$DSENV = "cd '":p_DSHOME_DIR:"'":char(10) ;
cmd$DSENV := ". ./dsenv":char(10) ;
reconJob$Status = cmd$DSENV
reconJob$Status := "dsjob -file '":EV_SCRIPTS_DIR:"'/'":DS_ENV_INFO_FILE:"' '":DS_DOMAIN:"' '":DS_SERVER:"' -jobinfo '":DS_PROJECT_NAME:"' '":JobName:"'"
Call DSExecute("UNIX", reconJob$Status,OsOutput$Status, OsStatus$Status)


DS_ENV_INFO_FILE param is file with .sh extension having domain,server,user,password information.
Regards,
Sai Krishna
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Can you capture the value of reconJob$Status before the call to DSExecute()? I'm not of a mind to try to balance your quote characters by eye.
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