Before job subroutine
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 59
- Joined: Thu Mar 20, 2008 12:11 am
Before job subroutine
if i use a unix shell script as a before job subroune in job property. how can i use output of this unix script in a transformer used in that job.
i.e i want to use the output value for some comparision etc
i.e i want to use the output value for some comparision etc
nsd
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Without writing a routine there is no way you can achieve what you ask in a server job. This is because the Transformer stage executes in a separate process to the job process (which executes the before-job subroutine). You need to "park" the value somewhere - maybe a file, maybe the job's user status area - and recover it within the routine executed by the Transformer stage.
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.
-
- Premium Member
- Posts: 1044
- Joined: Wed Sep 29, 2004 3:30 am
- Location: Nottingham, UK
- Contact:
Is there not a DS routine that you can call that sets Job Parameters?
Update: A quick search reveals the DSSetParam function, but can this be called while a job is running?
Update2: I've tried and this appears to not work. Params probably get initialised before the Before Job Routine is called. Boo!
Update: A quick search reveals the DSSetParam function, but can this be called while a job is running?
Update2: I've tried and this appears to not work. Params probably get initialised before the Before Job Routine is called. Boo!
Phil Hibbs | Capgemini
Technical Consultant
Technical Consultant
Exactly, you 'set params' before starting the job, after it starts it is too late.
Now, don't tell anyone but I have seen people that have 'hacked' things (or otherwise have an intimate knowledge of the internal structures) and thus know how to sneak under the wire and actually update the current value of a parameter before job. Neither a Best Practice nor a supported methodology that be.
Now, don't tell anyone but I have seen people that have 'hacked' things (or otherwise have an intimate knowledge of the internal structures) and thus know how to sneak under the wire and actually update the current value of a parameter before job. Neither a Best Practice nor a supported methodology that be.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Premium Member
- Posts: 1044
- Joined: Wed Sep 29, 2004 3:30 am
- Location: Nottingham, UK
- Contact:
It seems tremendously inconvenient that there is no way for a Job to perform a single computation at the start that is later used either in multiple places (Transformers) or for multiple rows. As I understand it, you can't call a Routine in the initialisation of a Stage Variable either.
Correction: You can call a Routine in the initialisation! This will probably do for my situation.
Correction: You can call a Routine in the initialisation! This will probably do for my situation.
Phil Hibbs | Capgemini
Technical Consultant
Technical Consultant
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You could also use a before-stage subroutine in the Transformer stage to do the same thing and, since it's in the same process, transfer values through system variables such as @USER0 through @USER4 back into the Transformer stage. But the OP's stated requirement (and thread subject) was "before job subroutine".
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.