Page 1 of 1

Posted: Fri Jul 19, 2002 1:20 pm
by chulett
Well, from what I recall - from the Administrator you can connect to the project and then execute a "SELECT COUNT(*) FROM HASH_FILE_NAME" query. You can do the same thing inside a job, but I think you have to do it via a Universe stage.

-craig

Posted: Wed Jul 24, 2002 8:59 am
by nigel
You could also log into DS administrator and at the command area issue the following command: "COUNT hashfilename".
This is using the native DS/UniVerse retrieve commands

Regards

Nigel

Nigel

Posted: Mon Jul 29, 2002 11:18 am
by DSGuru
I believe these count methods just work for INTERNAL hash file and NOT EXTERNAL hash file. So how do we count EXTERNAL hash file?

Thanks for your time in advance.


Leon

Posted: Mon Jul 29, 2002 2:18 pm
by cmueller
The normal command for accessing hashed files require that they have a pointer in the project VOC file. Below, is a routine that takes the path of the hashed file as argument, then creates a temporary entry in the VOC, counts the hashed file and then deletes the pointer. I tried using the openpath statement in DataStage basic but there was not way to get the count unless I looped through all the records. -Hope this helps.

* OPEN PROJECT VOC AND WRITE A POINTER TO THE HASHED FILE 01:F 02:HASHED FILE PATH 03:D_VOC
OPEN "VOC" TO FV THEN
VOC_POINTER = "TMPPOINTER":DATE()
VOC_ENTRY = "F":@FM:Arg1:@FM:"D_VOC"
WRITE VOC_ENTRY ON FV,VOC_POINTER THEN
EXECUTE "COUNT ":VOC_POINTER RETURNING Ans
DELETE FV,VOC_POINTER
CLOSE FV
END ELSE
* COULD NOT WRITE TO VOC
Ans ="Cannot write to VOC"
END
END ELSE
* COULD NOT OPEN VOC
Ans = "Cannot open VOC"
END