Page 1 of 1

Count command

Posted: Tue Sep 21, 2004 4:02 am
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.

Posted: Tue Sep 21, 2004 6:48 am
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.

Posted: Tue Sep 21, 2004 8:14 am
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.

Re: Count command

Posted: Tue Sep 21, 2004 4:00 pm
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).