Test for empty hashed file
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 26
- Joined: Tue May 24, 2005 6:20 am
- Location: Tallahassee
Test for empty hashed file
Within my server job, I would like to perform certain logic if a hashed file is empty. What is the best way for me to test this condition?
Byron
As long as the hash file is in an 'Account' or you've established your own VOC record for it. For an unadulterated Pathed Hash you can't count it like that.
I'd be curious to learn what the 'certain logic' is you'd need to do if the hash file is empty. I've never had a need to worry about this in all of my dealings with this tool and wonder if there might be a different (or simpler) approach that could be taken?
I'd be curious to learn what the 'certain logic' is you'd need to do if the hash file is empty. I've never had a need to worry about this in all of my dealings with this tool and wonder if there might be a different (or simpler) approach that could be taken?
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You can create a routine to perform either of the commands Kim suggested, and use the routine's return value to drive - perhaps - a nested condition activity in a job sequence. It really is difficult to answer such a vague specification.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Premium Member
- Posts: 26
- Joined: Tue May 24, 2005 6:20 am
- Location: Tallahassee
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Put a UV stage on the end of a stream input link. The link has one column, an integer. Derive the column as COUNT(*) (or COUNT(@ID)) and specify the hashed file name as the table name.
In the Transformer stage fed by this stream input link, detect whether the value of this column is 0 (in an output link constraint expression); if it is, generate the current date in your desired format, et voila!
In the Transformer stage fed by this stream input link, detect whether the value of this column is 0 (in an output link constraint expression); if it is, generate the current date in your desired format, et voila!
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.