One of my colleagues has a requirement to process a single row from a file at a time, passing the result to a second DataStage job, and then processing the next row.
My suggestion is to have a Transformer that outputs @INROW=1 to the processing code, and @INROW>1 to another sequential file, running the job from a shell script that then renames the output file to be the input file name and runs the jobs again.
Does this sound like a reasonable approach? I saw allusions to some kind of looping mechanism in Job Sequence when I looked through the archive, but can't find any looping capability in the documentation. Now that I look again, it's referring to DS 7.5 which we don't have.
Running a job in a loop
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 1044
- Joined: Wed Sep 29, 2004 3:30 am
- Location: Nottingham, UK
- Contact:
Running a job in a loop
Phil Hibbs | Capgemini
Technical Consultant
Technical Consultant
Yes, there are Looping stages that were introduced in the 7.5 Sequencer which as you noted won't help you with this.
For you, hand-coded job control could handle that requirement. If you want to do this in a job, search the forum for usage of the 'UtilityRunJob' sdk routine, it will allow you fulfill your original requirement.
For you, hand-coded job control could handle that requirement. If you want to do this in a job, search the forum for usage of the 'UtilityRunJob' sdk routine, it will allow you fulfill your original requirement.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Hi,
First thing that comes to my mind when you want to proces 1 row at a time is a real time environment where a web service DS job made with SOA webservices tool might be handy (but this might not be you'r case).
As for implementing this in DS server you simply get a parameter and use to supply the row or a file with it and run a job that handles it.
You'll need to wrap this with some basic job control code or with an external program utilizing the API or ussage of dsjob command line utility foreach job run (API will need and C/C++ programing calling dsjob is more simple primitive but may not be performance wise satisfactory).
In any case how may rows do you expect?
Is there any way of turning this to a batch process processing more then 1 row a time and perhaps building a control file you can analyze for status of each row processed?
IHTH,
First thing that comes to my mind when you want to proces 1 row at a time is a real time environment where a web service DS job made with SOA webservices tool might be handy (but this might not be you'r case).
As for implementing this in DS server you simply get a parameter and use to supply the row or a file with it and run a job that handles it.
You'll need to wrap this with some basic job control code or with an external program utilizing the API or ussage of dsjob command line utility foreach job run (API will need and C/C++ programing calling dsjob is more simple primitive but may not be performance wise satisfactory).
In any case how may rows do you expect?
Is there any way of turning this to a batch process processing more then 1 row a time and perhaps building a control file you can analyze for status of each row processed?
IHTH,
Roy R.
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
![Image](http://www.worldcommunitygrid.org/images/logo.gif)
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
![Image](http://www.worldcommunitygrid.org/images/logo.gif)
-
- Premium Member
- Posts: 1044
- Joined: Wed Sep 29, 2004 3:30 am
- Location: Nottingham, UK
- Contact:
Way too many buzzwords for my liking!roy wrote:First thing that comes to my mind when you want to proces 1 row at a time is a real time environment where a web service DS job made with SOA webservices tool might be handy (but this might not be you'r case).
![Razz :P](./images/smilies/icon_razz.gif)
Row counts will be somewhere in the 5 digits area. I don't understand about the batch process - my specific requirement is to process only one row at a time, so no, I can't make it into a batch process that processes multiple rows.In any case how may rows do you expect?
Is there any way of turning this to a batch process processing more then 1 row a time and perhaps building a control file you can analyze for status of each row processed?
Phil Hibbs | Capgemini
Technical Consultant
Technical Consultant