pass value between jobs
Moderators: chulett, rschirm, roy
pass value between jobs
hi all,
One way to pass a value from one job to another is by using userstatus (DSSetUserstatus). I somewhere else read (and experienced) that this routine can only be used in serverjobs. What mechanism(s) can be used in px jobs for passing values?
Peter
One way to pass a value from one job to another is by using userstatus (DSSetUserstatus). I somewhere else read (and experienced) that this routine can only be used in serverjobs. What mechanism(s) can be used in px jobs for passing values?
Peter
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
For one value, I'd still recommend the user status area. Use a server job (or a fully sequential parallel job that includes a BASIC Transformer) to obtain that value and store it in its user status area. Use the parent job sequence to retrieve that job's user status value, and supply that as the value with which to replace a job parameter in the main job.
If you don't want to do that, there are numerous other storage locations available, such as a text file, a row in a table, an environment variable and so on. To retrieve the value of an environment variable, you would need some way to execute either the DataStage command ENV or the operating system command echo in your job sequence.
If you don't want to do that, there are numerous other storage locations available, such as a text file, a row in a table, an environment variable and so on. To retrieve the value of an environment variable, you would need some way to execute either the DataStage command ENV or the operating system command echo in your job sequence.
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.
Hello ray,
I tried passing a userstatus in a Basic transformer (from a fully sequential parallel job, as you suggested) to the parent job, but this doesn't work. I get the following warning:
subjob(BASIC_Transformer_3).#0.BASIC_Transformer_3 (DSSetUserStatus): Error reading Job Status record. JobNo = 646 JobName = subjob.#0 WaveNo = 1
Peter
I tried passing a userstatus in a Basic transformer (from a fully sequential parallel job, as you suggested) to the parent job, but this doesn't work. I get the following warning:
subjob(BASIC_Transformer_3).#0.BASIC_Transformer_3 (DSSetUserStatus): Error reading Job Status record. JobNo = 646 JobName = subjob.#0 WaveNo = 1
Peter
How are you trying it?
Write a routine which calls the UserStatus function. It has been discussed serveral times.
Following will be the code for the function.
Write a routine which calls the UserStatus function. It has been discussed serveral times.
Following will be the code for the function.
Code: Select all
INCLUDE DSINCLUDE JOBCONTROL.H
*FUNCTION UpdateUserStatus(Arg1)
Call DSSetUserStatus(Arg1)
Ans = Arg1
RETURN(Ans)
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
The strategy of using a BASIC transformer in a parallel job will not work in a MPP system. It works only in SMPs ... according to Datastage documentation.PeterPol wrote:Hello ray,
I tried passing a userstatus in a Basic transformer (from a fully sequential parallel job, as you suggested) to the parent job, but this doesn't work. I get the following warning:
subjob(BASIC_Transformer_3).#0.BASIC_Transformer_3 (DSSetUserStatus): Error reading Job Status record. JobNo = 646 JobName = subjob.#0 WaveNo = 1
Peter
Last edited by sud on Thu Feb 01, 2007 5:34 am, edited 1 time in total.
It took me fifteen years to discover I had no talent for ETL, but I couldn't give it up because by that time I was too famous.
Or straigt away use Server job.
viewtopic.php?t=95608&highlight=waveno
viewtopic.php?t=95608&highlight=waveno
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
I received similar warning not long ago when i tried to set userstatus using basic transformer . Not sure as to what the problem is.subjob(BASIC_Transformer_3).#0.BASIC_Transformer_3 (DSSetUserStatus): Error reading Job Status record. JobNo = 646 JobName = subjob.#0 WaveNo = 1
As noted, it is better to do the same in server jobs.
hi,
Setting the userstatus is no problem in server jobs. I already experienced that. However, server jobs are very limited in processing possibilities, so I prefer to develop most things in parallel jobs.
Ray mentioned some alternatives like storing the value in a textfile or using environment variables. The first option seems rather time-consuming to me . The second option is new for me
Peter
Setting the userstatus is no problem in server jobs. I already experienced that. However, server jobs are very limited in processing possibilities, so I prefer to develop most things in parallel jobs.
Ray mentioned some alternatives like storing the value in a textfile or using environment variables. The first option seems rather time-consuming to me . The second option is new for me
Peter
A simple storage of a value to be retrieved later on is best to be done in a server job. Its a small job and hence preferably done in server. For massive processing use parallel jobs.PeterPol wrote:However, server jobs are very limited in processing possibilities, so I prefer to develop most things in parallel jobs.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.