Setting $UserStatus from a Parallel Job

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
blewip
Participant
Posts: 81
Joined: Wed Nov 10, 2004 10:55 am
Location: London

Setting $UserStatus from a Parallel Job

Post by blewip »

Does anyone know how you set the UserStatus from a Parallel Job.

I have a routine that calls DSSetUserStatus(Arg1). I can call this from a Server job no problem. However when I use a BASIC transformer in a PX job to call the same routine, it doesn't work.

Is there another way to set the UserStatus?

Cheers
blewip
Participant
Posts: 81
Joined: Wed Nov 10, 2004 10:55 am
Location: London

Post by blewip »

Error Message is
Log_Job_Details(BASIC_Transformer_49).#0.BASIC_Transformer_49 (DSSetUserStatus): Error reading Job Status record. JobNo = 46 JobName = Log_Job_Details.#0 WaveNo = 1
cpratima
Participant
Posts: 1
Joined: Wed Apr 13, 2005 1:49 am

Re:Setting $UserStatus from a Parallel Job

Post by cpratima »

You cannot call routines from a parallel job because PX does not understand the BASIC language that routines use. You will have to write the logic through a Build stage using C language.
blewip
Participant
Posts: 81
Joined: Wed Nov 10, 2004 10:55 am
Location: London

Post by blewip »

Thanks cpratima, so you're saying that I need write some c++ code.

I have been looking at the Parallel Job Advanced Developers Guide, is this the best one for showing me what to do.

I am guessing there is an equivalent to the call that I am using at the moment.

In the Server Routine I Call DSSetUserStatus(Arg1)

Do you know what call I use in the c code for my Parallel Routine?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Re:Setting $UserStatus from a Parallel Job

Post by chulett »

cpratima wrote:You cannot call routines from a parallel job because PX does not understand the BASIC language that routines use.
I'm afraid this isn't true. You can call routines from the BASIC Transformer as the OP is trying to do.

My guess (don't know for sure) is that PX jobs may not have a 'User Status' area like Server jobs do. :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I think that Craig is correct, the user status is not the same in Px. What would work is doing the same thing from an after-job subroutine call instead of from a BASIC transform - that way at least you know it is only getting called one time instead of once per node defined in the $APT_CONFIG_FILE
blewip
Participant
Posts: 81
Joined: Wed Nov 10, 2004 10:55 am
Location: London

Re:Setting $UserStatus from a Parallel Job

Post by blewip »

chulett wrote:
My guess (don't know for sure) is that PX jobs may not have a 'User Status' area like Server jobs do. :?
That's possible I am new to PX, however in the Sequence you can access the $UserStatus for the particular PX Job using ActivityVariables. I am accessing $JobName and this seems to work, $JobStatus may work as well.

From what ArndW was saying it may be more complex though with each node potentially having a $UserStatus
Post Reply