data set

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
phanikumar
Participant
Posts: 60
Joined: Tue Sep 20, 2011 10:44 pm
Location: INDIA

data set

Post by phanikumar »

I have a dataset which has some 400,00 records in it,for my testing purpose i need to create a copy of the data set with a sample of first 200 records from the data set. Can somebody let me know how to do this.

Regards

Kumar
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Re: data set

Post by SURA »

I am not sure how much it is possible to fetch part of the records using command line and created it as .ds file. The simple option is use that .ds as a source and in the TFM make it run in Sequence use @OUTROWNUM = 200. So that you can get 200 records which can again write into a .ds file.

DS User
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

<moved here from the TX forum>
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Re: data set

Post by ray.wurlod »

SURA wrote:...write into a .ds file.
Please be aware that data are never written into the .ds file itself. This file is a descriptor that stores the locations of the segment files in which the data are actually stored. There is one segment file per resource disk directory per node, provided that there are sufficient records to make the full distribution worth while.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Re: data set

Post by SURA »

Ray,I mean to used a dataset file stage to write it.

One more question; can't we hack it to read the part of the records?

Don't as why?

DS User
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Do you speak binary? Storage in Data Sets uses DataStage internal format where, among other things, all numeric data are stored in binary format. A Data Set is not intended to be a database (otherwise they would have called it that). A Data Set stores a set of data: a whole set of data.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Post by SURA »

In the Data Set Management, output can see some ORCHESTRATE codes, node details etc. I thought of to hack and use that is the aim of my question.

DS User
Post Reply