result of a query in a variable activity
Moderators: chulett, rschirm, roy
result of a query in a variable activity
Hello
I'm using a sequencer job containing 3 server jobs (SJ1, SJ2 and SJ3).
SJ1 is linked to SJ2 and SJ3.
I have a parameter table (Oracle Database). One parameter indicates the path to take in the sequencer.
If parameter = 2 then SJ2 must run and SJ3 is ignored.
If parameter = 3 then SJ3 must run and SJ2 is ignored.
To do that, I have to read the parameter in the table and then evaluate the value in the triggers of SJ1.
Thanks to DSXchange, I found a link to a solution on www.anotheritco.com but I would like to know if it is possible to read the value of the parameter in a database and store it in a variable activity without using an intermediate file ?
I'm using a sequencer job containing 3 server jobs (SJ1, SJ2 and SJ3).
SJ1 is linked to SJ2 and SJ3.
I have a parameter table (Oracle Database). One parameter indicates the path to take in the sequencer.
If parameter = 2 then SJ2 must run and SJ3 is ignored.
If parameter = 3 then SJ3 must run and SJ2 is ignored.
To do that, I have to read the parameter in the table and then evaluate the value in the triggers of SJ1.
Thanks to DSXchange, I found a link to a solution on www.anotheritco.com but I would like to know if it is possible to read the value of the parameter in a database and store it in a variable activity without using an intermediate file ?
-
- Premium Member
- Posts: 232
- Joined: Fri Aug 04, 2006 1:20 am
- Location: Bangalore
Welcome...
In SJ1, you can read the value from the database and set the value to user status by using "DSSetUserStatus". And you can fetch the values in the Sequence job by using SJ1's jobactivity.$UserStatus.
Search the forum for the keyword DSSetUserStatus, you will get more details on how to use it.
In SJ1, you can read the value from the database and set the value to user status by using "DSSetUserStatus". And you can fetch the values in the Sequence job by using SJ1's jobactivity.$UserStatus.
Search the forum for the keyword DSSetUserStatus, you will get more details on how to use it.
yes but ...
Thanks.
I did a search as you adviced.
I found 125 answers with the keyword DSSetUserStatus. It's a bit long to read but it's effective. Here is a summary of the solutions.
Step 1 : I create a routine like that :
Step 2 : I create a job SJ1 with 3 stages :
Stage1 (ORAOCI9) read the parameter from the table
Stage2 (Transformer) use the function SetUserStatus in Derivation
Stage3 (Sequential file) write the value in a file
Step 3 : I call the job SJ1 in a sequencer and I use $UserStatus in the expression of a custom conditionnal trigger to determine the next job to execute.
It works but I still have the intermediate file (Stage3 in the Step2).
How can I use the transformer without writing something in a file or a database ?
Do I really need to use a transformer to call the function SetUserStatus ?
I did a search as you adviced.
I found 125 answers with the keyword DSSetUserStatus. It's a bit long to read but it's effective. Here is a summary of the solutions.
Step 1 : I create a routine like that :
Code: Select all
FUNCTION SetUserStatus(Arg1)
Call DSSetUserStatus(Arg1)
Ans = Arg1
Stage1 (ORAOCI9) read the parameter from the table
Stage2 (Transformer) use the function SetUserStatus in Derivation
Stage3 (Sequential file) write the value in a file
Step 3 : I call the job SJ1 in a sequencer and I use $UserStatus in the expression of a custom conditionnal trigger to determine the next job to execute.
It works but I still have the intermediate file (Stage3 in the Step2).
How can I use the transformer without writing something in a file or a database ?
Do I really need to use a transformer to call the function SetUserStatus ?
-
- Premium Member
- Posts: 232
- Joined: Fri Aug 04, 2006 1:20 am
- Location: Bangalore
For a transformer , definetly an output link should be there, but you can set the constraint to @FALSE, so nothing will be written to that file.
If you want to store some constant values to the userstatus, you can just call it in stage subroutines, but here you are fetching some values from Database and writing it user status, so i think you need a transformer here.
There might be some other ways also, which i am not aware. Please wait for our expert's comments.
If you want to store some constant values to the userstatus, you can just call it in stage subroutines, but here you are fetching some values from Database and writing it user status, so i think you need a transformer here.
There might be some other ways also, which i am not aware. Please wait for our expert's comments.
sorry I'm lost
I don't understand.DS_SUPPORT wrote:but you can set the constraint to @FALSE
What does it means ? How can I do that ?
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: