Parallel job design
Moderators: chulett, rschirm, roy
Parallel job design
Hello,
I have a specification to develop a job. in one particular section of the spce I have following condition.
1. I need to select a particular column form a table and if the select is successful then I continue or I stop the process.
2.To continue I need to check if the select produced atleast one row. If I have atleast 1 row then I write these values to a file and if i don't have atleast 1 row then I should goto a different process.
can anyone please tell me how to design this in a parallel job.
Thanks
I have a specification to develop a job. in one particular section of the spce I have following condition.
1. I need to select a particular column form a table and if the select is successful then I continue or I stop the process.
2.To continue I need to check if the select produced atleast one row. If I have atleast 1 row then I write these values to a file and if i don't have atleast 1 row then I should goto a different process.
can anyone please tell me how to design this in a parallel job.
Thanks
KPSITA
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
1. Lookup stage. Lookup failed rule = "Fail".
2. Allow lookup stage to retrieve multiple rows from reference input. (The rest of your requirement happens automatically.)
2. Allow lookup stage to retrieve multiple rows from reference input. (The rest of your requirement happens automatically.)
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.
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
Using DB2 you can issue the following:
This will either fetch 1 or no rows. Usings Ray's lookup technique, you can generate a single row into a lookup and try to get a match and fail it if not.
Code: Select all
select 1 from dsadm.sample fetch first 1 rows only
3NF: Every non-key attribute must provide a fact about the key, the whole key, and nothing but the key. So help me Codd.
Ray's suggestion could be acheived if you used a row generator stage to generate 1 input row containing a dummy key value (say 'X') into a lookup stage. For the reference into the lookup stage you would add a field to your select query which matched your dummy key value. If you then return multiple rows on the link all values which were returned would be output.
Otherwise I would investigate using execute command stages and user variable stages to check your output for values.
Otherwise I would investigate using execute command stages and user variable stages to check your output for values.
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
since my post process are sequence, I decided to use execute and condition stage.I am not that familiar with sequencer butafter few research i found that I can call a file in execute stage and then count number of rows in that. Then I'll be able to use a condition stage to call my post process sequencer...any thoughts?
KPSITA
Its a good start.
You might not necessarily need the condition stage.
You could just use a custom trigger based on your return value from the execute command stage. ie if your command was to check the number of rows and the return value was a number (being the number of rows) you could set your trigger for the outbound link to ReturnValue > 0. This would then only execute when that condition was met.
You might not necessarily need the condition stage.
You could just use a custom trigger based on your return value from the execute command stage. ie if your command was to check the number of rows and the return value was a number (being the number of rows) you could set your trigger for the outbound link to ReturnValue > 0. This would then only execute when that condition was met.