I have a process that has multiple inputs from a single transformer into a hash file. I have set the transformer link ordering. On the first input link into the hash file, I have the hash properties checked: Create File & in options, Delete file. The 2nd & 3rd input, nothing is checked.
I am trying to ensure that the hash file will be cleared by the first link and the 2nd & 3rd will append data to the hash file.
Is this the proper way to go about this? Any one know of a better way?
Thanks in advance
Steve
Clearing Hash files
Moderators: chulett, rschirm, roy
It will work fine as you've described, as long as you don't have any IPC stages between the Transformer and hashed files or inter-process buffering turned on.
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
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Re: Clearing Hash files
I think that this is not the way actually the job would work.
Even though link ordering is mentioned in the transformer. Its not like, first all the records of the first link would be loaded into the hash file followed by the second and the third.
Based on the input the loading process would differ.
I think that the link ordering will make sure that the first record from input goes to the first link and then to the next based on link ordering. Similarly the second input would do so in the same manner based on the constraints.
Even though link ordering is mentioned in the transformer. Its not like, first all the records of the first link would be loaded into the hash file followed by the second and the third.
Based on the input the loading process would differ.
I think that the link ordering will make sure that the first record from input goes to the first link and then to the next based on link ordering. Similarly the second input would do so in the same manner based on the constraints.
----------------
Abu
Abu
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
But that wasn't the question.
To be absolutely sure that the hashed file is cleared use a before-stage or before-job subroutine ExecTCL to clear the hashed file. The command is CLEAR.FILE hashedfilename (which requires a VOC entry for hashedfilename).
To be absolutely sure that the hashed file is cleared use a before-stage or before-job subroutine ExecTCL to clear the hashed file. The command is CLEAR.FILE hashedfilename (which requires a VOC entry for hashedfilename).
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.
Or link a standalone Transformer to it to perform the Clear. Create a stage variable so it will compile, use the proper metadata (doesn't matter what's in the derivation, I use @NULL) set the constraint to @FALSE and enable the 'Clear' option. It will run first and clear the hashed file.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers