Page 1 of 1

UtilityRunJob error with DataStage 8.1

Posted: Tue Jul 07, 2009 1:25 pm
by marcelo_almeida
Hi,

I am using the routine "UtilityRunJob" within a basic transformer in a parallel job in version 8.1.
I am referring to the routine this way:
UtilityRunJob ( 'JobOD0040B', 'PAR_DATA_MOV_ABERTO =': lnk_02.DATA_MOV_ABERTO_OD: '| SISTEMAS_DATA_EM =': lnk_02.SISTEMAS_DATA_EM, 0, 0)

The job where the basic bransformer is, run normally, however, the job JobOD0040B aborts always with these messages in the log:
"Job control process (pid 34664) has failed"
"Job aborted JobOD0040B"
Changing only the number of pid.

Thank you!

Posted: Tue Jul 07, 2009 2:23 pm
by JRodriguez
Marcelo,

I would set the basic transfomer to execute sequentially or used a single node config file...or you will be executing the job multiple time as many as your $APT_CONFIG_FILE,

If you really need to execute the 'child' dependent job multiple times then make it multiple instance ...

Have fun ...

Posted: Wed Jul 08, 2009 7:16 am
by marcelo_almeida
Rodriguez,

In fact, the job JobOD0040B runs only once, as the parent job will generate only one record.
The goal is to pass the result as a parameter for the job JobOD0040B.
The transformer is running sequentially.

Thank you!

Posted: Wed Jul 08, 2009 7:28 am
by chulett
I'm curious why you are not using a Sequence job for this? :?

Posted: Wed Jul 08, 2009 8:26 am
by marcelo_almeida
chulett ,

The value I need to pass as a parameter is the result of an SQL query.
To get this result through a sequence would need to write the output into a file and create a routine to read this file in sequence and pass the value as a parameter.
However, I can not write temporary files on the machine.

Thank you!

Posted: Wed Jul 08, 2009 8:48 am
by JRodriguez
Marcelo,

How about using a sequence and two jobs. The first one, a server job extracts the value using your SQL and place it in the job's user status area. The second job activity (obOD0040B) will have the previous job user status available to be pass as a parameter value

Search the forum for other poster on this. I rather prefer this method because is more clean


Thanks,

Julio

Posted: Wed Jul 08, 2009 8:57 am
by chulett
Exactly... check into the USERSTATUS functionality to pass informaiton between jobs without 'landing' it.

Posted: Fri Jul 10, 2009 8:53 am
by marcelo_almeida
I created a test and worked properly when I used the routine changing the $ UserStatus within a server job.

However, I need to do this in a basic transformer inserted in a parallel job. This way is not working, the value is not assigned to the variable $ UserStatus.

Thank you,

Posted: Sun Mar 14, 2010 4:35 am
by platonfi
marcelo_almeida wrote:I created a test and worked properly when I used the routine changing the $ UserStatus within a server job.

However, I need to do this in a basic transformer inserted in a parallel job. This way is not working, the value is not assigned to the variable $ UserStatus.

Thank you,
There is no way you can read or write userstatus in a parallel job. That has beed clarified througly.

Posted: Sun Mar 14, 2010 11:52 am
by ray.wurlod
marcelo_almeida wrote:However, I need to do this in a basic transformer inserted in a parallel job.
Why?
If there's only one record then a server job will be far more efficient.
And then you can use UtilityRunJob properly.