Page 1 of 1

BATCH file to delete DATASETS

Posted: Sun Jul 08, 2007 2:41 pm
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.

Posted: Sun Jul 08, 2007 3:11 pm
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.

Posted: Sun Jul 08, 2007 3:24 pm
by videsh77
cd $DSHOME/bin
orchadmin delete datasetname

Posted: Mon Jul 09, 2007 12:51 pm
by Minhajuddin
Thanks for the replies :)

My OS is a Windows Server 2003.

Do these BATCH files run on it?

Posted: Mon Jul 09, 2007 3:45 pm
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.

Re: BATCH file to delete DATASETS

Posted: Tue Jul 10, 2007 4:51 am
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..

Re: BATCH file to delete DATASETS

Posted: Tue Jul 10, 2007 5:11 am
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..

Posted: Tue Jul 10, 2007 5:30 am
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.