Error running a batch file

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
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

PATH issue, as in the directory where dsjob lives is not in your production PATH environment variable.
-craig

"You can never have too many knives" -- Logan Nine Fingers
shyamrai
Premium Member
Premium Member
Posts: 18
Joined: Tue May 22, 2007 12:41 pm

Post by shyamrai »

chulett wrote:PATH issue, as in the directory where dsjob lives is not in your production PATH environment variable.
I have found dsjob.exe in the path D:\Program Files\Ascential\DataStage7.5 in Production.

I also found it present in the test.

Can I know what should I be checking other than this.

Thanks
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You need to check that the DataStage bin directory's pathname is one of those in your command search list - that is, your PATH environment variable.
Temporarily you can include it.

Code: Select all

PATH=%PATH%;"D:\Program Files\Ascential\DataStage7.5\bin"
Ultimately you want to make the inclusion more permanent, either through Control Panel or through your login script.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
shyamrai
Premium Member
Premium Member
Posts: 18
Joined: Tue May 22, 2007 12:41 pm

Post by shyamrai »

I was able to define the path which was not present

Check for the Path in command prompt. If you donot find the path where dsjob.exe is present, goto My Computer ->Properties, Advanced Tab -> Environment Variables, look for PATH under Variable and add the path=D:\Program Files\Ascential\DataStage7.5 under value.
shyamrai
Premium Member
Premium Member
Posts: 18
Joined: Tue May 22, 2007 12:41 pm

Post by shyamrai »

But still I am getting the same error when I am scheduling it through TWS. But when I am directly executing the batch file, it is running the datastage job.
May I know how is it possible to make it permanent through Control Panel or login script.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Control Panel, System applet, Environment command button
PATH (maybe Path) is a System variable.

Select it and edit it to include the pathname of the DataStage Engine bin directory (and of the PXEngine bin directory if you have Enterprise edition).

Tip: copy the value of PATH out of the Variable value field into, say, Notepad, edit it there, then use copy/paste to put the new value into the Variable value field after visually checking your edit.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
shyamrai
Premium Member
Premium Member
Posts: 18
Joined: Tue May 22, 2007 12:41 pm

Post by shyamrai »

[quote="ray.wurlod"]Control Panel, System applet, Environment command button
PATH (maybe Path) is a System variable.

Select it and edit it to include the pathname of the DataStage Engine [b]bin [/b]directory (and of the PXEngine [i]bin [/i]directory if you have Enterprise edition).

Tip: copy the value of PATH out of the Variable value field into, say, Notepad, edit it there, then use copy/paste to put the new value into the Variable value field after visually checking your edit.[/quote]

I have already added the pathname in PATH. But when I am running the TWS job, I am still getting the same error as I was getting before. Do I need to restart the server for this to work.

When I checked in the command prompt %path%, it gave a return as "''D:Ascential\DataStage\Engine\bin' is not recognized as aninternal or external command, operable program or batch file"
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

shyamrai wrote:...it gave a return as "''D:Ascential\DataStage\Engine\bin'...
You are missing a "" in the 3rd position
Last edited by ArndW on Thu Jun 28, 2007 7:05 pm, edited 1 time in total.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You are also missing a command. The bin folder contains the executables; it isn't one itself.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
shyamrai
Premium Member
Premium Member
Posts: 18
Joined: Tue May 22, 2007 12:41 pm

Post by shyamrai »

[quote="ArndW"][quote="shyamrai]...it gave a return as "''D:Ascential\DataStage\Engine\bin'...[/quote]
You are missing a "" in the 3rd position[/quote]

I am sorry, it was actually set as 'D:\Ascential\DataStage\Engine\bin
shyamrai
Premium Member
Premium Member
Posts: 18
Joined: Tue May 22, 2007 12:41 pm

Post by shyamrai »

[quote="ray.wurlod"]You are also missing a command. The [i]bin [/i]folder contains the executables; it isn't one itself.[/quote]

Can I know what might be the command I am missing
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

:? Please explain exactly what "When I checked in the command prompt %path%, it gave a return as" means. What you've shown is correct for a PATH statement as it is a collection of directories to search inside in the order listed for executables in the absence of an absolute path. It's nothing you can execute directly, which is what it appears you must have done to generate that error.

To answer the question as asked, you are 'missing' any valid command that lives in the mentioned 'bin' directory.

Isn't there someone on-site there with you that is a little more 'DOS savvy' and whom could help you with this?
-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 »

The missing command is dsjob, based on your earlier posts.
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