Page 1 of 1

Dataset Data Removal

Posted: Thu Aug 23, 2012 4:08 am
by akarsh
Hi,

I have some space issue due to which i want to just remove data form a dataset and convert it to ZERO byte DS after loading to a DB table. how we can do this through UNIX/Data stage?

Posted: Thu Aug 23, 2012 4:36 am
by ArndW
One can remove a dataset from the command line with "orchadmin rm <descriptor>" and one can truncate the dataset with "orchadmin truncate <descriptor>"

Posted: Thu Aug 23, 2012 4:43 am
by akarsh
Hi,

I just want to convert it to ZERO byte ds not to remove.So i think if i remove data file , it will work? can i fire rm command to remove datafile?

Posted: Thu Aug 23, 2012 4:56 am
by ray.wurlod
NO, NO and NO.

The .ds file does not contain data, and thus must not be truncated.

Use orchadmin truncate, as Arnd advised, to empty the Data Set of records.

Posted: Thu Aug 23, 2012 5:18 am
by ArndW
You can also write a dummy job which uses a row-generator to generate one row, then a transform or filter to remove that one row and write to your dataset; that will do the same thing as the command-line would, it creates an empty new dataset.

Posted: Thu Aug 23, 2012 5:25 am
by akarsh
Thanks Ray.

So Data set truncatation will just remove Data file and will convert data set to a 0 byte file, keeping descriptor file as it is?

Posted: Thu Aug 23, 2012 5:27 am
by akarsh
ArndW wrote:You can also write a dummy job which uses a row-generator to generate one row, then a transform or filter to remove that one row and write to your dataset; that will do the same thing as the command-line would, it creates an empty new dataset.
even i thought for the same but wanted to know more from UNIX side.

command "orchadmin truncate *.ds" will truncate the dataset?

Posted: Thu Aug 23, 2012 6:33 am
by ArndW
No, that command will truncate ALL files ending in ".ds" in the current attach point directory

Posted: Thu Aug 23, 2012 9:13 pm
by ray.wurlod
A Data Set consists of a single ".ds" file which points to multiple data, or "segment" files. Even when you truncate a Data Set the ".ds" file retains its pointers to the data files; it is these that are emptied.

Posted: Fri Aug 24, 2012 12:04 am
by ntr
can we truncate or delete dataset in windows environment without using job?

Posted: Fri Aug 24, 2012 12:17 am
by chulett
Yes, of course, that's what the orchadmin utility is for. Windows or UNIX.

Posted: Fri Aug 24, 2012 12:40 am
by ntr
Thanks craig

where do we have to pass orchadmin in windows environment?

Posted: Fri Aug 24, 2012 1:00 am
by ArndW
The call is the same on UNIX or Windows. The path to the executable is "{DataStage Installation}\IBM\InformationServer\Server\PXEngine\bin"

Posted: Fri Aug 24, 2012 1:09 am
by ntr
Thank you somuch ArndW i got it