Executing multiple commands from a 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
via
Premium Member
Premium Member
Posts: 118
Joined: Fri Sep 23, 2005 3:10 pm

Executing multiple commands from a file

Post by via »

Hi,
I want to use copy and remove commands both in a single execute command activity in a job sequence.
The copy command is
cp C:\createfile.txt C:\create, AND the remove command is
rm C:\deletefile.txt

I typed both commands by placing a comma between two commands in the execute command activity.Its not getting executed.

I tried to keep both commands in seperate file and mentioned that file in the execute command activity.Its not getting executed.I tried with file extensions .txt, .bat, .exe.
Any ideas? I am new to Sequences..
Thanks..
Via
-------------------------------------
Learn all the way, as you Grow each Second
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Search reveal this,
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
via
Premium Member
Premium Member
Posts: 118
Joined: Fri Sep 23, 2005 3:10 pm

Post by via »

Thank you Brian..
Via
-------------------------------------
Learn all the way, as you Grow each Second
info_ds
Charter Member
Charter Member
Posts: 88
Joined: Thu Feb 10, 2005 4:36 am
Location: B\'lore

Post by info_ds »

Code: Select all

Thank you Brian.. 
DsGuru2B, I didnt know that your name was Brian :twisted:
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Re: Executing multiple commands from a file

Post by chulett »

via wrote:I tried to keep both commands in seperate file and mentioned that file in the execute command activity.Its not getting executed.I tried with file extensions .txt, .bat, .exe.
The .bat extension should have worked. What happened when you tried that? :?

ps. You really don't want to be using the root of your C: drive for file storage.
-craig

"You can never have too many knives" -- Logan Nine Fingers
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

info_ds wrote: DsGuru2B, I didnt know that your name was Brian :twisted:
Yea, I didnt know either. :wink:
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

If that helped to solve your problem, you can mark the topic as resolved and leave few words on how you solved it. Becasue sometime your post will be linked by some one else.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
via
Premium Member
Premium Member
Posts: 118
Joined: Fri Sep 23, 2005 3:10 pm

Post by via »

Thanks for all the replies.I tried with pipe delimited between two commands and it worked.

Thanks
Via
-------------------------------------
Learn all the way, as you Grow each Second
Post Reply