Well i have this job where in i need to make the transformer wait for the file that is written in the same same job .
the req i have is that i need the count of the records getting into the output file and at the same time i need to extract the input record count from the input file and load both of these info into a single Oracle table .all these are done from the transfprmer stage.
the problem i'm facing is that the transformer is extraxting the input record count real quick ie much bofore all the records are loaded into the output file . so i'm not getting the right output count as the transformer loads the input count and the output count as per the number of records passed at that instant ,into the oracle table the moment it completes getting the input count .
Can somebody help me with this issue ?
Thanks
Shalini
to make the Transformer Wait for the file
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 1255
- Joined: Wed Feb 02, 2005 11:54 am
- Location: United States of America
I don't think you could achieve your requirement with your kind of job design.
wait_for_file has a different meaning, Usually, a process waits for a file if its not present at the source location to read from. In your case, you already have the input file.
Also, you cannot read and write into the same sequential file at the same time.
You will get a
error.
Whale.
wait_for_file has a different meaning, Usually, a process waits for a file if its not present at the source location to read from. In your case, you already have the input file.
Also, you cannot read and write into the same sequential file at the same time.
You will get a
Code: Select all
ds_seqopen() - Win32 error in CreateFile - The process cannot access the file because it is being used by another process.
Whale.
Anything that won't sell, I don't want to invent. Its sale is proof of utility, and utility is success.
Author: Thomas A. Edison 1847-1931, American Inventor, Entrepreneur, Founder of GE
Author: Thomas A. Edison 1847-1931, American Inventor, Entrepreneur, Founder of GE
-
- Charter Member
- Posts: 822
- Joined: Sat Sep 17, 2005 5:25 pm
- Location: USA
How are you getting to the input and output count in your job?
If you need the number of records written into the file, you would need a separate job to load this information into the table. If it is the number of records going into the file (assuming that you dont want the reject count if any) - then you can catch it with an aggregator before writing into the file.
If you need the number of records written into the file, you would need a separate job to load this information into the table. If it is the number of records going into the file (assuming that you dont want the reject count if any) - then you can catch it with an aggregator before writing into the file.
Last edited by thebird on Thu Dec 14, 2006 4:28 pm, edited 1 time in total.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
This design will not open the file for reading until it has been written to and closed by the writer, therefore the Transformer stage will wait.
But a modular design in which one job creates the file and another reads it, is easier to maintain. And the second job can be controlled by a WaitForFile activity in a job sequence.
Code: Select all
-----> SeqFileStage -----> TransformerStage ----->
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.