Record Count of Hashed File

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
joesat
Participant
Posts: 93
Joined: Wed Jun 20, 2007 2:12 am

Record Count of Hashed File

Post by joesat »

Is there any way that we can get the record count of a hashed file?
I do realize that we can write it to a sequential file and then get the count.

When it comes to datasets, we are able to use the orchadmin commands to get the count. Similarly, is there any way to get the record count of a hashed file?

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

Post by chulett »

If the hashed file was created in an account, then "COUNT <Name>" in the Administrator's command window would work. For a pathed hashed file, you'll need to create a VOC entry first, then count.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Vinodanand
Premium Member
Premium Member
Posts: 112
Joined: Mon Jul 11, 2005 7:54 am

Post by Vinodanand »

Just as Chulett said you need to create a VOC entry using the SETFILE command

SETFILE <pathname> <VOC Name> and
then do a COUNT <VOC Name>
joesat
Participant
Posts: 93
Joined: Wed Jun 20, 2007 2:12 am

Post by joesat »

I do not have administrator priviledges :-(...can i still do what you guys have suggested?.. thanks for the replies!
Joel Satire
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

None of that requires administrator privileges, so... yes.
-craig

"You can never have too many knives" -- Logan Nine Fingers
joesat
Participant
Posts: 93
Joined: Wed Jun 20, 2007 2:12 am

Post by joesat »

sorry that I have to reopen this topic, but can someone help me with the technical details related to setting the pathname and VOC name... 'cause I havent had the opportunity to work in DS Administrator before..
Joel Satire
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

In the Administrator client select your project and click the Command button. This opens a dialog in which you can enter "TCL commands" in the project. It's here that you enter the SETFILE command and the COUNT command.

Code: Select all

SETFILE pathname_of_hashed_file name_of_hashed_file
COUNT name_of_hashed_file
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
joesat
Participant
Posts: 93
Joined: Wed Jun 20, 2007 2:12 am

Post by joesat »

your message got cutoff, Ray... i know i have to subscribe, alas my heart is willing but my purse is weak

can you display the post in full please?
Joel Satire
monaz
Participant
Posts: 98
Joined: Sat Aug 23, 2008 3:14 am

Re: Record Count of Hashed File

Post by monaz »

joesat wrote:Is there any way that we can get the record count of a hashed file?
I do realize that we can write it to a sequential file and then get the count.

When it comes to datasets, we are able to use the orchadmin commands to get the count. Similarly, is there any way to get the record count of a hashed file?

Thanks!
You can use a
InputHash----->Transformer------->OutputHashFile
In transformer stage you can use stage vaiable for the count and load back the same data to other hash file.
Else you can use a aggregator stage with a function count instead of stage variable.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

joesat wrote:your message got cutoff, Ray... i know i have to subscribe, alas my heart is willing but my purse is weak

can you display the post in full please?
No.

Premium membership is one of the ways that the hosting and bandwidth costs incurred by DSXchange are met. You will note that there is no advertising. I do not intend to create a precedent whereby the very survival of DSXchange is put at risk.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
joesat
Participant
Posts: 93
Joined: Wed Jun 20, 2007 2:12 am

Post by joesat »

Thanks monaz.. but I want to get the count without creating a new DS job and just by executing some commands or a shell script... this is because we need to get the count of some hashed files every month without using ETL jobs and just Shell scripts...

For the file counts and datasets, we can get the data from links, wc and orchadmin commands.. count of hashed files has been elusive so far... :roll:
Joel Satire
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Not so elusive, what you need has been posted in this thread more than once: SETFILE and COUNT. Search the forums for SETFILE, its syntax and usage *are* out there. For scripting help, search the forums for dssh which is where the commands would be run outside of the Adminstrator GUI.
-craig

"You can never have too many knives" -- Logan Nine Fingers
joesat
Participant
Posts: 93
Joined: Wed Jun 20, 2007 2:12 am

Post by joesat »

Thanks to all you guys... I will mark the topic 'Resolved' as of now, since I have to do research on the provided suggestions. If I come across any other issue or other possible solutions I will update this.
Joel Satire
Post Reply