delete datasets

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
just4u_sharath
Premium Member
Premium Member
Posts: 236
Joined: Sun Apr 01, 2007 7:41 am
Location: Michigan

delete datasets

Post by just4u_sharath »

Can i delete more than 2 or 3 datasets using the execute command activity. i know to delete one dataset by giving "orchadmin rm -f" in command line adn "controlfile.ds" in parameter. but can i delete 2 or 3 datasets in a single execute command
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Only by constructing a multiple command pipeline.

Code: Select all

orchadmin rm
controlfile1.ds ; orchadmin rm controlfile2.ds ; orchadmin rm controlfile3.ds
Alternatively (and better, I believe) construct a shell script containing the required commands and execute that.
You can also include other commands (such as echo) to report the results of the individual commands based on their exit status ($?) and to force the script to return successfully (exit 0).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
stefanfrost1
Premium Member
Premium Member
Posts: 99
Joined: Mon Sep 03, 2007 7:49 am
Location: Stockholm, Sweden

Post by stefanfrost1 »

Maybe I am terrably wrong here but I remember myself doing the same thing just putting the filenames after eachother in one file command....


orchadmin rm -f controlfile1.ds controlfile2.ds controlfile3.ds

Note: in AIX 5.3 Unix that is
-------------------------------------
http://it.toolbox.com/blogs/bi-aj
my blog on delivering business intelligence using agile principles
just4u_sharath
Premium Member
Premium Member
Posts: 236
Joined: Sun Apr 01, 2007 7:41 am
Location: Michigan

delete datasets

Post by just4u_sharath »

I did the same thing using

"orchadmin rm -f controlfile1.ds controlfile2.ds controlfile3.ds" in execute command activity. It is working. Is this wrong approach
command line:orchadmin rm -f
parameters:controlfile1.ds controlfile2.ds controlfile3.ds

Please tell me abt this approach and anyy other better approaches are welcome
abc123
Premium Member
Premium Member
Posts: 605
Joined: Fri Aug 25, 2006 8:24 am

Post by abc123 »

I have been deleting datasets using:

orchadmin delete *.ds

This deletes all datasets in the directory where you are executing the command.
Post Reply