regarding 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
avi21st
Charter Member
Charter Member
Posts: 135
Joined: Thu May 26, 2005 10:21 am
Location: USA

regarding batch file

Post by avi21st »

hi gurus,
i want to run a batch file for searching datastage shell and append the path to system path variables.

i never run a batch file.how does a batch file look like. from where we can run a batch file.how can i run a batch file which searches for datastage shell and append path to system path variables.

plz assist me.

cheers;
abhi
Avishek Mukherjee
Data Integration Architect
Chicago, IL, USA.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Not sure what you mean by a batch file. Do you mean a DataStage batch (created in Director) or a BAT file (created in Windows/DOS)?

What, after that, do you mean by a "DataStage shell"? Why do you need to search for it? It's in the DataStage engine directory's bin sub-directory.

Can you please suggest what it is you are trying to achieve, and why? It seems like a very unusual request.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Wow. Thats a first one. May i ask why do you want to automate such a thing? Just out of curiosity.
You can write a dos batch. Google for sample dos batchs to get an idea of how its written. You execute them through command line. Within datastage, you would use DSExecute() routine to fire off a dos batch. You can do that in before/after job subroutines (ExecDos i think) and in a sequence job you use Execute Command Activity stage. Did i leave any thing guys :roll: ?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
avi21st
Charter Member
Charter Member
Posts: 135
Joined: Thu May 26, 2005 10:21 am
Location: USA

Post by avi21st »

Hi Gurus,
can anyone send me a batch file for searching datastage shell and append the path to system paths variable.

my company also implements java technology, so they want to create a batch file and run, i dont know what the java people need this for.

plz assist me in creating a batch file.

cheers;
abhi
Avishek Mukherjee
Data Integration Architect
Chicago, IL, USA.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Give us an example. What path do you want to add to which system variable. IF you talking about datastage variables then in windows environment everything is controlled by registers as far as i know.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
avi21st
Charter Member
Charter Member
Posts: 135
Joined: Thu May 26, 2005 10:21 am
Location: USA

Post by avi21st »

Hi,
sorry the information which i gave was in sufficient, i want a batch file created in windows.


actually i can go for either option even can go for a batch file created in director.but how can i create that seraches for datastage shell and append the path to sytems path variable.

cheers;
abhi
Avishek Mukherjee
Data Integration Architect
Chicago, IL, USA.
avi21st
Charter Member
Charter Member
Posts: 135
Joined: Thu May 26, 2005 10:21 am
Location: USA

Post by avi21st »

Hi,
Thanks very much,my team has created 3 batch files.
when i see the type it shows windows.
can anyone plz specify command for running these batch files from datastage administrator.
Actually i read a forum that dsexecute() is usedto run these batch files.

my batch file is prjbatch.bat
its on desktop.
how can i use commandline interfaces to call this batch file and run from the datastage administrator.
can anyone help me plz in syntax of command.

cheers;
abhi
Avishek Mukherjee
Data Integration Architect
Chicago, IL, USA.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

From the DataStage Administrator client Command window it's

Code: Select all

DOS /C pathname 
where pathname is the pathname of the BAT file.

Still don't understand what you're trying to accomplish.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
avi21st
Charter Member
Charter Member
Posts: 135
Joined: Thu May 26, 2005 10:21 am
Location: USA

Post by avi21st »

Hi,
i have given command DOS/C C:\DOCUMENTS AND SETTINGS\ADMINISTRATOR\DESKTOP.

i didn't specify the name of the batch file.i have given path. but i have 3 batch files on desktop.
when i specify the above command iam getting error.
DOS/C IS NOT IN VOC.
plz help me in syntax of command.

cheers;
abhi
Avishek Mukherjee
Data Integration Architect
Chicago, IL, USA.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Correct. It isn't in VOC. Your copying skills aren't very good. DOS is a command, /C is a switch for that command.

But, even then, Desktop is not a "command". Nor is it a "batch file". So that won't work. You need the full pathname of the BAT file.

What are you trying to accomplish? If you cannot provide a coherent answer to that question I strongly suggest that you stop using the tool, go away and develop a specification (in English) for what you need to accomplish, and get that specification reviewed and approved. Only then should you pick up the tool again.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Start ---> Run ---->type cmd and hit enter ---> go to this desktop "C:\DOCUMENTS AND SETTINGS\ADMINISTRATOR\DESKTOP" and there type prjbatch.bat
There you go, thats how you execute a .bat job.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Or just double-click on it. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply