Count command

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
milind
Participant
Posts: 18
Joined: Mon Dec 15, 2003 12:28 am

Count command

Post by milind »

Hi,

Is it possible to COUNT hash file records created not in account but in a specified path?.Does not work for me even if I LOGTO uv.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Yes, it is possible - but you do have to create a VOC record to do so. Search the forum if you need it, the syntax has been posted here many times.

I use a routine I found here that creates the VOC record 'on the fly', does the count on the hash and then removes the VOC record. Simple enough to setup as long as you are careful checking the status of all actions in case you encounter problems.
-craig

"You can never have too many knives" -- Logan Nine Fingers
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

You cannot do a LOGTO because that can break your connection to the project. Do a search on SETFILE, SET-FILE or SET.FILE. You can create VOC pointers with SETFILE. It would be easy to remove tose afterwards. SETFILE will create Q-pointers to hash files in other projects to you can count hem as well. SETFILE has been covered a lot by Ray so do a search.
Mamu Kim
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Re: Count command

Post by ray.wurlod »

milind wrote:Is it possible to COUNT hash file records created not in account but in a specified path?.Does not work for me even if I LOGTO uv.
Create a DataStage job that processes all the keys from the hashed file and record the rows processed.

The statistic can be found by interrogating the job itself (DSGetStageInfo or DSGetLinkInfo) or by interrogating the job log (DSGetNewestLogId and DSGetLogEntry).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply