How to pass UserStatus from Job to Routine?

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
dsdoubt
Participant
Posts: 106
Joined: Sat Jul 15, 2006 12:17 am

How to pass UserStatus from Job to Routine?

Post by dsdoubt »

Hi,

Iam calling a Job from Routine. Iam setting UserStatus using a routine in the job. How to pass UserStatus from Job to Routine that calles the job?
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post by narasimha »

It has been discussed n number of time. Do a search
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

And 'n' = what, exactly? :wink:

Called job sets USERSTATUS. Calling routine uses DSGetJobInfo with an InfoType of DSJ.USERSTATUS to retrieve it.
-craig

"You can never have too many knives" -- Logan Nine Fingers
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post by narasimha »

n "Exact Search of UserStatus" :wink:
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
dsdoubt
Participant
Posts: 106
Joined: Sat Jul 15, 2006 12:17 am

Post by dsdoubt »

chulett wrote:Called job sets USERSTATUS. Calling routine uses DSGetJobInfo with an InfoType of DSJ.USERSTATUS to retrieve it.
Perfect Criag!!!
Iam using that routine in JobSequence. And using Routine.$ReturnValue to pass the value fetched from this argument to other jobs. Is there any simple way.
As you know, there is no UserStatus for RoutineActivity in Version 7.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

There's no simpler way given that you've chosen to use a routine rather than the Job Activity to run the job.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

dsdoubt wrote:As you know, there is no UserStatus for RoutineActivity in Version 7.
Because there's no need for that. It is, however, supported for the Job Activity stage.

Ray's point was that if you had used a Job Activity stage to run the job in the Sequence, you could have leveraged that to automatically pass $UserStatus from it to any downstream activity. Using the routine unnecessarily complicates the process... unless there is some reason you needed to build it that way? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply