Dataset Data Removal

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
akarsh
Participant
Posts: 51
Joined: Fri May 09, 2008 4:03 am
Location: Pune

Dataset Data Removal

Post 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?
Thanks,
Akarsh Kapoor
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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>"
akarsh
Participant
Posts: 51
Joined: Fri May 09, 2008 4:03 am
Location: Pune

Post 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?
Thanks,
Akarsh Kapoor
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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.
akarsh
Participant
Posts: 51
Joined: Fri May 09, 2008 4:03 am
Location: Pune

Post 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?
Thanks,
Akarsh Kapoor
akarsh
Participant
Posts: 51
Joined: Fri May 09, 2008 4:03 am
Location: Pune

Post 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?
Thanks,
Akarsh Kapoor
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

No, that command will truncate ALL files ending in ".ds" in the current attach point directory
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ntr
Participant
Posts: 110
Joined: Fri Dec 18, 2009 10:30 am
Location: pune

Post by ntr »

can we truncate or delete dataset in windows environment without using job?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Yes, of course, that's what the orchadmin utility is for. Windows or UNIX.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ntr
Participant
Posts: 110
Joined: Fri Dec 18, 2009 10:30 am
Location: pune

Post by ntr »

Thanks craig

where do we have to pass orchadmin in windows environment?
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

The call is the same on UNIX or Windows. The path to the executable is "{DataStage Installation}\IBM\InformationServer\Server\PXEngine\bin"
ntr
Participant
Posts: 110
Joined: Fri Dec 18, 2009 10:30 am
Location: pune

Post by ntr »

Thank you somuch ArndW i got it
Post Reply