Record Counts from 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
nishtala
Participant
Posts: 19
Joined: Thu Oct 25, 2007 10:51 am

Record Counts from Data Set

Post by nishtala »

Hi

We need to read a dataset and get the number of records in it and write it into a file

Is there function or system routine or some command which will help me achieve this.

Thanks in advance
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Search is your friend!

viewtopic.php?t=119576
-craig

"You can never have too many knives" -- Logan Nine Fingers
nishtala
Participant
Posts: 19
Joined: Thu Oct 25, 2007 10:51 am

Post by nishtala »

Hi

Is this "orchadmin describe -d -l <your dataset file> " is what I use in a transformer ?

We want to have this is some job like we will pass a list of datastets to it and we need to put dataset name and the record count in each into a file with two columns FileName and RecordCount.

from the link you gave looks like orchadmin describe -d -l <your dataset file> works but please advise me how to use it.

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

Post by chulett »

That is an operating system command.
-craig

"You can never have too many knives" -- Logan Nine Fingers
AmeyJoshi14
Participant
Posts: 334
Joined: Fri Dec 01, 2006 5:17 am
Location: Texas

Post by AmeyJoshi14 »

Hi,
You can use shell Script.... :)
In that you can make use of "dsrecords" commmand to get the record count of Datasets.. :wink:
dsrecords -n Datasetname
http://findingjobsindatastage.blogspot.com/
Theory is when you know all and nothing works. Practice is when all works and nobody knows why. In this case we have put together theory and practice: nothing works. and nobody knows why! (Albert Einstein)
nishtala
Participant
Posts: 19
Joined: Thu Oct 25, 2007 10:51 am

Post by nishtala »

DSrecords command works

Thanks
Post Reply