Populating user activity variable in a sequencer
Moderators: chulett, rschirm, roy
Populating user activity variable in a sequencer
I have a job in a sequencer where I need to read the number of rows
in a table and based on that populate an user activity variable in the
sequencer. I am using the job to read the number of rows and put it in a
sequential file. I am then using an Execute Command stage to read the
value from the sequential file and populate the user activity variable.
Is there a more efficient way?
in a table and based on that populate an user activity variable in the
sequencer. I am using the job to read the number of rows and put it in a
sequential file. I am then using an Execute Command stage to read the
value from the sequential file and populate the user activity variable.
Is there a more efficient way?
You can read the "number of rows in a table" and directly write it to the DSSetUserStatus in the job.
(You need to write a simple routine)
Check this post
You can use this UserStatus later in your Job Sequence.
This way you can skip the Execute Command stage.
Lets wait on more efficient way, implemented by others
(You need to write a simple routine)
Check this post
You can use this UserStatus later in your Job Sequence.
This way you can skip the Execute Command stage.
Lets wait on more efficient way, implemented by others
Narasimha Kade
Finding answers is simple, all you need to do is come up with the correct questions.
Finding answers is simple, all you need to do is come up with the correct questions.
I am using PX jobs so using DSSetUserStatus is not an option. What if I
write a custom server routine? I am thinking of something like this:
FUNCTION UpdateRowCount(Arg1)
Call DSSetUserStatus(Arg1)
Ans = Arg1
RETURN(Ans)
Now, which job's user status would this set? In my sequencer, I have,
JobActivity1 ----> JobActivity2
JobActivity1 calls a job which gets the number of rows using an Oracle
stage and puts it in a sequential file. JobActivity2 needs this value. I am
thinking may be JobActivity1 should be a server job. But how do I get the value so that JobActivity2 can use it?
write a custom server routine? I am thinking of something like this:
FUNCTION UpdateRowCount(Arg1)
Call DSSetUserStatus(Arg1)
Ans = Arg1
RETURN(Ans)
Now, which job's user status would this set? In my sequencer, I have,
JobActivity1 ----> JobActivity2
JobActivity1 calls a job which gets the number of rows using an Oracle
stage and puts it in a sequential file. JobActivity2 needs this value. I am
thinking may be JobActivity1 should be a server job. But how do I get the value so that JobActivity2 can use it?
-
- Premium Member
- Posts: 1255
- Joined: Wed Feb 02, 2005 11:54 am
- Location: United States of America
Are you and the OP (abc123) the same?splayer wrote:I am using PX jobs so using DSSetUserStatus is not an option.
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
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The method you're using (via a file) is adequately efficient.
Even a job's user status area involves writing to and from disk, so there's no big gain there. The main additional cost is the additional file opens and closes (a total of four operations, and thus negligible).
Even a job's user status area involves writing to and from disk, so there's no big gain there. The main additional cost is the additional file opens and closes (a total of four operations, and thus negligible).
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.
Ok. So here is the interesting part. My server job has:
Oracle stage----> Transformer ----> SeqFile
However, the SeqFile stage is completely unnecessary but I am forced to use it as I don't have the output side without it. In the derivation of the output column, I execute the routine which sets the userstatus of the job. Is there a way around it without adding an extra seq file stage?
Oracle stage----> Transformer ----> SeqFile
However, the SeqFile stage is completely unnecessary but I am forced to use it as I don't have the output side without it. In the derivation of the output column, I execute the routine which sets the userstatus of the job. Is there a way around it without adding an extra seq file stage?
You need to add a Sequential File Stage or something else as an Output.
But you have the option to write the output to /dev/null with the Sequential File Stage
In the file name space use this /dev/null
But you have the option to write the output to /dev/null with the Sequential File Stage
In the file name space use this /dev/null
Narasimha Kade
Finding answers is simple, all you need to do is come up with the correct questions.
Finding answers is simple, all you need to do is come up with the correct questions.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Incidentally, none of this is possible in a sequencer.
It is, however, possible in a job sequence.
A sequencer is a component in a job sequence that makes an "any or all" decision based on whether its inputs have fired.
It is, however, possible in a job sequence.
A sequencer is a component in a job sequence that makes an "any or all" decision based on whether its inputs have fired.
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.
Alternatively BASIC Transformer can also be used in PX job for the same reason. Or the rowcount can be written into a Sequential file, and Execute command activity can be used to read and pass it as a variable.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'