Passing Set of values from a data base table to Sequence Job
Moderators: chulett, rschirm, roy
Passing Set of values from a data base table to Sequence Job
Hi ,
I want to pass 4 distinct values from a data base table to a Sequence job.
I have defined 4 parameters to catch the values.
Is there any method to read and pass it to the job parameters.
Thanks in Advance!
I want to pass 4 distinct values from a data base table to a Sequence job.
I have defined 4 parameters to catch the values.
Is there any method to read and pass it to the job parameters.
Thanks in Advance!
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Lots of ways. My preferred way is as follows.
Create a server job to catch all four in a single string and load that into the job's user status area, and read that from the Job activity's $UserStatus variable and parse with Field functions.(make sure it returns just one row)
Create a server job to catch all four in a single string and load that into the job's user status area, and read that from the Job activity's $UserStatus variable and parse with Field functions.
Code: Select all
SELECT v1 || ';' || v2 || ';' || v3 || ';' || v4 FROM table WHERE condition ;
Code: Select all
Field(FetchJob.$UserStatus, ";", 1,1)
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.
Thanks Ray for your suggestion.
I have some confusion on this could you please explain
1-1st I will read the values from the table using any dabase stage then how to load the string to job's user status area which will be used in another sequence job?
2-Is the Sequence job will depedent on this job?
Thanks,
sjordery.
I have some confusion on this could you please explain
1-1st I will read the values from the table using any dabase stage then how to load the string to job's user status area which will be used in another sequence job?
2-Is the Sequence job will depedent on this job?
Thanks,
sjordery.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Thanks Ray!
I did exactly as mentioned to set the status of the job with a value by invoking a routine which calls DSSetUserStatus function and it worked fine.
If we need to catch more than one value and pass it to set of parameters in a sequence job then ,do we need to design those many jobs or can we do this in the same job.
Regards,
Sjordery.
I did exactly as mentioned to set the status of the job with a value by invoking a routine which calls DSSetUserStatus function and it worked fine.
If we need to catch more than one value and pass it to set of parameters in a sequence job then ,do we need to design those many jobs or can we do this in the same job.
Regards,
Sjordery.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: