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
Counting records in a hash file
Moderators: chulett, rschirm, roy
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
* 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