Routine for deleting Dataset

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
srini.dw
Premium Member
Premium Member
Posts: 186
Joined: Fri Aug 18, 2006 1:59 am
Location: Chennai

Routine for deleting Dataset

Post by srini.dw »

Hi guys,

I need to write a PX routine for deleting a dataset, I know command to delete dataset .,e Orchadmin delete.

But can you please guide me to write a routine for deleting a datasets.

Thank you,
richdhan
Premium Member
Premium Member
Posts: 364
Joined: Thu Feb 12, 2004 12:24 am

Post by richdhan »

Hi,

Use the CommandExecution or Routine Activity in the sequencer to delete the dataset.

HTH
--Rich
srini.dw
Premium Member
Premium Member
Posts: 186
Joined: Fri Aug 18, 2006 1:59 am
Location: Chennai

Post by srini.dw »

Thanks for the response,

but I need to write a PX routine to delete a dataset.

Thank You,
richdhan
Premium Member
Premium Member
Posts: 364
Joined: Thu Feb 12, 2004 12:24 am

Post by richdhan »

Hi Srini,

There are 2 ways of deleting the dataset. The dataset management utility and the other is the orchadmin. Since orchadmin is a command line utility all you need is a shell script. It does not require a PX routine.

HTH
--Rich
srini.dw
Premium Member
Premium Member
Posts: 186
Joined: Fri Aug 18, 2006 1:59 am
Location: Chennai

Post by srini.dw »

Hi,
Thank you for response,

Since we do not have Unix in Windows 8.1 Server, we cannot run a shell script.
What we need is from Perl script how to run Orchadmin command.?

Any suggestion will be great.

Thank you,
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

I think you can. You have MKS Toolkit installed which comes with the product. You can run shell's with it.
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 put the commands in a ".bat" or "batch" file, the Windows equivalent of a shell script.
-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 »

srini.dw wrote:Thanks for the response,

but I need to write a PX routine to delete a dataset.

Thank You,
No you don't.
If you must have a routine, it must ultimately invoke orchadmin command.
There is no other safe way to delete a Data Set.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
srini.dw
Premium Member
Premium Member
Posts: 186
Joined: Fri Aug 18, 2006 1:59 am
Location: Chennai

Post by srini.dw »

Guys, thanks for the response

1. Since i cannot tell me client to install MKS Toolkit , we cannot use Shell script.
2. Our server is in Windows, for deleting a dataset should i use Server routine or Parallel routine. Both will work ?
3. We have Perl script in our server, iam thinking of running a Perl script with Orchadmin command, please let me know will this work.
4. Any other options do i have.

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

Post by ray.wurlod »

The client has MKS Toolkit. It installs with Enterprise Edition on Windows.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Why the heck would you need a Perl script to run an orchadmin command? Just... run it, in a perfectly normal script or batch file.
-craig

"You can never have too many knives" -- Logan Nine Fingers
srini.dw
Premium Member
Premium Member
Posts: 186
Joined: Fri Aug 18, 2006 1:59 am
Location: Chennai

Post by srini.dw »

Thanks for response,

My design.

Job Activity --> Execute Command Activity

In Execute Command Activity in command option i gave orchadmin delete and in parameters i passed the path.

Iam getting the below error.

Delete_Seq..JobControl (@DEL_DS): Executed: orchadmin delete C:/Temp/t_1234_2009-02-10_99_extr.ds
Reply=1
Output from command ====>
'orchadmin' is not recognized as an internal or external command,
operable program or batch file.

Please let me know any other solution.

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

Post by ray.wurlod »

Learn about PATH.
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