How to Clear a Hashed File Outside of Datastage Job?
Moderators: chulett, rschirm, roy
That's not the problem. It's already been established that either of those commands work for hash files created in an account, i.e. in a project. The question of the day is how to do the same thing for explicitly pathed hash files, those created outside of the project. That would mean ones without a VOC record and (hopefully) without the need to create a VOC record on the fly.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Premium Member
- Posts: 385
- Joined: Wed Jun 16, 2004 12:43 pm
- Location: Virginia, USA
- Contact:
Just a reminder, if you do need to create a VOC entry, you can use my routine CreateVocPtr on the tools page of www.anotheritco.com.
Chuck Smith
www.anotheritco.com
www.anotheritco.com
-
- Participant
- Posts: 74
- Joined: Tue Sep 30, 2003 4:25 am
- Location: Malaysia
Hi there,
Before run a job, how can a hashed file be cleared which is created in a previous run? If it is not cleared, the looking up from the hashed file will be wrong.
Thanks,
Can you please explain further on these senarios? It worries me now..It's too late to do so because the lookup looks the hashed file first and finds an entry. But that's not right. At the beginning, the hashed file should be empty in order to guarantee the correct result.
I have a lot of jobs which writes and lookup the the same hash file within the same job. As long as the the option to 'Clear File Before Writing' is checked or the 'Create File' option is checked, I do not see such problems discussed above is prevalent.
If you use the "Clear Hash File" check box in a job design, the hash file will be cleared when the input link starts up. Therefore, if you have a reference to that same hash file in a previous transformer stage, the hash file WILL be cleared before the first row is processed.
Kenneth Bland
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
I wasn't going to say anything. Didn't figure *I* should be one to comment about sigs.
To Ken's point, yes - but the job will fail the first time it runs unless you remember do some manual intervention. That is, if the lookup comes first and the write to the hash comes second, then the lookup will fail. Even a Validate won't create the hash for you. That's why I tend to use the 'transfomer trick' so I don't have to remember to futz with it after promotion.
Besides, at this point I think we've morphed beyond a specific example of a job to more of an exercise to make this O/S level clear.file command to work on pathed hash files.
To Ken's point, yes - but the job will fail the first time it runs unless you remember do some manual intervention. That is, if the lookup comes first and the write to the hash comes second, then the lookup will fail. Even a Validate won't create the hash for you. That's why I tend to use the 'transfomer trick' so I don't have to remember to futz with it after promotion.
Besides, at this point I think we've morphed beyond a specific example of a job to more of an exercise to make this O/S level clear.file command to work on pathed hash files.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers