BATCH file to 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
Minhajuddin
Participant
Posts: 467
Joined: Tue Mar 20, 2007 6:36 am
Location: Chennai
Contact:

BATCH file to delete DATASETS

Post by Minhajuddin »

Hi,

We delete flat files by just creating a BAT file which is called from the Execute Command Activity in the Sequence to do the cleanup. These days we are using Datasets, And since Datasets have descriptors and data files............. We can't just delete them from the target directory............

Is there a BATCH program through which we can delete the datasets......


Thank you.
Minhajuddin

<a href="http://feeds.feedburner.com/~r/MyExperi ... ~6/2"><img src="http://feeds.feedburner.com/MyExperienc ... lrow.3.gif" alt="My experiences with this DLROW" border="0"></a>
lstsaur
Participant
Posts: 1139
Joined: Thu Oct 21, 2004 9:59 pm

Post by lstsaur »

You can use orchadmin delete command in your .bat file. For data sets, it
removes the descriptor file and all associated data files.
videsh77
Premium Member
Premium Member
Posts: 97
Joined: Thu Dec 02, 2004 10:43 am
Contact:

Post by videsh77 »

cd $DSHOME/bin
orchadmin delete datasetname
Thanks with regards,
videsh.
Minhajuddin
Participant
Posts: 467
Joined: Tue Mar 20, 2007 6:36 am
Location: Chennai
Contact:

Post by Minhajuddin »

Thanks for the replies :)

My OS is a Windows Server 2003.

Do these BATCH files run on it?
Minhajuddin

<a href="http://feeds.feedburner.com/~r/MyExperi ... ~6/2"><img src="http://feeds.feedburner.com/MyExperienc ... lrow.3.gif" alt="My experiences with this DLROW" border="0"></a>
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

There is no ready-made BATch file to do this, the posters have just supplied the raw command that will clean up a dataset and you will have to write an appropriate file.

If you have orphaned datasets, i.e. where someone has deleted the descriptor file without using orchadmin rm, you can look at this post that illustrates how to go about finding and removing orphaned datasets. Perhaps that can aid you in writing your own; the 'magic' command is part of the MKS toolkit or other similar tools that give you UNIX commands on Windows.
G SHIVARANJANI
Participant
Posts: 137
Joined: Sun Jan 07, 2007 11:17 pm
Location: VISAKHAPATNAM

Re: BATCH file to delete DATASETS

Post by G SHIVARANJANI »

Hi,

could u please tell me how to use the dataset file....

is that used the same way as a sequential file....in parallel datastage..




thanku..
Shivaranjani
kumar_j
Participant
Posts: 45
Joined: Mon Nov 28, 2005 2:43 am

Re: BATCH file to delete DATASETS

Post by kumar_j »

But u need to save the dataset file name with .ds ext.

It has the control file inside it
G SHIVARANJANI wrote:Hi,

could u please tell me how to use the dataset file....

is that used the same way as a sequential file....in parallel datastage..




thanku..
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

DataSet files do not need to be named with a ".ds" extension, they can have any name.
DataStage PX uses DataSets as faster, more efficient storage than sequential files.
Post Reply